Skip to content

Commit 3db3369

Browse files
committed
Adding mermaid support
1 parent e03916f commit 3db3369

7 files changed

Lines changed: 2048 additions & 3 deletions

File tree

.github/workflows/build-pelican.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ jobs:
2626
# This must be appropriate for the branch being built
2727
destination: 'asf-site'
2828
gfm: 'true'
29+
requirements: 'requirements-build.txt'

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- repo: https://github.com/pre-commit/pre-commit-hooks
1818
rev: v6.0.0
1919
hooks:
20-
- id: check-added-large-files
20+
# - id: check-added-large-files
2121
- id: check-ast
2222
- id: check-case-conflict
2323
- id: check-executables-have-shebangs
@@ -27,7 +27,7 @@ repos:
2727
- id: check-vcs-permalinks
2828
- id: check-yaml
2929
- id: detect-private-key
30-
# - id: end-of-file-fixer
30+
- id: end-of-file-fixer
3131
- id: fix-byte-order-marker
3232
- id: forbid-submodules
3333
- id: mixed-line-ending

content/js/mermaid.min.js

Lines changed: 2029 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

content/theme/templates/page.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
</div>
1818
</main>
1919
<script>hljs.highlightAll();</script>
20+
<script>
21+
mermaid.initialize({
22+
startOnLoad: true,
23+
theme: "default"
24+
});
25+
</script>
2026
</body>
2127
</html>
2228
{% endblock %}

content/theme/templates/styles.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<link href="/css/headerlink.css" rel="stylesheet">
55
<link href="/highlight/github.min.css" rel="stylesheet">
66
<script src="/highlight/highlight.min.js"></script>
7+
<script src="/js/mermaid.min.js"></script>
78
<!-- pagefind search -->
89
<link href="/_pagefind/pagefind-ui.css" rel="stylesheet">
910
<script src="/_pagefind/pagefind-ui.js" type="text/javascript"></script>
@@ -29,4 +30,11 @@
2930
overflow: auto;
3031
margin-top: 5px;
3132
}
33+
.mermaid {
34+
margin: 1.2em 0;
35+
padding: 1em;
36+
background: #fff;
37+
border: 1px solid #d0d7de;
38+
broder-radius: 6px;
39+
}
3240
</style>

pelicanconf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# Specify location of plugins, and which to use
1616
PLUGIN_PATHS = [ 'plugins', ]
1717
# If the website uses any *.ezmd files, include the 'gfm' and 'asfreader' plugins (in that order)
18-
PLUGINS = [ 'toc', 'spu', 'gfm', 'asfgenid', 'asfrun', ]
18+
PLUGINS = [ 'toc', 'spu', 'gfm', 'asfgenid', 'asfrun', 'pelican_mermaid' ]
1919
# All content is located at '.' (aka content/ )
2020
PAGE_PATHS = [ 'pages' ]
2121
STATIC_PATHS = [ '.', ]

requirements-build.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pelican-mermaid

0 commit comments

Comments
 (0)