- Preview in local:
sudo apt-get install ruby ruby-dev zlib1g-dev
sudo gem install github-pages
jekyll serve _config.yml --watchIf you are writing a post with a future publication date and you want to check
it out in local, pass --future to jekyll. Otherwise, it won't be generated
until the publication date:
jekyll serve _config.yml --watch --future- Preview in local: Docker
The Dockerfile builds a native image for your machine's architecture (amd64
or arm64) with all the gems already installed. It serves the blog with
--future, so posts with a future date are also generated, and it regenerates
the site when files change:
docker compose up --buildBehind a TLS-inspecting proxy (such as Zscaler), pass its root CA so the gems can be installed when building the image:
CA_CERT=/path/to/root-ca.crt docker compose up --buildThe image only needs to be rebuilt when the Dockerfile changes. After that,
docker compose up starts the server right away.
See blog at localhost:4000
- Create new post: Just create the file with the format YEAR-MONTH-DAY-title.md
Each post needs a few fields and there are optional fields as well for SEO optimization
---
layout: post
comments: false
title: "Short meaningful title to display on the web page"
meta_title: "(optional) A longer more descriptive title for search engines to index"
description: "A short summary of the post that will be displayed in the search engine results"
last_modified_at: "(optional) the date the post was last updated to improve search results and relevance"
keywords: "(optional) comma, separated, values, for seo optimization"
---Note: SEO Structured Data - This is was attempted but is currently undefined. It was previously done with TechArticle however that probably is not list by Google's supported list
As Jekyll 4.4 has not been released yet, some custom plugins have been added to provide that functionality:
- line_highlighting.rb: will provide a liquid API to highlight lines on code block emulating native not yet released functionality
- md_hl_syntax_to_liquid.rb: provide a kramdown API to previous liquid syntax
- inline_highlight.rb: plugin to allow highlight code in-line
Also, when dealing with line highlighting on a enumerate list, kramdown will break the auto enumeration.
The only solution found by the team is to declare each list item as <number>
The basically blocks auto-numbering for numbered items.