Skip to content

Commit

Permalink
Update mkdocs-material to 9.5.21. (#109)
Browse files Browse the repository at this point in the history
* Update mkdocs-material to 9.5.3.

Include generating social cards, lots of minor bug fixes, a smaller docker image, faster build times, and using a new emoji extension.

* Update mkdocs-material to 9.5.21.

This is an important update as it fixes the currently failing master
build.

ref: squidfunk/mkdocs-material#6983

* Update copyright year to 2024.
  • Loading branch information
jholdstock committed May 9, 2024
1 parent cf067a9 commit fb365d0
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Build the Docker image
run: docker build -t decred/dcrdevdocs:$(date +%s) .
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
python-version: [3.11]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM python:3.11

LABEL description="dcrdevdocs build"
LABEL version="1.0"
LABEL maintainer "holdstockjamie@gmail.com"
LABEL maintainer "jholdstock@decred.org"

USER root
WORKDIR /root
Expand All @@ -15,14 +15,22 @@ COPY ./ /root/
RUN pip install mkdocs && \
pip install --user -r requirements.txt

# Install dependencies for generating social cards.
# https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards
RUN apt update && \
apt install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev && \
pip install pillow cairosvg

ENV DCRDEVDOCS_CARDS true

RUN ./bin/build_docs.sh

# Serve image (stable nginx version)
FROM nginx:1.22-alpine
FROM nginx:1.24-alpine

LABEL description="dcrdevdocs serve"
LABEL version="1.0"
LABEL maintainer "holdstockjamie@gmail.com"
LABEL maintainer "jholdstock@decred.org"

COPY conf/nginx.conf /etc/nginx/conf.d/default.conf

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ISC License

Copyright (c) 2018-2023 The Decred developers
Copyright (c) 2018-2024 The Decred developers

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
Expand Down
22 changes: 19 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
site_name: Decred Developer Documentation
site_url: https://devdocs.decred.org
use_directory_urls: true
validation:
# Increase severity of validation rules to trigger build failures on common mistakes.
absolute_links: warn
unrecognized_links: warn
nav:
omitted_files: warn
absolute_links: warn
watch:
- "docs"
theme:
name: material
favicon: 'img/favicon.ico?v=s3ss'
Expand Down Expand Up @@ -68,14 +78,20 @@ markdown_extensions:
- attr_list
- pymdownx.details
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
extra_css:
- css/fonts.css
- css/style.css
plugins:
- markdownextradata
- search
- social:
enabled: !ENV [DCRDEVDOCS_CARDS, false]
cards_layout_options:
font_family: 'Source Sans 3'
background_color: '#091440'
color: '#FFFFFF'
nav:
- 'Home': 'index.md'
- 'Projects': 'projects.md'
Expand Down Expand Up @@ -116,4 +132,4 @@ nav:
- 'Regnet': 'environments/regnet.md'
- Contributing:
- 'Contributor Guidelines': 'contributing/contributor-guidelines.md'
copyright: If you wish to improve this site, please <a href="https://github.com/decred/dcrdevdocs/issues/new">open an issue</a> or <a href="https://github.com/decred/dcrdevdocs/compare">send a pull request</a>.<br />dcrdevdocs v0.0.1. Decred Project 2020-2023.
copyright: If you wish to improve this site, please <a href="https://github.com/decred/dcrdevdocs/issues/new">open an issue</a> or <a href="https://github.com/decred/dcrdevdocs/compare">send a pull request</a>.<br />dcrdevdocs v0.0.1. Decred Project 2020-2024.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mkdocs-material==9.0.6
mkdocs-markdownextradata-plugin==0.2.4
mkdocs-material==9.5.21
mkdocs-markdownextradata-plugin==0.2.5

0 comments on commit fb365d0

Please sign in to comment.