commit 585a6927f69aa330ed533ce646262a113aebf4b1 Author: Stephan Hadan Date: Mon Dec 2 14:12:33 2024 +0100 first commit diff --git a/.github/workflow/ci.yml b/.github/workflow/ci.yml new file mode 100644 index 0000000..eeaef9f --- /dev/null +++ b/.github/workflow/ci.yml @@ -0,0 +1,28 @@ +name: ci +on: + push: + branches: + - main +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v4 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5fcd86d --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# Dependencies +node_modules +__pycache__ +venv +.venv + +# Build files +build +site + +# Distribution files +dist +mkdocs_material.egg-info + +# Caches and logs +*.cpuprofile +*.log +*.tsbuildinfo +.cache +.eslintcache +__pycache__ + +# Examples +example +example.zip + +# ----------------------------------------------------------------------------- +# General +# ----------------------------------------------------------------------------- + +# Never ignore .gitkeep files +!**/.gitkeep + +# macOS internals +.DS_Store + +# Temporary files +TODO +tmp + +# IDEs & Editors +.idea +*~ diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/assets/images/background.png b/docs/assets/images/background.png new file mode 100644 index 0000000..bc53884 Binary files /dev/null and b/docs/assets/images/background.png differ diff --git a/docs/assets/logo.png b/docs/assets/logo.png new file mode 100644 index 0000000..78f0b34 Binary files /dev/null and b/docs/assets/logo.png differ diff --git a/docs/blog/.authors.yml b/docs/blog/.authors.yml new file mode 100644 index 0000000..2270e69 --- /dev/null +++ b/docs/blog/.authors.yml @@ -0,0 +1,5 @@ +authors: + stephan: + name: Stephan Hadan + description: Senior IT Operations Engineer + avatar: assets/logo.png \ No newline at end of file diff --git a/docs/blog/index.md b/docs/blog/index.md new file mode 100644 index 0000000..02b45da --- /dev/null +++ b/docs/blog/index.md @@ -0,0 +1,5 @@ +--- +pdf: false +--- +# Blog + diff --git a/docs/blog/posts/test.md b/docs/blog/posts/test.md new file mode 100644 index 0000000..74cfd9d --- /dev/null +++ b/docs/blog/posts/test.md @@ -0,0 +1,10 @@ +--- +pdf: false +date: 2024-01-31 +authors: + - stephan +--- + +# Hello world! + +Hi ho! \ No newline at end of file diff --git a/docs/cv/index.md b/docs/cv/index.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/images/favicon.png b/docs/images/favicon.png new file mode 100644 index 0000000..78f0b34 Binary files /dev/null and b/docs/images/favicon.png differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..dd46be6 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,17 @@ +# Willkommen + +For full documentation visit [mkdocs.org](https://www.mkdocs.org). + +## Commands + +* `mkdocs new [dir-name]` - Create a new project. +* `mkdocs serve` - Start the live-reloading docs server. +* `mkdocs build` - Build the documentation site. +* `mkdocs -h` - Print help message and exit. + +## Project layout + + mkdocs.yml # The configuration file. + docs/ + index.md # The documentation homepage. + ... # Other markdown pages, images and other files. diff --git a/docs/projects/index.md b/docs/projects/index.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/robots.txt b/docs/robots.txt new file mode 100644 index 0000000..77470cb --- /dev/null +++ b/docs/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..3893baf --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,86 @@ +site_name: Stephan Hadan +site_url: http://localhost:8000/ +theme: + name: material + palette: + primary: black + accent: indigo + logo: assets/logo.png + favicon: images/favicon.png + language: de + features: + - navigation.instant + - navigation.instant.progress + - navigation.tracking + - navigation.tabs + - navigation.sections + - navigation.expand + - navigation.footer + - toc.follow +# - toc.integrate + - navigation.top + - search.suggest + - search.highlight + - search.share +copyright: Copyright © 2024 Stephan Hadan + +plugins: + - search + - blog: + archive: false +# - social + - exporter: + formats: + pdf: + enabled: !ENV [MKDOCS_EXPORTER_PDF_ENABLED, true] + stylesheets: + - resources/stylesheets/pdf.scss + covers: + front: resources/templates/covers/front.html.j2 + back: resources/templates/covers/back.html.j2 +# browser: +# debug: false + aggregator: + enabled: !ENV [MKDOCS_EXPORTER_PDF_AGGREGATOR, true] + output: documentation.pdf + covers: front + buttons: + - title: Download as PDF + icon: material-file-download-outline + enabled: !!python/name:mkdocs_exporter.formats.pdf.buttons.download.enabled + attributes: !!python/name:mkdocs_exporter.formats.pdf.buttons.download.attributes + +extra: + social: + - icon: fontawesome/brands/github + link: https://github.com/stiebke + - icon: fontawesome/brands/bluesky + link: https://bsky.app/profile/stiebke.bsky.social + - icon: fontawesome/brands/mastodon + link: https://freiburg.social/@stiebke + +markdown_extensions: + - abbr + - pymdownx.betterem + - pymdownx.blocks.caption + - pymdownx.caret + - pymdownx.mark + - pymdownx.tilde + - pymdownx.critic + - pymdownx.details + - pymdownx.highlight + - pymdownx.superfences + - pymdownx.keys + - pymdownx.smartsymbols + - pymdownx.tabbed + - pymdownx.tasklist + +# Page tree +nav: + - Über mich: index.md + - Lebenslauf: cv/index.md + - Projekte: projects/index.md + + - Blog: + - blog/index.md + \ No newline at end of file diff --git a/overrides/partials/integrations/analytics/custom.html b/overrides/partials/integrations/analytics/custom.html new file mode 100644 index 0000000..29d8dd0 --- /dev/null +++ b/overrides/partials/integrations/analytics/custom.html @@ -0,0 +1,15 @@ + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..865fb1c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,14 @@ +# Requirements for core +jinja2~=3.0 +markdown~=3.2 +mkdocs~=1.6 +mkdocs-material-extensions~=1.3 +pygments~=2.16 +pymdown-extensions~=10.2 + +# Requirements for plugins +babel~=2.10 +colorama~=0.4 +paginate~=0.5 +regex>=2022.4 +requests~=2.26 diff --git a/resources/stylesheets/pdf.scss b/resources/stylesheets/pdf.scss new file mode 100644 index 0000000..a301454 --- /dev/null +++ b/resources/stylesheets/pdf.scss @@ -0,0 +1,73 @@ +:root { + --width: 21cm; + --margin: 1.20cm; + --height: 29.7cm; + --offset: calc(var(--margin) * 2); +} + +@page { + size: A4; + margin: 1.20cm; +} + +hr:has(+ div.md-source-file), .md-source-file { + display: none !important; +} + +summary::after { + display: none; +} + +.front-cover { + margin: var(--margin); + height: calc(var(--height) - var(--offset)); + page-break-after: always; + border: 1px solid #fff; + position: relative; + + img { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + image-rendering: optimizeQuality; + } + + > section { + color: #fff; + padding: 0.635cm; + max-width: 10.25cm; + word-wrap: break-word; + margin-top: calc(var(--height) / 2 - var(--offset) - 2cm); + font-size: 13pt; + + > .title { + font-size: 26pt; + font-weight: 500; + line-height: 1.1; + color: #fff; + } + } +} + +h1, h2, h3 { + string-set: chapter content(); +} + +body { + print-color-adjust: exact; + text-rendering: geometricPrecision; +} + +.md-main .md-main__inner { + margin: 0; +} + +.md-content .md-content__inner { + margin: 0; + padding: 0; + + &::before { + height: 0; + } +} diff --git a/resources/templates/covers/back.html.j2 b/resources/templates/covers/back.html.j2 new file mode 100644 index 0000000..5a1d81b --- /dev/null +++ b/resources/templates/covers/back.html.j2 @@ -0,0 +1,43 @@ + +
+
+
{{ config.site_name }}
+
+
diff --git a/resources/templates/covers/front.html.j2 b/resources/templates/covers/front.html.j2 new file mode 100644 index 0000000..35a9833 --- /dev/null +++ b/resources/templates/covers/front.html.j2 @@ -0,0 +1,91 @@ + +
+ + +
+
{{ config.site_name }}
+
{{ version }}
+
{{ page.title }}
+
+