Adding Mermaid and MathJax Support & Fix Google Analytics to Arberia Hugo Theme #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Vincenzo Antedoro Arberia Hugo Theme Developer I Add to your theme MathJax, Mermaid and fix Google Analytics with this instructions
Configuration Changes
1. Update
config.toml
in GitHub Pages2. Create Mermaid Render Hook
Create
/layouts/_default/_markup/render-codeblock-mermaid.html
:3. Create Minimal Mermaid Shortcode
Create
/layouts/shortcodes/mermaid.html
:4. Add Scripts to
head.html
In
/themes/arberia/layouts/partials/head.html
, add before</head>
:Also when you are going to use Mermaid you must add the following to the file at:
yoursite.github.io/content/posts/your-new-post.md
there:
mermaid: true
Example:
Usage Examples
Mermaid Diagram
and see:
MathJax Equations
$E = mc^2$
$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$
and see:
Pull Request Description
These changes add native support for Mermaid diagrams and MathJax equations in the Arberia Hugo theme:
Tested on Hugo v0.141.0+extended.
Improving Google Analytics Integration in Arberia Hugo Theme
Configuration Changes
1. Update
config.toml
in GitHub Pages2. Modify
/themes/arberia/layouts/partials/head.html
where G-XXXXXXXXXX is an example of the Google Analytics ID
Key Improvements
.Site.Params.googleAnalytics
Steps to Set Up
config.toml
Benefits