diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index f846eebe2..31b874437 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -42,6 +42,9 @@ jobs: - name: Install mdBook mermaid run: | (test -x ~/.cargo/bin/mdbook-mermaid || (cd && cargo install mdbook-mermaid --locked)) + - name: Install gelatyx + run: | + (test -x ~/.cargo/bin/gelatyx || (cd && cargo install gelatyx --locked)) - name: Build run: | source $HOME/.cargo/env diff --git a/ci/build-docs.sh b/ci/build-docs.sh index 90500ef75..915e2d06f 100755 --- a/ci/build-docs.sh +++ b/ci/build-docs.sh @@ -7,6 +7,8 @@ python3 ci/subst-release-info.py || exit 1 python3 ci/generate-docs.py || exit 1 mdbook-mermaid install docs mdbook build docs +gelatyx lua --file docs/**/*.md --language-config ci/stylua.toml +gelatyx lua --file docs/**/*.md --language-config ci/stylua.toml --check rm gh_pages/html/README.markdown cp assets/fonts/Symbols-Nerd-Font-Mono.ttf gh_pages/html/fonts/ diff --git a/ci/stylua.toml b/ci/stylua.toml new file mode 100644 index 000000000..5a59fa439 --- /dev/null +++ b/ci/stylua.toml @@ -0,0 +1,8 @@ +# Reference: https://github.com/JohnnyMorganz/StyLua#options + +column_width = 78 +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 2 +quote_style = "AutoPreferSingle" +call_parentheses = "None"