diff --git a/.gitignore b/.gitignore index 154b3347c6751a552d51757dbc5ca8cdf335b14c..a4276591ea54386750651f549656d93d72915420 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 0000000000000000000000000000000000000000..35d1443fb90d1b7a7d9d753566424fbec022d0cc --- /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 28836412669ffc8163fa212e70b774ca37762492..6af6393a130e481ce6a80fb2729b98fd26400341 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 0000000000000000000000000000000000000000..05d52708b3e3fb127965a019ca983e5b5fab5de1 --- /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 41a979a7c6c9383f872d445ebfaa84aac7dbcfdf..f9a337fb7bec4a727affa1c84688d0ff9f160e8d 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 f269cee999712999004c4161152573792b0e84a3..8b880aedaeac42e1a86f9c1e61e85e5e5d4064e3 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 0a375f62d554a2c1092b5ed7e6fbf168fd256316..2dc0c2f9686f0f55224a80b5f5701cec9212a2d1 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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391