Skip to content

Commit

Permalink
Add template support, GH pages
Browse files Browse the repository at this point in the history
  • Loading branch information
snomos committed Nov 18, 2023
1 parent 1b7dbf1 commit 66dac36
Show file tree
Hide file tree
Showing 11 changed files with 802 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/docsygen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Docs
on: [push]
jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: dict

# Mermaid processing starts here:
- name: get list of files
id: getfile
run: |
echo "::set-output name=files::$(find dict/docs -name '*.md' | xargs)"
- name: print list of files for debugging
run: |
echo ${{ steps.getfile.outputs.files }}
# The actual Mermaid compilation
- name: compile mermaid
uses: divvun/compile-mermaid-markdown-action@main
with:
files: ${{ steps.getfile.outputs.files }}
output: 'dict/docs/mermaid-svgs'
env:
HIDE_CODEBLOCKS: 1
# The next one must be declared, with an empty value, for paths to work for us:
ABSOLUTE_IMAGE_LINKS:
OUTPUT_FILE_TYPE: "svg"

- name: list generated svg fils
run: |
cd dict && ls -l docs/mermaid-svgs
# Mermaid processing ends here

- name: deploy gh pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dict/docs/
enable_jekyll: true
53 changes: 53 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# http://www.gnu.org/software/automake

Makefile.in
/ar-lib
/mdate-sh
/py-compile
/test-driver
/ylwrap
.deps/
.dirstamp

# http://www.gnu.org/software/autoconf

autom4te.cache
/autoscan.log
/autoscan-*.log
/aclocal.m4
/compile
/config.cache
/config.guess
/config.h.in
/config.log
/config.status
/config.sub
/configure
/configure.scan
/depcomp
/install-sh
/missing
/stamp-h1

# https://www.gnu.org/software/libtool/

/ltmain.sh

# http://www.gnu.org/software/texinfo

/texinfo.tex

# http://www.gnu.org/software/m4/

m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4

# Generated Makefile
# (meta build system like autotools,
# can automatically generate from config.status script
# (which is called by configure script))
Makefile
.DS_Store
12 changes: 12 additions & 0 deletions .gut/delta.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
template = ""
rev_id = 3
template_sha = "50f983ed6da8e78c9c3344a18d6a46e3f843236c"

[replacements]
__LICENSE__ = "CC-BY-4.0"
__UND2C_SRC__ = "se"
__UND2C_TRG__ = "es"
__UNDEFINED_SOURCE__ = "North Sámi"
__UNDEFINED_TARGET__ = "Spanish"
__UND_SRC__ = "sme"
__UND_TRG__ = "spa"
24 changes: 24 additions & 0 deletions .gut/template.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This template merge config file lists:
#
# - name: name of template stuff
# - patterns: strings to do text substitution on
# - rev_id: a sequential revision id of the template repo (manually maintained for now)
# - required: a full list of all files always merged
# - optional: a full list of all files merged when the --optional flag is used with `gut template`
# - ignored: never used in merging, only when populating new repos

name = "Dictionary Template"
patterns = ["sme", "se", "North Sámi", "spa", "es", "Spanish", "CC-BY-4.0"]
rev_id = 3
required = [".gitignore",
".github/workflows/docsygen.yml",
"docs/_config.yml",
"docs/_includes/toc.html",
"docs/_layouts/default.html",
"docs/assets/css/style.scss"]

optional = ["README.md",
"docs/index.md"]

ignored = ["LICENSE",
".gut/delta.toml"]
Loading

0 comments on commit 66dac36

Please sign in to comment.