From 7541f5a2a983e7e9080229ab9e0d8cdc99c6590a Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Thu, 24 Sep 2020 15:21:13 +0200 Subject: [PATCH 01/12] base image on centos 8 --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index b9173dfd..029e1acd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM centos:7.6.1810 +FROM centos:8 LABEL maintainer="philipp.salvisberg@trivadis.com" LABEL description="Tools to generate HTML and PDF using Materials for MkDocs and wkhtmltopdf." From 9f465235093b8475b466bfe93186cc3ced189a7a Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Thu, 24 Sep 2020 15:26:21 +0200 Subject: [PATCH 02/12] build and install python 3.8, install git client --- docker/Dockerfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 029e1acd..5403e1da 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,14 +5,17 @@ LABEL description="Tools to generate HTML and PDF using Materials for MkDocs and LABEL build.command="docker build . --tag trivadis/mktools:latest" # install python, not part of centos -# see https://www.osetc.com/en/how-to-install-the-latest-python-3-3-6-x-3-7-x-on-centos-7-or-rhel-7.html -RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm -RUN yum update -y -RUN yum install -y python36u python36u-libs python36u-devel python36u-pip - -# install git and wget +# see https://computingforgeeks.com/how-to-install-python-on-3-on-centos/ +RUN yum -y update +RUN yum -y groupinstall "Development Tools" +RUN yum -y install openssl-devel bzip2-devel libffi-devel +RUN yum -y install wget +RUN wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz +RUN tar xvf Python-3.8.3.tgz +RUN /bin/bash -c 'cd Python-3.8*/; ./configure --enable-optimizations; make altinstall' + +# install git RUN yum install -y git -RUN yum install -y wget # install wkhtmltox 0.12.4 since 0.12.5 cannot create TOCs, see https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3995 # RUN yum install -y https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm From 01b234c35afeefdfbfe885b9fe5c5cf18570aef6 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Thu, 24 Sep 2020 15:27:43 +0200 Subject: [PATCH 03/12] install pyhton 3.8 modules --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 5403e1da..6c0e4839 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -26,8 +26,8 @@ RUN wget -q https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/ rm -rf /tmp/wkhtmltox* # install python modules (most recent versions) -RUN pip3.6 install --upgrade pip -RUN pip3.6 install mkdocs \ +RUN pip3.8 install --upgrade pip +RUN pip3.8 install mkdocs \ mkdocs-material \ mkdocs-awesome-pages-plugin \ pymdown-extensions \ From e4365648326c4eba0f4f6b95396bc7206ead70f8 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Thu, 24 Sep 2020 15:28:43 +0200 Subject: [PATCH 04/12] install wkhtmltopdf 0.12.6, remove unnecessary LC_ALL setting --- docker/Dockerfile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 6c0e4839..53396e49 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -17,14 +17,6 @@ RUN /bin/bash -c 'cd Python-3.8*/; ./configure --enable-optimizations; make alti # install git RUN yum install -y git -# install wkhtmltox 0.12.4 since 0.12.5 cannot create TOCs, see https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3995 -# RUN yum install -y https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm -RUN yum install -y yum install -y wkhtmltopdf -RUN wget -q https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz -O /tmp/wkhtmltox.tar.xz && \ - tar xvf /tmp/wkhtmltox.tar.xz -C /tmp && \ - cp -rp /tmp/wkhtmltox/* /usr/local && \ - rm -rf /tmp/wkhtmltox* - # install python modules (most recent versions) RUN pip3.8 install --upgrade pip RUN pip3.8 install mkdocs \ @@ -33,7 +25,10 @@ RUN pip3.8 install mkdocs \ pymdown-extensions \ mike -ENV LC_ALL=en_US.utf8 +# install wkhtmltox 0.12.6 +RUN yum install -y https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos8.x86_64.rpm + +# set environment ENV LANG=en_US.utf8 # volume for GitHub project's root folder containing docs folder From 66fe6f9a44fb1e72125ce25d35ecc2d172799320 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Thu, 24 Sep 2020 15:31:36 +0200 Subject: [PATCH 05/12] upgrade configuration for Materials for MkDocs from 4 to 5; use pymdownx.highlight --- mkdocs.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index d3f2d276..6dfdbea4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -6,9 +6,11 @@ repo_url: https://github.com/trivadis/plsql-and-sql-coding-guidelines edit_uri: "" theme: + logo: images/trivadis-logo.svg + icon: + repo: fontawesome/brands/github-alt name: 'material' custom_dir: custom-theme - logo: images/trivadis-logo.svg favicon: images/favicon.ico palette: primary: 'white' @@ -22,17 +24,20 @@ extra_javascript: markdown_extensions: - admonition - - codehilite: + - pymdownx.highlight: linenums: true + linenums_style: table + - pymdownx.superfences + - pymdownx.inlinehilite - pymdownx.arithmatex - footnotes extra: guideline_version: 4.0-SNAPSHOT social: - - type: github-alt + - icon: fontawesome/brands/github-alt link: https://github.com/Trivadis - - type: twitter + - icon: fontawesome/brands/twitter link: https://twitter.com/trivadis plugins: From e9392679577a241fe239b162e3231fac5c39ea92 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Thu, 24 Sep 2020 15:34:36 +0200 Subject: [PATCH 06/12] unchanged header.html from mkdocs-material repo --- custom-theme/partials/header.html | 82 ++++++++++++++----------------- 1 file changed, 36 insertions(+), 46 deletions(-) diff --git a/custom-theme/partials/header.html b/custom-theme/partials/header.html index 382daf06..3d448d49 100644 --- a/custom-theme/partials/header.html +++ b/custom-theme/partials/header.html @@ -1,51 +1,41 @@
-
\ No newline at end of file + {% endif %} + + \ No newline at end of file From c2f3199a1fa88b8294fe443aca6affa8e9126c19 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Thu, 24 Sep 2020 15:36:19 +0200 Subject: [PATCH 07/12] changes to display Trivadis logo and guidelines version --- custom-theme/partials/header.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom-theme/partials/header.html b/custom-theme/partials/header.html index 3d448d49..4525cf27 100644 --- a/custom-theme/partials/header.html +++ b/custom-theme/partials/header.html @@ -1,6 +1,6 @@