diff --git a/.env b/.env
index 193c72da..39767450 100644
--- a/.env
+++ b/.env
@@ -2,3 +2,4 @@ MDBOOK_VERSION=0.4.37
MDBOOK_I18N_HELPERS_VERSION=0.3.2
MDBOOK_PANDOC_VERSION=0.6.0
MDBOOK_LAST_CHANGED_VERSION=0.1.4
+PANDOC_VERSION=3.1.12.2
\ No newline at end of file
diff --git a/.github/workflows/install-mdbook/action.yml b/.github/workflows/install-mdbook/action.yml
index 6cc6d3bf..57a50e24 100644
--- a/.github/workflows/install-mdbook/action.yml
+++ b/.github/workflows/install-mdbook/action.yml
@@ -40,8 +40,9 @@ runs:
- name: Install mdbook-pandoc and related dependencies
run: |
+ . ./.env
sudo apt-get update
sudo apt-get install -y texlive texlive-latex-extra texlive-luatex texlive-lang-cjk librsvg2-bin fonts-noto
- curl -LsSf https://github.com/jgm/pandoc/releases/download/3.1.12.2/pandoc-3.1.12.2-linux-amd64.tar.gz | tar zxf -
- echo "$PWD/pandoc-3.1.12.2/bin" >> $GITHUB_PATH
+ curl -LsSf https://github.com/jgm/pandoc/releases/download/$PANDOC_VERSION/pandoc-$PANDOC_VERSION-linux-amd64.tar.gz | tar zxf -
+ echo "$PWD/pandoc-$PANDOC_VERSION/bin" >> $GITHUB_PATH
shell: bash
diff --git a/README.md b/README.md
index cdad7915..6954c594 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,9 @@
An open source book about design patterns and idioms in the Rust programming
language that you can read [here](https://rust-unofficial.github.io/patterns/).
+You can also download the book in PDF format from
+[this link](https://rust-unofficial.github.io/patterns/rust-design-patterns.pdf).
+
## Contributing
You are missing content in this repository that can be helpful for others, and
diff --git a/book.toml b/book.toml
index a44e064b..ab2ea9c5 100644
--- a/book.toml
+++ b/book.toml
@@ -51,7 +51,7 @@ optional = true
hosted-html = "https://rust-unofficial.github.io/patterns/"
[output.pandoc.profile.pdf]
-output-file = "patterns.pdf"
+output-file = "rust-design-patterns.pdf"
pdf-engine = "lualatex"
[output.pandoc.profile.pdf.variables]
diff --git a/src/intro.md b/src/intro.md
index 1f70e3db..70b648e5 100644
--- a/src/intro.md
+++ b/src/intro.md
@@ -5,6 +5,11 @@
If you are interested in contributing to this book, check out the
[contribution guidelines](https://github.com/rust-unofficial/patterns/blob/master/CONTRIBUTING.md).
+## 📯 News
+
+- **2024-03-17**: You can now download the book in PDF format from
+ [this link](https://rust-unofficial.github.io/patterns/rust-design-patterns.pdf).
+
## Design patterns
In software development, we often come across problems that share similarities
diff --git a/theme/index.hbs b/theme/index.hbs
index 30c42d99..58a7ea02 100644
--- a/theme/index.hbs
+++ b/theme/index.hbs
@@ -227,6 +227,9 @@
+
+
+
{{/if}}
{{#if git_repository_url}}