Directories

  • _site This is where Jekyll puts your compiled site. It’s what you send to the public facing server(s) when you deploy.
  • . (dot – the top-level directory of your project) Jekyll copies files from the root of your project into _site. There is an exclude list in config.yml.
  • ---(.*\n)+--- causes Jekyll to process Liquid in the file.
  • _layouts is where you put layouts. layout: _filename_ in the front matter to use a layout. {{ content }} to interpolate the page content in the layout.
  • _includes is where you put files to include. {% include _filename_ %} to include the include file in a page or layout.
  • _data stores .yml files that can hold data you can access from Liquid tags. {{ site.data._filename_._key_ }}.
  • assets stores assets, typically in css, images, and js.

    • Put a Sass file in assets/css that has all your @imports.
  • _assets (no possibility of confusion here.)

    • Put the imported Sass files here.
  • _posts is for blog posts. The special file name that includes the publish date is significant. yyyy-mm-dd-_title_.md.
  • Add jekyll-sitemap and jekyll-feed to the Gemfile for a site map, and to generate an RSS feed. See the docs. Add {% feed_meta %} to get the RSS feed.

Miscellaneous

  • {{ page.title | smartify }}

Sass

With CSS or Sass part of an npm package, you need to add the following to your _config.yml:

sass:
  load_paths:
    - _sass
    - node_modules

Docker

  • Use lenchoreyes/jade:rails-app-3.3-bookworm with a simple compose.yml:
services:
  jekyll:
    image: lenchoreyes/jade:rails-app-3.3-bookworm
    stdin_open: true
    tty: true
    volumes:
      - ${PWD}:/app
    user: 1000:1000
    ports:
      - "4000:4000"
      - "35729:35729"
    # command: jekyll serve -H 0.0.0.0 -w --livereload