diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index c1af4c8..6388888 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -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) .
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index fea9654..0724a0e 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -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
diff --git a/Dockerfile b/Dockerfile
index 7b96514..34bf2d4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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
@@ -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
diff --git a/LICENSE b/LICENSE
index 5df4e4f..e609e06 100644
--- a/LICENSE
+++ b/LICENSE
@@ -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
diff --git a/mkdocs.yml b/mkdocs.yml
index d94eecb..b307941 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -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'
@@ -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'
@@ -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 open an issue or send a pull request.
dcrdevdocs v0.0.1. Decred Project 2020-2023.
+copyright: If you wish to improve this site, please open an issue or send a pull request.
dcrdevdocs v0.0.1. Decred Project 2020-2024.
diff --git a/requirements.txt b/requirements.txt
index 2afedc3..4f7d9f7 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -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