Skip to content

Commit

Permalink
Github pages:Try enabling mermaid rendering and adding index pages
Browse files Browse the repository at this point in the history
  • Loading branch information
JervenBolleman committed Jun 25, 2024
1 parent 6a4107b commit ca13815
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/publish_github_pages.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Publishes the Markdown pages.
name: CI
name: Publish to github-pages

on:
push:
Expand Down Expand Up @@ -37,6 +37,9 @@ jobs:
- name: generate markdown
run: java -jar target/sparql-examples-util-*-uber.jar -i examples/ -m

- name: generate indexes
run: for d in $(ls examples/);do if [[ -d examples/"$d" ]];then cd examples/"$d";for e in $(ls *.md);do echo "[${e:0:-3}](./${e:0:-3})";done> index.md;cd ../../;fi;done

- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
markdown: GFM
1 change: 1 addition & 0 deletions _includes/footer-scripts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include mermaid.html %}
11 changes: 11 additions & 0 deletions _includes/mermaid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
<script>
$(document).ready(function () {
mermaid.initialize({
startOnLoad:true,
theme: "default",
});
window.mermaid.init(undefined, document.querySelectorAll('.language-mermaid'));
});
</script>

9 changes: 9 additions & 0 deletions _layouts/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="{{ page.language | default: site.language | default: 'en' }}">
{% include head.html %}
<body>
{{ content }}

{% include footer-scripts.html %}
</body>
</html>

0 comments on commit ca13815

Please sign in to comment.