Jekyll 模板项目教程

Jekyll 模板项目教程

edition-jekyll-template:books: Product documentation template for Jekyll项目地址:https://gitcode.com/gh_mirrors/ed/edition-jekyll-template

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

.
├── _config.yml
├── _data
│   └── navigation.yml
├── _includes
│   ├── footer.html
│   ├── head.html
│   ├── header.html
│   ├── hero.html
│   ├── page_blocks.html
│   └── scripts.html
├── _layouts
│   ├── default.html
│   ├── page.html
│   └── post.html
├── _posts
│   └── 2023-01-01-welcome-to-jekyll.markdown
├── _sass
│   ├── _base.scss
│   ├── _layout.scss
│   └── _syntax-highlighting.scss
├── assets
│   ├── css
│   │   └── main.scss
│   ├── images
│   └── js
│       └── main.js
├── about.md
├── index.html
└── search.json

目录结构介绍

  • _config.yml: 项目的配置文件。
  • _data: 存储数据文件,如 navigation.yml 用于导航菜单。
  • _includes: 包含可重用的 HTML 片段,如页眉、页脚等。
  • _layouts: 定义页面的布局模板。
  • _posts: 存储博客文章。
  • _sass: 包含 SASS 文件,用于生成 CSS。
  • assets: 存储静态资源,如 CSS、JavaScript 和图片。
  • about.md: 关于页面。
  • index.html: 首页。
  • search.json: 用于搜索功能的 JSON 文件。

2. 项目的启动文件介绍

项目的启动文件是 index.html,它是网站的首页。这个文件通常包含了网站的基本结构和内容。在 Jekyll 项目中,index.html 会使用 _layouts 目录下的布局文件来渲染页面。

---
layout: default
---
<header>
  {% include header.html %}
</header>
<main>
  {{ content }}
</main>
<footer>
  {% include footer.html %}
</footer>

3. 项目的配置文件介绍

项目的配置文件是 _config.yml,它包含了 Jekyll 项目的所有配置选项。以下是一些常见的配置项:

title: 我的 Jekyll 网站
email: example@example.com
description: >-
  这是一个使用 Jekyll 构建的示例网站。
baseurl: "" # 网站的子路径,如 "/blog"
url: "http://example.com" # 网站的完整 URL
twitter_username: jekyllrb
github_username:  jekyll

# 构建设置
markdown: kramdown
theme: minima
plugins:
  - jekyll-feed

配置文件介绍

  • title: 网站的标题。
  • email: 联系邮箱。
  • description: 网站的描述。
  • baseurl: 网站的子路径。
  • url: 网站的完整 URL。
  • twitter_username: Twitter 用户名。
  • github_username: GitHub 用户名。
  • markdown: 使用的 Markdown 处理器。
  • theme: 使用的主题。
  • plugins: 启用的插件列表。

通过这些配置,可以自定义网站的外观和行为。

edition-jekyll-template:books: Product documentation template for Jekyll项目地址:https://gitcode.com/gh_mirrors/ed/edition-jekyll-template

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

华朔珍Elena

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值