一个简单的 Jekyll 网站
This is an example of a very basic Jekyll site. It lays down the basic folder structure, uses very basic CSS to make it look presentable and leaves everything else up to you.
This is a perfect starting point for building your own Jekyll site.
Development time dependencies:
_config.yaml to use Maroku)Run-time dependencies:
To use this template:
_config.yaml with your name, blog title, description and etc...style.css and HTML files in _layouts to personalize_posts/ - work off the sample posts therejekyll serve to generate site locallyhttp://localhost:4000 and make sure it looks good_site to your serverFollowing features are available:
To use the category feature simply add category tag at the top of your post:
category: some_category_nameYou can specify multiple categories using a comma separated list.
The plugins in the _plugins directory are not compatible with Github pages. If you want to deploy your site to Github, you might need to give up on these plugins.
You can deploy to a subdirectory. For example instead of running your site at http://foo.tld/ you can instead put it in http://foo.tld/blog/. To do this use the url and baseurl settings in _config.yaml. The former is used for absolute links (like in the RSS feed) while the latter is used for relative links (like everywhere on the front page). For example if you set it to:
baseurl: /blog
url: http://foo.tld/blogThen the html files will still be generated in _site but all the links will be generated either relative to /blog or using the absolute url of http://foo.tld/blog.
Note: when you run the built-in Jekyll server you will need to access your site by going to http://localhost:4000/blog.
You can use Grunt.js to automatically validate the HTML in your generated site. First install the dependencies:
npm installYou can use the following Grunt commands:
grunt jshint - to lint your scripts.js file using JSHintgrunt csslint - to lint your styles.css filegrunt validation - to validate all the HTML files in _sitePlease note that validation is done against the W3C server. If you have many pages, you may get temporarily locked out for abuse.
To lint js and css simultaneously simply run grunt with no parameters. Validation is only on-demand because of the potential lockout.
This sample layout uses plugins created by Dave Perret to generate categories and sitemaps. Credit where credit is due. Please see the _plugins directory for details.
The web font icons have been created based on the Typicon set and customized via the Fontello service.
Just so you can see how it looks:
Front page:
Individual post:
Archive page:
暂无开放 Issues,或尚未同步最近议题。