三级少妇乱公,日韩人妻无码一区二区三区综合部 ,欧美熟妇vdeoslisa18,人妻无码一区二区三区免费,人人妻人人澡人人爽国产一区

目錄結(jié)構(gòu)

一個基本的 Jekyll 站點(diǎn)通常是這樣的:

.
├── _config.yml
├── _data
|   └── members.yml
├── _drafts
|   ├── begin-with-the-crazy-ideas.md
|   └── on-simplicity-in-technology.md
├── _includes
|   ├── footer.html
|   └── header.html
├── _layouts
|   ├── default.html
|   └── post.html
├── _posts
|   ├── 2007-10-29-why-every-programmer-should-play-nethack.md
|   └── 2009-04-26-barcamp-boston-4-roundup.md
├── _sass
|   ├── _base.scss
|   └── _layout.scss
├── _site
├── .jekyll-metadata
└── index.html # 也可以是帶 front matter 的 'index.md' 文件
使用基于 gem 格式的主題的 Jekyll 站點(diǎn)的目錄結(jié)構(gòu)

Jekyll 3.2 版本開始,通過 jekyll new 命令創(chuàng)建的站點(diǎn)使用 基于 gem 格式的主題 來定義站點(diǎn)的外觀。最終生成的站點(diǎn)的默認(rèn)目錄結(jié)構(gòu)更加簡化:默認(rèn)情況下,_layouts、_includes_sass 目錄存在于主題的 gem 中。


minima 是當(dāng)前的默認(rèn)主題,并且執(zhí)行 bundle show minima 命令將顯示 minima 主題所包含的文件在當(dāng)前計算機(jī)上的存儲位置。

每個文件的功能:

文件 / 目錄 描述

_config.yml

存儲的是 配置 信息。其中許多 參數(shù)是可以在命令行中指定的,但是 在此文件中進(jìn)行設(shè)置會更容易些,并且你不必記住它們。

_drafts

草稿(Drafts)是未發(fā)布的文章(posts)。這些文章的文件名中沒有包含 日期: title.MARKUP。了解如何 使用草稿功能。

_includes

These are the partials that can be mixed and matched by your layouts and posts to facilitate reuse. The liquid tag {% include file.ext %} can be used to include the partial in _includes/file.ext.

_layouts

這里存放的是These are the templates that wrap posts. Layouts are chosen on a post-by-post basis in the front matter, which is described in the next section. The liquid tag {{ content }} is used to inject content into the web page.

_posts

Your dynamic content, so to speak. The naming convention of these files is important, and must follow the format: YEAR-MONTH-DAY-title.MARKUP. The permalinks can be customized for each post, but the date and markup language are determined solely by the file name.

_data

格式化的站點(diǎn)數(shù)據(jù)應(yīng)當(dāng)放在此目錄下。Jekyll 將自動加載此目錄下的所有數(shù)據(jù)文件(支持 .yml、 .yaml、.json、.csv.tsv 格式和擴(kuò)展名), 然后就可以通過 `site.data` 來訪問了。假定在 此目錄下有一個文件名為 members.yml 的文件,那么你可以通過 site.data.members 變量來訪問該文件中的內(nèi)容。

_sass

這些事可以導(dǎo)入(import)到 main.scss 文件中的 sass 代碼片段, main.scss 文件最終經(jīng)過處理之后形成一個獨(dú)立的樣式文件 main.css 并被用于整個站點(diǎn)。

_site

在 Jekyll 轉(zhuǎn)換完所有的文件之后,將在此目錄下放置生成的站點(diǎn)(默認(rèn)情況下)。 最好將此目錄添加到 .gitignore 文件中。

.jekyll-metadata

This helps Jekyll keep track of which files have not been modified since the site was last built, and which files will need to be regenerated on the next build. This file will not be included in the generated site. It’s probably a good idea to add this to your .gitignore file.

index.html or index.md and other HTML, Markdown files

Provided that the file has a front matter section, it will be transformed by Jekyll. The same will happen for any .html, .markdown, .md, or .textile file in your site’s root directory or directories not listed above.

其它文件/目錄

除了上面列出的目錄和文件外,其它所有目錄和文件(例如 cssimages 目錄, favicon.ico 等文件)都將一一復(fù)制到 生成的站點(diǎn)中。已經(jīng)有大量 站點(diǎn) 在使用 Jekyll 了,你可以參考這些站點(diǎn)以了解如何運(yùn)用這些文件和目錄。