来源Oyiadin, 他提供的模板源码地址。

step1, 在显示文章列表里,对输出进行控制,如果有设定密码的(通过post.metadata.password判定),则使用如下的代码(Oyiadin将其放在include/password_form.jade这个文件中调用):

form(method="post", action="{{ post.url }}")
        | 这是一篇受密码保护的文章,请提供
        if post.metadata.question
            | 问题的答案
            | 密码
        | 以继续查看。

        {{ post.metadata.question or "密码:" }}
    //- 如果设置 type=password 的话,无法输入中文。
    input(type="submit", value="提交")

step2, 在文章的详细页中,对输入密码是否正确进行判断。

if not post.metadata.password or request.form.password|string == post.metadata.password|string
    include include/password_form

    if request.form.password|string
            strong 输入错误,请重试。



另外,文章的status不能为public, 因为可以通过?action=show_json来查看public的日志各种属性。

比如Oyiadin是用这种方式获取posts变量的:get_data(type='post', status=['public', 'secret'])


Post Password

  • d2014-03-15 08:44

    Emz, looks nice!!!

  • Hey Ⅰ am so thгilled I fοund your webpage, I
    really found you by mistake, while I was researchіng on Dіgg for something else, Anyways I am herᥱ now and would just
    like to say kudos for a tremendous post and a all round entᥱrtaining blog (I also love the
    theme/design), I don’t have time to read it all at the minute but I haᴠe
    book-maгkeԁ it and also added youг RSS feeds, so when I
    have time I will be bаck to read much more, Please do keep up the grᥱat work.

  • derm exclusive tv offer2017-03-30 18:27

    Ꮲretty nice post. I simply stumbled upon your weblog and wanteԁ to mentiоn that I've trulү loved browsing your weblog
    posts. After aⅼl I wilⅼ be subscribing for
    your feed and I'm hoping you write once more very soon!

  • Mikki2018-08-09 08:23

    I'm not sure exactly why but this web site is loading very slow for me.

    Is anyone else having this problem or is it a problem on my end?
    I'll check back later on and see if the problem still exists.

  • pkmongobot2018-09-02 05:27

    aku metasa ini adalah salah satu dari begitu tidak sedikit berita utana bagi saya & aku
    senang mencarri ilmu artikel kamu namun harus di observasi
    kepada beberapa isu umum, cita rasa situs amat sangat
    ideal, artikelnya tefamat keren D. pekerjaan bagus sorak sorai.

  • 안전놀이터2018-09-23 08:37

    Hi! This is my first visit to your blog! We are a collection of volunteers and starting a new project in a community in the same niche.
    Your blog provided us valuable information to work on. You have done a
    extraordinary job!

  • 모바일바카라2018-09-25 00:50

    Magnificent beat ! I would like to apprentice while
    you amend your site, how could i subscribe for a blog site?

    The account aided me a acceptable deal. I had been a little
    bit acquainted of this your broadcast offered bright clear concept

  • Danny2018-10-08 14:40


  • 666.porn cheerleader sex2018-12-01 07:25

    Hey there! Someone in my Myspace group shared this website with us so I came to check it out.
    I'm definitely enjoying the information. I'm bookmarking and will be tweeting
    this to my followers! Great blog and amazing design and style.

  • Kennith2019-01-15 08:55

    Would you like to be abgle too defhse your fears or
    worries more frequently than it is possible to at present.
    Sometimes individuals have excessive responses of fear or anxiety
    to circukstances that do not cause these responses too others.
    Apart from alll of these the imbalance in tridoshas also cause impotence or erectile dysfunction.

  • 카지노사이트2019-01-17 21:54

    Have you ever thought about adding a little bit more than just your
    articles? I mean, what you say is fundamental and all.
    Nevertheless imagine if you added some great visuals or video clips
    to give your posts more, "pop"! Your content is excellent but with pics
    and video clips, this website could undeniably be one of the best in its field.
    Amazing blog!

  • 카지노사이트2019-01-18 18:30

    If some one needs expert view regarding blogging and site-building then i advise him/her to go to see this webpage, Keep up the good work.

  • 바카라사이트2019-02-08 17:51

    We recommend our casino, Baccarat site. Many of our members use our casino site to offer baccarat, slots, blackjack and roulette on a variety of platforms.
    My web page: https://www.mccasino777.com/

  • 카지노사이트2019-02-08 17:51

    Our casino representative Donald Net introduces only safe casino site Baccarat site among online casinos. Our casino-based baccarat site offers ducking casinos, yes casinos, first casinos and more.
    My web page: https://www.wac3636.com/

  • 카지노사이트2019-02-12 22:14

    Hi there! I simply want to offer you a big thumbs
    up for the great info you have got here on this post.

    I'll be coming back to your web site for more soon.

  • 바카라사이트2019-02-23 19:09

    I could not resist commenting. Exceptionally well written! https://www.bacca8.com/

  • 강남개인일수2019-02-28 15:11

    What's Going down i'm new to this, I stumbled
    upon this I've found It positively helpful and it has helped me out
    loads. I hope to contribute & help other users like its helped me.
    Good job.

  • acrylnagels2019-03-04 00:12

    This design is wicked! You definitely know how to keep a reader entertained.
    Between your wit and your videos, I was almost moved to start my
    own blog (well, almost...HaHa!) Wonderful job. I really loved what you had to say, and more than that,
    how you presented it. Too cool!

  • Thanks for finally talking about >创建密码保护的日志 <Loved it!

  • I think this is one of the most significant information for me.
    And i am glad reading your article. But wanna remark on few general things,
    The website style is ideal, the articles is really excellent
    : D. Good job, cheers

  • qiuqiupkvgames2019-08-07 03:24

    A fascinating discussion is worth comment. There's no doubt that that you
    ought to publish more about this topic, it might not be a taboo matter
    but usually folks don't speak about such topics. To the next!
    Best wishes!!

  • poker card protectors2019-09-09 05:08

    Amazing blog! Do you have any hints for aspiring writers?
    I'm hoping to start my own site soon but I'm a little lost on everything.

    Would you recommend starting with a free platform like Wordpress or go for
    a paid option? There are so many choices out there that I'm completely confused ..

    Any ideas? Thanks a lot!

  • 888pokerqq.com/2019-09-12 06:28

    If you are going for most excellent contents like I do, only pay a quick visit this web
    site everyday because it offers feature contents,

  • 카지노사이트2019-09-28 15:39

    2019 bestcasino

  • more information2019-10-20 15:02

    创建密码保护的日志 http://judibca.net

  • http://pkvgames888.com2019-10-29 07:24

    A motivating discussion is worth comment. There's no doubt that that you need to write more about this issue, it may not
    be a taboo matter but usually folks don't talk about such issues.
    To the next! Best wishes!!

  • kiukiupkv.com2019-11-13 18:50

    It's perfect time to make some plans for the longer term and it's time to be happy.
    I have learn this publish and if I may I desire to counsel you some interesting issues or suggestions.

    Maybe you can write subsequent articles referring to this article.
    I desire to learn more issues approximately it!

  • propkvgames2019-11-16 05:21

    Nice weblog right here! Additionally your site rather
    a lot up very fast! What host are you using?
    Can I get your associate hyperlink for your host?

    I want my site loaded up as quickly as yours lol

  • propkvqq2019-11-16 05:34

    Wonderful blog! I found it while browsing on Yahoo News.
    Do you have any suggestions on how to get listed in Yahoo News?
    I've been trying for a while but I never seem to get there!

    Appreciate it

  • sicalomitha.home.blog2019-11-22 19:31

    Having read this I believed it was very informative. I
    appreciate you finding the time and energy to put this short article together.
    I once again find myself personally spending a significant amount of time
    both reading and posting comments. But so what, it was still worthwhile!

  • indojempolqq.cc2019-12-08 19:00

    I'm gone to tell my little brother, that he should also visit this blog on regular
    basis to get updated from most recent gossip.

  • indomahirqq.cc2019-12-12 07:59

    whoah this blog is magnificent i like studying your articles.
    Stay up the good work! You know, many people are
    looking around for this information, you could aid them greatly.

  • eunnjo kim2019-12-12 16:06

    Hey ... buddy !! Your site is filled with really useful information!
    Thank you so much for letting me know good information!
    I have an informative site. Would you like to take a look around?

  • eunnjo kim2019-12-12 16:07

    Hey ... buddy !! Your site is filled with really useful information!
    Thank you so much for letting me know good information!
    I have an informative site. Would you like to take a look around?


  • adilqqpro2019-12-20 14:54

    What's up mates, good article and good arguments commented at this
    place, I am in fact enjoying by these.

  • charity2019-12-27 14:54

    Want a lot of information about casinos and baccarat? Then visit our site once
    Want a lot of information about casinos and baccarat? Then visit our site once
    https://hpx7.com 바카라사이트
    https://hpx7.com 바카라사이트
    https://hpx7.com 바카라사이트
    https://hpx7.com 바카라사이트

  • samantha2020-01-06 15:08

    please visit our site this is very interesting site.
    https://hpx7.com 바카라 사이트

  • riyan2020-01-08 13:31

    Yo! guys who wants to know about our Baccarat Site and casino try visit our website you will love it!

    http://hpx7.com 바카라사이트

  • mahirqq12020-01-09 11:36

    I was recommended this website by my cousin. I am not sure whether this post is written by him
    as no one else know such detailed about my difficulty.
    You're wonderful! Thanks!

  • riyan2020-01-10 13:08

    Yo! guys who wants to know about our Baccarat Site and casino try visit our website you will love it!

    http://hpx7.com 바카라사이트

  • kath 2020-01-11 13:26

    Nice post. I used to be checking constantly this weblog and I’m impressed! Very helpful information.
    please try to visit us at http://hky7.com 토토사이트

  • drea2020-01-13 14:49

    Thanks for sharing a nice article like this. Please visit our site

    https://hky7.com 토토사이트

  • jose2020-01-14 16:18

    thanks for this amazing post
    keep posting!
    try to visit our site once:
    https://hpx7.com 바카라사이트

  • 바카라사이트2020-01-14 16:27

    Very nice post. I just stumbled upon yoour blog and wanted to say
    hat I've truly enjoyed browsinjg your blog posts. In any case
    I will be subscribing to your feed and I hope you write abain very soon!

  • drea2020-01-15 09:58

    Thanks for sharing a nice article like this.It helps a lot.
    Please visit our site https://hpx7.com 바카라사이트

  • pearl2020-01-16 09:40

    visit now click this https://kyb7.com 온라인 슬롯머신 사이트

  • menchu2020-01-17 14:25

    Great article. This is really very helpful for everyone
    try to visit our site once: https://hpx7.com 바카라사이트

  • 먹튀검증2020-01-20 21:10

    Hello! I've been following your blog for a while now and finally got the courage to go ahead and
    give you a shout out from Dallas Tx! Just wanted to mention keep up
    the excellent job!

  • vegus2020-01-22 16:00

    vegus168 line is one of the channels to access the online football betting website in full. Customers can enter this channel. To apply for membership And is a way to fully access information on the website Which the website offers many fun online gambling games, whether it's betting, betting, betting, baccarat

  • 먹튀검증2020-01-26 15:31

    Simply want to say your article is as astounding.

    The clarity in your publish is just nice and that i could assume you are an expert on this subject.
    Fine with your permission allow me to take hold of
    your RSS feed to keep up to date with impending post.
    Thanks one million and please keep up the enjoyable work.

  • CHARITY2020-02-07 14:16

    Awesome blog! I enjoy the work you present here. Thanks. if you love some site lets check our site Thank you!
    https://hky7.com 토토사이트

  • jasagol888.xyz2020-02-20 21:05

    Greetings! Very helpful advice in this particular post!
    It's the little changes that make the largest changes.
    Many thanks for sharing!

  • 바카라사이트2020-03-05 18:37

    Hope you’ve enjoyed these top 10 slot tips and tricks that will potentially increase your popularity among your friends and other gamblers. From playing the world’s most popular slots online to visiting an iconic land-based casino in a top gambling destination – there are plenty of ways to stay fashionable in the betting world. https://www.dcman900.com

  • 모모벳2020-03-11 10:22

    Great to end up going to your weblog once more, it has been a very long time for me. Pleasantly this article I've been sat tight for so long. I will require this post to add up to my task in the school, and it has identical subject together with your review. Much appreciated, great offer.

  • JENNY2020-03-12 11:19

    I dont know how I ended up here but this site is so good. Visit our sites too

  • Jenny2020-03-31 11:10

    Thank you for sharing such wonderful thought. I'll definitely dig this. Please keep writing because I want to read more from your blog. If you also want something interesting visit our website too
    https://yhn707.com/ 에볼루션 카지노 사이트
    https://pmx7.com/ 안전놀이터 추천

  • 카지노사이트2020-04-10 18:11

    To be successful you have to be selfish, or else you never achieve. And once you get to your highest level, then you have to be unselfish. Stay reachable. Stay in touch. Don't isolate.
    https://oneroomlg.xyz 해외토토사이트
    https://oneroomlg.xyz 카지노사이트

  • Yuan2020-04-15 18:03

    Great website you have got here. Keep up the good work and thanks for sharing your blog site it really help a lot.
    https://yhn707.com/ 에볼루션 카지노 사이트
    https://pmx7.com/ 안전놀이터 추천

  • https://projempol99.site2020-04-26 09:07

    Fantastic blog you have here but I was wondering if you knew of any community forums that cover the same
    topics talked about in this article? I'd really like to be a part of group where I can get suggestions from other experienced people that share the same interest.
    If you have any suggestions, please let me know. Thanks!

  • 바카라사이트2020-04-27 16:46

    Use a pencil shim when the keyhole is stiff.
    http://xn--7m2b7ov9poqh97o.vom77.com - 룰렛사이트
    http://xn--vf4b27jfzgc8d5ub.vom77.com - 포커사이트
    http://xn--o80b27i69npibp5en0j.vom77.com - 온라인카지노
    http://xn--mp2bs6av7jp7brh74w2jv.vom77.com - 슬롯머신사이트
    http://xn--o80b67oh5az7z4wcn0j.vom77.com - 모바일카지노
    http://xn--o80b910a26eepc81il5g.vom77.com - 카지노사이트
    http://xn--oi2ba146a24mbtbtvt.vom77.com - 온라인바카라
    http://xn--ij2bx6j77bo2kdi289c.vom77.com - 블랙잭사이트
    http://xn--o80by81agsfmwa85o.vom77.com - 카지노주소

  • https://jasagol188.site/2020-04-30 01:03

    It's truly very difficult in this full of activity life to listen news on Television, so I only use web for
    that reason, and take the most up-to-date news.

  • Joy2020-05-13 22:36

    Good day!this is amazing keep it up ^^

  • JUN SY2020-05-26 12:15

    All i can say is great job, i was so happy and contended about this article. Please visit my website below and let me know the feedback.

    https://pmx7.com/안전놀이터 추천

  • VEDA2020-05-27 09:57

    Wow, this is so interesting .
    Might recommend this to my friends.
    Please visit our website too.
    https://pmx7.com/ 안전놀이터 추천

  • KIM2020-05-28 12:45

    Hi friends. How are you?
    Have a nice day!
    Please visit our interesting website.
    https://txk7.com/ 바둑이사이트

  • 럭키걸 Lucky girl2020-06-02 13:51


  • 럭키걸 Lucky girl2020-06-02 13:51

    행운을 드립니다^^