![]() ![]()
TL DR GitHub pages provides free website hosting optionally using your own domain name and will process a Jekyll site for you. You could preform pre Jekyll tasks like bundling and minification, or post Jekyll tasks like pushing the compiled site up to GitHub automatically using grunt-gh-pages. GruntĪnd if you’re building locally and pushing the resulting site to GitHub pages, you can get even more creative with your build pipeline using Grunt. When you start thinking creatively it’s surprising how much you can do with a static site with no backend. Some cool Jekyll plugins allow you to implement site search, create tag or category listings and have page redirects. Once jekyll is installed you can use jekyll build to compile your static site or jekyll serve to compile, spin up a web server and watch the file system for changes.Īnd there’s another big benefit to running Jekyll locally, plugins! Plugins extend the functionality of Jekyll but unfortunately they aren’t supported by GitHub pages, so if you want to use a plugin you’ll need to build you site locally and push up the resulting _site folder to GitHub. $ gem install jekyllĬonfiguration file: /Users/paul/Projects/demo/_config.ymlĭestination: /Users/paul/Projects/demo/_siteĪuto-regeneration: enabled for '/Users/paul/Projects/demo'īut Jekyll isn’t exclusive to GitHub pages, Jekyll comes packaged as a Ruby gem that allows you to install it on your local machine. Apart from templates, it supports SASS, extensionless urls, markdown, textile, even custom domains on GitHub pages. ![]() GEM INSTALL JEKYLL ANGULAR GENERATORLiquid defines tags for flow control and filters for acting on variablesįor a static site generator Jekyll is very feature rich and you’ll be surpised what you can accomplish with it. Jekyll uses the Liquid templating language developed by Shopify which will feel familiar for anyone who’s worked with handlebars, mustache or angular. These will override any settings in the site config (_config.yaml). In the frontmatter you can can define the layout to use, the page title and a for the page among other configuration settings. GEM INSTALL JEKYLL ANGULAR CODE_layouts/posts.html: Ī Jekyll content page will start with Frontmatter, that’s all the code between the 2 rows of hyphens at the start of the file. Any folder that Jekyll doesn’t recognise is copied verbatim to the static site and you can tell Jekyll to ignore files or folders and not copy them using configuration settings. | ├── -why-every-programmer-should-play-nethack.textileĪ typical Jekyll folder structure contains a _layouts folder for your base templates, an _includes folder for partial includes that can be used by layouts or pages, a _config.yaml file which defines site configuration, and other files and folders that contain your site content. | └── on-simplicity-in-technology.markdown Jekyll is blog aware, which means it can do a lot of what your Wordpress site can, it understands published and draft posts, tag, categories, s, post listings and excerpts among other concepts. GitHub pages runs Jekyll on your site by default, but because you probably aren’t clashing with Jekyll’s folder conventions you won’t notice. It’s basically what your CMS is doing on every page request, but it does it just once. Jekyll is a static site generator, which means it takes templates, pages and data from a convention based folder structure, and turns it into a static site for you. Create a new orphaned branch called gh-pages within your project repo on GitHubįree static web site hosting at GitHub is great but what makes GitHub pages stand out is Jekyll.Push your website files into the master branch.Create a repo named on GitHub (where username is your GitHub username).GitHub pages is a free offering from GitHub that allows you to host one website per account and one website per project, you can even use your own domain name. And you’ll be in good company, besides my own site, the Bootstrap, React and Yeoman sites all use GitHub pages. GitHub pages is a great solution to becoming CMS free but still have a maintainable and extensible site. So in rebuilding this site I’ve found a new platform to host it which supports my workflow properly, GitHub pages. And it doesn’t enable me to keep any of my content in Git, which is most important, I have to take regular database backups for this. In order to keep all my site source in Git I have to synchronise the changes that happen automatically on the server, like updates and uploads / media files back to my working copy to commit them. ![]() GEM INSTALL JEKYLL ANGULAR UPDATEI hated having to update WordPress continually to ensure my site is secure. I’d be happier to write the HTML myself if it wasn’t such a maintenance pain keeping consistency across all the pages. This post is adapted from a presentation I gave at What Do You Know Melbourne on 3 September 2015įor years I’ve used Wordpress to host my site, which has been great but it’s overkill for what I need. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |