Comments (5)
这个你找一下landscape的主题看一下是否支持,本主题是基于其基础二次开发的。另外,这可能是hexo自带的功能,你看网上搜索hexo相关的修改支持吗,如果有不支持反馈一下,下个版本会添加。
from hexo-theme-cafe.
之前找了一下,大概意思就是在提交文章的时候添加一个控制字段,然后在把render的部分包装一下,比如可以参考这个 以及这个,但是我不太熟悉hexo的相关实现文件,这个主题不太确定应该在哪个地方改。@giscafer
from hexo-theme-cafe.
对于ejs的相关语法不是太熟悉,就在_partial/archive.ejs中加了简单的判断
<% if (post.visible){ %>
<%- partial('article', {post: post, index: true}) %>
<% } %>
我本来想设置成默认的时候是显示,加了某个参数的时候是不显示,但是不知道这里具体应该怎么写也没弄好,就临时先这样弄了(加了参数时候显示不加参数的时候不显示)。
from hexo-theme-cafe.
@wangzhezhe 改成这样
<% if ( post.visible!==false){ %>
<%- partial('article', {post: post, index: true}) %>
<% } %>
除非文章加visible:false
,不然都会默认显示
from hexo-theme-cafe.
谢谢帮助!@giscafer
from hexo-theme-cafe.
Related Issues (20)
- 图片被倒立 HOT 1
- 你好,-- 无法渲染
- 报错 真的不知道我做了什么啊 HOT 8
- 首页文章预览 HOT 2
- 继续阅读全文无法显示 HOT 1
- 标题栏固定问题? HOT 1
- “关于”页面里面添加内容 HOT 1
- 文章目录的fixed效果去掉可能更好些,加油! HOT 1
- 请问如何启动? HOT 1
- "/tags" and "/categories" 頁面日期調整 HOT 1
- 怎么做到点击另外的分类不会覆盖前面一个窗口? HOT 1
- 怎么做二级目录分类呀 HOT 1
- 发现左上角多一行 导航 HOT 1
- 搜索功能无法使用吗? HOT 1
- 使用教程说明太简单了 HOT 1
- 文章目录自动添加序号与图片自动添加底部标题 HOT 4
- 报告一个bug:主页的向左向右翻页被转义了, HOT 1
- 请问如何定制首页呢? HOT 1
- 是否可以加入访问量统计的功能呢
- fix: 这个提交修复ejs模版中include导入文件的bug HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexo-theme-cafe.