Git Product home page Git Product logo

Comments (5)

giscafer avatar giscafer commented on September 22, 2024

这个你找一下landscape的主题看一下是否支持,本主题是基于其基础二次开发的。另外,这可能是hexo自带的功能,你看网上搜索hexo相关的修改支持吗,如果有不支持反馈一下,下个版本会添加。

from hexo-theme-cafe.

wangzhezhe avatar wangzhezhe commented on September 22, 2024

之前找了一下,大概意思就是在提交文章的时候添加一个控制字段,然后在把render的部分包装一下,比如可以参考这个 以及这个,但是我不太熟悉hexo的相关实现文件,这个主题不太确定应该在哪个地方改。@giscafer

from hexo-theme-cafe.

wangzhezhe avatar wangzhezhe commented on September 22, 2024

对于ejs的相关语法不是太熟悉,就在_partial/archive.ejs中加了简单的判断

  <% if (post.visible){ %>
    <%- partial('article', {post: post, index: true}) %>
  <% } %>

我本来想设置成默认的时候是显示,加了某个参数的时候是不显示,但是不知道这里具体应该怎么写也没弄好,就临时先这样弄了(加了参数时候显示不加参数的时候不显示)。

from hexo-theme-cafe.

giscafer avatar giscafer commented on September 22, 2024

@wangzhezhe 改成这样

  <% if ( post.visible!==false){ %>
    <%- partial('article', {post: post, index: true}) %>
  <% } %>

除非文章加visible:false,不然都会默认显示

from hexo-theme-cafe.

wangzhezhe avatar wangzhezhe commented on September 22, 2024

谢谢帮助!@giscafer

from hexo-theme-cafe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.