From a1a8c4d3df9d239ea566abf5a99c77e4b76934d6 Mon Sep 17 00:00:00 2001 From: Martin Weise <martin.weise@tuwien.ac.at> Date: Thu, 21 Apr 2022 15:23:06 +0200 Subject: [PATCH] Add pdf --- .gitignore | 3 ++- Dockerfile | 25 +++++++++++++++++++++++++ Makefile | 7 +++++-- docker-compose.yml | 13 +++++++++++++ docs/index.md | 2 +- mkdocs.yml | 4 ++-- requirements.txt | 3 ++- site/.gitkeep | 0 8 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 site/.gitkeep diff --git a/.gitignore b/.gitignore index 154b334..a427659 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -# template from https://raw.githubusercontent.com/github/gitignore/master/TeX.gitignore +## Generated +site/ ## Core latex/pdflatex auxiliary files: *.aux diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..35d1443 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM debian:stable as build + +ENV PYTHONUNBUFFERED=1 + +RUN apt-get update && apt-get install -y python3 python3-pip python3-cffi python3-brotli libpango-1.0-0 libpangoft2-1.0-0 + +COPY ./requirements.txt ./requirements.txt +RUN pip3 install -r ./requirements.txt + +RUN python3 --version +RUN mkdocs --version + +COPY ./docs ./docs +COPY ./mkdocs.yml ./mkdocs.yml + +RUN echo 'plugins:\n\ + - with-pdf:\n\ + author: FAIR Data Austria\n\ + copyright: CC-BY 4.0\n\ + cover_title: "DBRepo: Database Repository"\n\ + cover_subtitle: "Technical Documentation"' >> ./mkdocs.yml + +RUN cat ./mkdocs.yml + +ENTRYPOINT [ "mkdocs", "build" ] \ No newline at end of file diff --git a/Makefile b/Makefile index 2883641..6af6393 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,10 @@ phony: all: build: - mkdocs build + docker-compose build -deploy: +run: build + docker-compose up + +deploy: run sudo cp -r ./site/* /usr/share/nginx/html/ \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..05d5270 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +version: "3.6" + +services: + + fda-docs-builder: + build: . + image: fda-docs-builder + volumes: + - "./site:/site" + environment: + TZ: Europe/Vienna + logging: + driver: json-file diff --git a/docs/index.md b/docs/index.md index 41a979a..f9a337f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,7 +20,7 @@ We present a database repository system that allows researchers to ingest data i through common interfaces, provides efficient access to arbitrary subsets of data even when the underlying data store is evolving, allows reproducing of query results and supports findable-, accessible-, interoperable- and reusable data. -[Get Started](/getting-started){ .action-button .md-button .md-button--primary } +[Get Started](/getting-started){ .action-button .md-button .md-button--primary } [PDF](/pdf/document.pdf){ .action-button .md-button .md-button--secondary } ## Demo diff --git a/mkdocs.yml b/mkdocs.yml index f269cee..8b880ae 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,7 +2,7 @@ site_name: Database Repository repo_url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services repo_name: fda-services site_author: FAIR Data Austria -copyright: CC BY 4.0 FAIR Data Austria +copyright: CC-BY 4.0 extra: homepage: https://dbrepo.tuwien.ac.at social: @@ -52,4 +52,4 @@ markdown_extensions: - pymdownx.details - pymdownx.superfences - toc: - permalink: True \ No newline at end of file + permalink: True diff --git a/requirements.txt b/requirements.txt index 0a375f6..2dc0c2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ mkdocs==1.3.0 -mkdocs-material==8.2.9 \ No newline at end of file +mkdocs-material==8.2.9 +mkdocs-with-pdf==0.9.3 diff --git a/site/.gitkeep b/site/.gitkeep new file mode 100644 index 0000000..e69de29 -- GitLab