A pandoc uikit html template, to convert any document in a website automatically.
Includes a sticky adaptive menu and some other nice things: Example Result.
git clone https://github.com/igor-lirussi/pandoc-uikit
pandoc https://raw.githubusercontent.com/jgm/pandoc/master/MANUAL.txt -o index.html -f markdown --template ./pandoc-uikit/standalone.html --toc --toc-depth=2
Start a server in current directory, e.g.:
php -S localhost:8080
Point a browser to http://localhost:8080
Clone this template-repo in your repo as in "Install" section or with the action below:
- name: Clones your git repo
uses: actions/checkout@v2
- name: Clones Pandoc template repo
run: |
git clone https://github.com/igor-lirussi/pandoc-uikit
Convert from tex (or other docs) to html
- name: Pandoc tex conversion
uses: docker://pandoc/latex:latest
with:
args: >-
-d ./pandoc-uikit/config.yaml
-o ./index.html
main.tex
Commit in a new branch (gh-pages)
- name: Commit the new gh-pages html
run: |
git add ./index.html #save it from clean
git commit -m "Invisible commit" #to allow the checkout later without files in staging area
rm -rdf pandoc-uikit/.git* #removes .github folder of pandoc otherwise it does NOT get deleted by clean
git clean -fxd #removes tracked files uncommitted (log generated by the docker, the /pandoc-uikit repo, ...
git checkout gh-pages
# delete everything
git rm -rf .
git clean -fxd
#get again this repo
git clone https://github.com/igor-lirussi/pandoc-uikit
rm -rdf pandoc-uikit/.git*
#get also the folders needed from the main branch
git checkout -f main Extra
git checkout -f main index.html
git status
# git cherry-pick main, alternatives
git add .
git commit -m 'Updated gh-pages'
git push
google analytics:
--variable=analytics:XXX-ANALYTICS-CODE
uikit CSS
--variable=template_css:/path/to/uikit.css
MIT © Dennis Iversen