Commit 51338c45 authored by Jorge Tardío Rubio's avatar Jorge Tardío Rubio
Browse files

Commands updated

parent 508a6ef2
Pipeline #2566 passed with stages
in 1 minute and 27 seconds
......@@ -41,8 +41,8 @@ generate_pdfs:
script:
- mkdir -p public/pdfs/en
- mkdir public/pdfs/es
- mkdir -p assets/images
- cp -r overrides/assets/images assets/images
- mkdir /assets
- cp -r overrides/assets/images /assets/images
# English pdfs
- pandoc -N --template=eisvogel.latex --listings -V lang=en --from markdown --variable mainfont="DejaVuSerif" --variable sansfont="DejaVuSans" --variable monofont="DejaVuSansMono" --variable fontsize=12pt --variable version=2.0 pdf_metadata.md data/en/docs.pdf.md --pdf-engine=xelatex --toc -o public/pdfs/en/eisvogel_template.pdf
- pandoc -N --template=pandoc-scholar.latex --listings -V lang=en --from markdown --variable mainfont="DejaVuSerif" --variable sansfont="DejaVuSans" --variable monofont="DejaVuSansMono" --variable fontsize=12pt --variable version=2.0 pdf_metadata.md data/en/docs.pdf.md --pdf-engine=xelatex --toc -o public/pdfs/en/pandoc-scholar_template.pdf
......
......@@ -21,12 +21,12 @@ docker run --rm -it -p 8000:8000 -v ${PWD}:/docs registry.gsi.upm.es/docs/mkdocs
1. Build public content with pandoc-plugin to combine all markdown files in one (site/docs.pdf.md):
```bash
docker run --rm -it -v ${PWD}:/docs -e ENABLE_PANDOC_EXPORT=1 registry.gsi.upm.es/docs/mkdocs-material build
docker run --rm -it -v ${PWD}:/docs -e ENABLE_PANDOC_EXPORT=1 registry.gsi.upm.es/docs/mkdocs-material build -f config/en/mkdocs.yml --verbose
```
2. Build pdf with pandoc and eisvogel LaTeX:
```bash
docker run --rm -it -v ${PWD}:/data jtr0/latex-pandoc /bin/bash -c 'cp -r /data/docs/imgs /imgs ; pandoc -N --template=eisvogel.latex --listings -V lang=en --from markdown --variable mainfont="DejaVuSerif" --variable sansfont="DejaVuSans" --variable monofont="DejaVuSansMono" --variable fontsize=12pt --variable version=2.0 /data/pdf_metadata.md /data/site/docs.pdf.md --pdf-engine=xelatex --toc -o /data/eisvogel_template.pdf;'
docker run --rm -it -v ${PWD}:/data jtr0/latex-pandoc /bin/bash -c 'mkdir -p /assets; cp -r /data/overrides/assets/images /assets/images ; pandoc -N --template=eisvogel.latex --listings -V lang=en --from markdown --variable mainfont="DejaVuSerif" --variable sansfont="DejaVuSans" --variable monofont="DejaVuSansMono" --variable fontsize=12pt --variable version=2.0 /data/pdf_metadata.md /data/public/en/docs.pdf.md --pdf-engine=xelatex --toc -o /data/eisvogel_template.pdf;'
```
### Deploy on GitLab Pages
......
......@@ -9,9 +9,9 @@ The purpose of this repository is to show a template **to document a project wit
### Deploy on localhost
1. Clone this repository `git clone https://lab.gsi.upm.es/docs/mkdocs-material` and detele git dependencies with `rm -rf .git` or create a new mkdocs project with `mkdocs new <name-project>` with the same structure and copy the folder `latex-templates` and the files `pdf_metadata.md` and `mkdocs.yml`.
2. Serve the docs running in Docker with the image [jtr0/mkdocs-material](https://hub.docker.com/r/jtr0/mkdocs-material) or [registry.gsi.upm.es/docs/mkdocs-material](https://lab.gsi.upm.es/docs/mkdocs-material/container_registry/) (recommended because it has installed [mkdocs-pandoc-plugin](https://pypi.org/project/mkdocs-pandoc-plugin/) and [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin)). Other option is to use the oficial image [squidfunk/mkdocs-material](https://hub.docker.com/r/squidfunk/mkdocs-material/) but without pdf generator and it's neccesary to comment `pandoc` and `git-revision-date-localized` options in [mkdocs.yml](config/en/mkdocs.yml). Using an image with plugins:
2. Serve the docs running in Docker with the image [jtr0/mkdocs-material](https://hub.docker.com/r/jtr0/mkdocs-material) or [registry.gsi.upm.es/docs/mkdocs-material](https://lab.gsi.upm.es/docs/mkdocs-material/container_registry/) (recommended because it has installed [mkdocs-pandoc-plugin](https://pypi.org/project/mkdocs-pandoc-plugin/) and [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin)). Other option is to use the oficial image [squidfunk/mkdocs-material](https://hub.docker.com/r/squidfunk/mkdocs-material/) but without pdf generator and it's neccesary to comment `pandoc` and `git-revision-date-localized` options in [mkdocs.yml](../../config/en/mkdocs.yml). Serve docs using an image with plugins:
```bash
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs registry.gsi.upm.es/docs/mkdocs-material
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs registry.gsi.upm.es/docs/mkdocs-material serve -f config/en/mkdocs.yml
```
3. Open [http://localhost:8000/](http://localhost:8000/) in your browser.
......@@ -24,12 +24,12 @@ docker run --rm -it -v ${PWD}:/docs -e ENABLE_PANDOC_EXPORT=1 registry.gsi.upm.e
2. Build pdf with pandoc and eisvogel LaTeX:
```bash
docker run --rm -it -v ${PWD}:/data jtr0/latex-pandoc /bin/bash -c 'cp -r /data/docs/imgs /imgs ; pandoc -N --template=eisvogel.latex --listings -V lang=en --from markdown --variable mainfont="DejaVuSerif" --variable sansfont="DejaVuSans" --variable monofont="DejaVuSansMono" --variable fontsize=12pt --variable version=2.0 /data/pdf_metadata.md /data/site/docs.pdf.md --pdf-engine=xelatex --toc -o /data/eisvogel_template.pdf;'
docker run --rm -it -v ${PWD}:/data jtr0/latex-pandoc /bin/bash -c 'mkdir -p /assets; cp -r /data/overrides/assets/images /assets/images ; pandoc -N --template=eisvogel.latex --listings -V lang=en --from markdown --variable mainfont="DejaVuSerif" --variable sansfont="DejaVuSans" --variable monofont="DejaVuSansMono" --variable fontsize=12pt --variable version=2.0 /data/pdf_metadata.md /data/public/en/docs.pdf.md --pdf-engine=xelatex --toc -o /data/eisvogel_template.pdf;'
```
### Deploy on GitLab Pages
1. Go to GitLab, select `Set CI/CD` and copy the content of [`.gitlab-ci.yml`](../../.gitlab-ci.yml).
1. Go to GitLab, select `Set CI/CD` and copy the content of [`.gitlab-ci.yml`](https://lab.gsi.upm.es/docs/mkdocs-material/-/blob/main/.gitlab-ci.yml).
## Overview
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment