Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如何隐藏指定文章 #52

Open
Huanhoo opened this issue Mar 7, 2017 · 1 comment
Open

请问如何隐藏指定文章 #52

Huanhoo opened this issue Mar 7, 2017 · 1 comment

Comments

@Huanhoo
Copy link

Huanhoo commented Mar 7, 2017

我有一些文章不想公开,希望对外隐藏,只可以通过url访问到,请问我该如何做?

@YenYuHsuan
Copy link

以下為小弟淺見,不訪參考看看
可以自己加

  • layout/ private_post.ejs
<% if (config.private_post == true){ 
  <%-partial('post')%>
%>
  • scaffold/ private_post.md
title: {{ title }}
subtitle:
private_post: true
date: {{ date }}
tags:

(因為幾乎都跟原來的post一樣,所以改起來應該比較輕鬆)
這時hexo new private_post "your-title"應該就可以了^__^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants