GithubHelp home page GithubHelp logo

搜索页咋配? about hexo-theme-xoxo HOT 5 CLOSED

kevinofneu avatar kevinofneu commented on September 17, 2024
搜索页咋配?

from hexo-theme-xoxo.

Comments (5)

KevinOfNeu avatar KevinOfNeu commented on September 17, 2024

source 下新建一个 search 目录,里面放一个 index.md 文件,内容如下

---
  title: Search
  date: 2016-05-24 13:45:13
  type: "search"
---

from hexo-theme-xoxo.

az031120103 avatar az031120103 commented on September 17, 2024

source 下的 search 目录
另外在 _config.yml 文件加了一行 search_dir: search
hexo g 构建报错

/study/hexo/blog/themes/xoxo/layout/partials/scripts.ejs:122
var search_path = "<%= config.search.path %>";
if (search_path.length == 0) {
search_path = "search.xml";
}

from hexo-theme-xoxo.

ubuntuvim avatar ubuntuvim commented on September 17, 2024

@az031120103 哥们你怎么解决这个报错的?

    120|         });
    121|       };
 >> 122|       var search_path = "<%= config.search.path %>";
    123|       if (search_path.length == 0) {
    124|         search_path = "search.xml";
    125|       }

from hexo-theme-xoxo.

shenzekun avatar shenzekun commented on September 17, 2024

@ubuntuvim @az031120103 得在非主题的配置文件 config_yml,配置如下:

search:
  path: search.xml
  field: post

而不是配置在主题的配置文件里, 文档写错了,建议博主改一下,代码里面明显写的是 config.search 而不是 theme.search,应该是把 search 的配置写在非主题配置文件里面,而不是主题配置文件里面@KevinOfNeu

from hexo-theme-xoxo.

KevinOfNeu avatar KevinOfNeu commented on September 17, 2024

@shenzekun 多谢

from hexo-theme-xoxo.

Related Issues (14)

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.