It’s mostly copy-paste of this source

Build from docker

Original Jekyll images uses Arch linux with minimal setup. And there is no requreeed fonts. We need to exted it

FROM jekyll/builder:4

RUN apk update && apk upgrade && \
    apk add --no-cache fontconfig ttf-dejavu

RUN mkdir /graphviz && \
  apk add --update graphviz

COPY ./Gemfile ./

RUN bundle install

# docker build . -t dehasi/jekyll:4.1

Update Gemfile to have asciidoc

gem "minima", github: "jekyll/minima" // (1)

group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"

  gem 'jekyll-asciidoc' // (2)
  gem 'jekyll-archives'
  gem 'asciidoctor-diagram'
end
  1. To be able to add extentions to headers

  2. Asciidoc gems

Update _config.yaml

plugins:
  - jekyll-feed
  - jekyll-asciidoc

asciidoctor: (1)
  attributes:
    - imagesdir=/assets/images
    - imagesoutdir=/assets/images
  1. To be able to use plantUml

Source highlighting

To highlight systax add the following header

:source-highlighter: rouge

Extend header to use latex

Create _includes/custom-head.html and add the following content

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    TeX: {
    equationNumbers: { autoNumber: "AMS" },
    tagSide: "right"
    },
    tex2jax: {
    inlineMath: [ ['$','$'], ["\\(","\\)"] ],
    displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
    processEscapes: true
    }
});
MathJax.Hub.Register.StartupHook("TeX AMSmath Ready", function () {
    MathJax.InputJax.TeX.Stack.Item.AMSarray.Augment({
    clearTag() {
        if (!this.global.notags) {
        this.super(arguments).clearTag.call(this);
        }
    }
    });
});
</script>
<script type="text/javascript" charset="utf-8"
src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS_CHTML">
</script>

Add the following headers

:eqnums:
:stem: latexmath

Then you can use equations \(C = \alpha + \beta Y^{\gamma} + \epsilon\)

This is a numbered equation \eqref{myequation}

PlantUML diagrams as well

jekyll asciidoc expample
\[\begin{equation}\label{myequation} c^2 = a^2 + b^2 + 5 \end{equation}\]