Treat Jekyll 模板使用教程

随笔3周前发布 桃林麦香
28 0 0

Treat Jekyll 模板使用教程

treat-jekyll-template:cake: Food/baking blog template for Jekyll项目地址:https://gitcode.com/gh_mirrors/tr/treat-jekyll-template

1. 项目的目录结构及介绍

Treat Jekyll 模板是一个专为食品和烘焙博客设计的模板。以下是其基本的目录结构和各部分的简要介绍:

  1. treat-jekyll-template/

  2. ├── _config.yml

  3. ├── _data/

  4. │ ├── footer.yml

  5. │ ├── navigation.yml

  6. │ └── sidebar.yml

  7. ├── _includes/

  8. │ ├── disqus.html

  9. │ ├── footer.html

  10. │ ├── head.html

  11. │ ├── header.html

  12. │ ├── pagination.html

  13. │ └── sidebar.html

  14. ├── _layouts/

  15. │ ├── default.html

  16. │ ├── page.html

  17. │ └── post.html

  18. ├── _posts/

  19. │ └── YYYY-MM-DD-title.md

  20. ├── _sass/

  21. │ └── main.scss

  22. ├── about/

  23. │ └── index.html

  24. ├── assets/

  25. │ ├── css/

  26. │ ├── images/

  27. │ └── js/

  28. ├── categories/

  29. │ └── index.html

  30. ├── feed.xml

  31. ├── index.html

  32. └── recipes/

  33. └── index.html

  • _config.yml: 项目的配置文件。
  • _data/: 存储数据文件,如页脚、导航和侧边栏的配置。
  • _includes/: 包含可重用的HTML片段。
  • _layouts/: 定义页面布局的模板。
  • _posts/: 存储博客文章的目录。
  • _sass/: 存储SCSS文件,用于生成CSS。
  • about/: 关于页面的内容。
  • assets/: 存储CSS、图片和JavaScript文件。
  • categories/: 分类页面的内容。
  • feed.xml: RSS订阅文件。
  • index.html: 主页内容。
  • recipes/: 食谱页面的内容。

2. 项目的启动文件介绍

项目的启动文件是 index.html,这是网站的主页。它使用 _layouts/default.html 布局,并包含导航栏、侧边栏和主要内容区域。

3. 项目的配置文件介绍

项目的配置文件是 _config.yml,它包含了网站的基本配置信息,如站点名称、作者信息、Google Analytics 和 Disqus 的配置等。以下是一些关键配置项的示例:

  1. title: Treat

  2. email: your-email@example.com

  3. description: >- # this means to ignore newlines until "baseurl:"

  4. Write an awesome description for your new site here. You can edit this

  5. line in _config.yml. It will appear in your document head meta (for

  6. Google search results) and in your feed.xml site description.

  7. baseurl: "" # the subpath of your site, e.g. /blog

  8. url: "http://example.com" # the base hostname & protocol for your site, e.g. http://example.com

  9. twitter_username: jekyllrb

  10. github_username: jekyll

  11. # Build settings

  12. markdown: kramdown

  13. theme: minima

  14. plugins:

  15. - jekyll-feed

  16. # Google Analytics

  17. google_analytics: UA-XXXXXXXX-X

  18. # Disqus

  19. disqus:

  20. shortname: your-disqus-shortname

  • title: 网站的标题。
  • email: 联系邮箱。
  • description: 网站的描述。
  • baseurl: 网站的子路径。
  • url: 网站的基本URL。
  • twitter_username: Twitter用户名。
  • github_username: GitHub用户名。
  • markdown: 使用的Markdown处理器。
  • theme: 使用的主题。
  • plugins: 使用的插件。
  • google_analytics: Google Analytics跟踪ID。
  • disqus: Disqus短名称。

通过这些配置,可以轻松地定制和部署你的食品和烘焙博客。

treat-jekyll-template:cake: Food/baking blog template for Jekyll项目地址:https://gitcode.com/gh_mirrors/tr/treat-jekyll-template

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...