Skip to content

Commit fb365d0

Browse files
authored
Update mkdocs-material to 9.5.21. (#109)
* 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.
1 parent cf067a9 commit fb365d0

File tree

6 files changed

+36
-12
lines changed

6 files changed

+36
-12
lines changed

.github/workflows/docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ jobs:
55
build:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v2
8+
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
99
- name: Build the Docker image
1010
run: docker build -t decred/dcrdevdocs:$(date +%s) .

.github/workflows/python.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
python-version: [3.11]
1010

1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
1313
- name: Set up Python ${{ matrix.python-version }}
14-
uses: actions/setup-python@v2
14+
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
1515
with:
1616
python-version: ${{ matrix.python-version }}
1717
- name: Install dependencies

Dockerfile

+11-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM python:3.11
33

44
LABEL description="dcrdevdocs build"
55
LABEL version="1.0"
6-
LABEL maintainer "[email protected]"
6+
LABEL maintainer "[email protected]"
77

88
USER root
99
WORKDIR /root
@@ -15,14 +15,22 @@ COPY ./ /root/
1515
RUN pip install mkdocs && \
1616
pip install --user -r requirements.txt
1717

18+
# Install dependencies for generating social cards.
19+
# https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards
20+
RUN apt update && \
21+
apt install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev && \
22+
pip install pillow cairosvg
23+
24+
ENV DCRDEVDOCS_CARDS true
25+
1826
RUN ./bin/build_docs.sh
1927

2028
# Serve image (stable nginx version)
21-
FROM nginx:1.22-alpine
29+
FROM nginx:1.24-alpine
2230

2331
LABEL description="dcrdevdocs serve"
2432
LABEL version="1.0"
25-
LABEL maintainer "[email protected]"
33+
LABEL maintainer "[email protected]"
2634

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

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ISC License
22

3-
Copyright (c) 2018-2023 The Decred developers
3+
Copyright (c) 2018-2024 The Decred developers
44

55
Permission to use, copy, modify, and distribute this software for any
66
purpose with or without fee is hereby granted, provided that the above

mkdocs.yml

+19-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
site_name: Decred Developer Documentation
2+
site_url: https://devdocs.decred.org
23
use_directory_urls: true
4+
validation:
5+
# Increase severity of validation rules to trigger build failures on common mistakes.
6+
absolute_links: warn
7+
unrecognized_links: warn
8+
nav:
9+
omitted_files: warn
10+
absolute_links: warn
11+
watch:
12+
- "docs"
313
theme:
414
name: material
515
favicon: 'img/favicon.ico?v=s3ss'
@@ -68,14 +78,20 @@ markdown_extensions:
6878
- attr_list
6979
- pymdownx.details
7080
- pymdownx.emoji:
71-
emoji_index: !!python/name:materialx.emoji.twemoji
72-
emoji_generator: !!python/name:materialx.emoji.to_svg
81+
emoji_index: !!python/name:material.extensions.emoji.twemoji
82+
emoji_generator: !!python/name:material.extensions.emoji.to_svg
7383
extra_css:
7484
- css/fonts.css
7585
- css/style.css
7686
plugins:
7787
- markdownextradata
7888
- search
89+
- social:
90+
enabled: !ENV [DCRDEVDOCS_CARDS, false]
91+
cards_layout_options:
92+
font_family: 'Source Sans 3'
93+
background_color: '#091440'
94+
color: '#FFFFFF'
7995
nav:
8096
- 'Home': 'index.md'
8197
- 'Projects': 'projects.md'
@@ -116,4 +132,4 @@ nav:
116132
- 'Regnet': 'environments/regnet.md'
117133
- Contributing:
118134
- 'Contributor Guidelines': 'contributing/contributor-guidelines.md'
119-
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.
135+
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.

requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
mkdocs-material==9.0.6
2-
mkdocs-markdownextradata-plugin==0.2.4
1+
mkdocs-material==9.5.21
2+
mkdocs-markdownextradata-plugin==0.2.5

0 commit comments

Comments
 (0)