• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

danielmcgraw/Jekyll-Base: Base files and folder structure for Jekyll

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

danielmcgraw/Jekyll-Base

开源软件地址:

https://github.com/danielmcgraw/Jekyll-Base

开源编程语言:

HTML 100.0%

开源软件介绍:

Jekyll Base

This is a base that will get you started with jekyll, created by Daniel McGraw (@danielmcgraw).

Usage

Check out my post series on how to use Jekyll Base to create your own Jekyll powered blog.

Structure

.  
|-- .gitignore  
|-- README  
|-- _config.yml  
|-- _layouts  
|   |-- layout.html  
|   `-- post.html  
|-- _posts  
|   `-- 1985-10-26-Test-Post.md  
`-- index.html  

Lets take a look at what each of these do.

.gitignore

This file is not manditory for a proper Jekyll install, but is useful if you are like me and use a mac (ignore the DS_Store) or emacs (ignore the autosave files). If you have any other files or folders that need ignoring toss them in here.

README

This file is not manditory for a proper Jekyll install, but is recomended by GitHub for all repositories. Toss a simple description of your site and its make up in here if you would like.

_config.yml

This is where you will be putting your Jekyll configuration options. If this file is omitted Jekyll will use its defualts to build your site. You can find the configuration options and default configuration here.

_layouts

This folder is where you will be putting all your layout templates. I have added layout.html and post.html so you can get an idea of how they are strutured and used.

layout.html

This is the base template for our site. There are no naming conventions, but if you choose to change this file's name make sure you update all the layout references in your file's YAML Front Matter blocks.

post.html

This is the bast template for each of our posts. Again there are no naming conventions, but make sure you update the required files YAML Front Matter blocks if you do change its name. To learn more about the use of YAML Front Matter check out this page.

_posts

This is your posts folder. You will be putting your blog posts in here. Notice the naming convention that is used. You will want to name your files with the publish date preceeding the posts title all seperated by dashes (Year-Month-Day-Title-Of-The-Post.md). The post date that you see is pulled straight from this filename so make sure you lable your files right.

1985-10-26-Test-Post.md

This is a simple blog post. Notice that we are using markdown. To learn more about markdown check out the markdown syntax documentation. Also notice that there is YAML Front Matter in this file specifying the layout it will use and the title of the post. Layout is one of a couple predefined global variables. You can also specify custom variables in the YAML Front Matter. To learn more about the use of YAML Front Matter check out this page.

index.html

This is used to render your sites index. It is essentially a post loop wrapped in your base layout.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
kkninjae/book: A Jekyll Theme发布时间:2022-07-07
下一篇:
DavidForster/strata-jekyll: A blog theme for the Jekyll static site generator发布时间:2022-07-07
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap