Skip to content

Commit bb9fc68

Browse files
committed
Switch to upstream Zola
All of the patches we needed for the migration have been merged upstream (with some modifications, hence the `sort_by = "permalink"` diff). We use a submodule of Zola so we can better control the version of Zola that blog authors are running locally.
1 parent ffbc464 commit bb9fc68

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
17+
with:
18+
submodules: "recursive"
1719

1820
- run: rustup override set ${{ env.RUST_VERSION }}
1921
- run: rustup component add clippy
@@ -32,9 +34,7 @@ jobs:
3234
- run: rustup override set ${{ env.RUST_VERSION }}
3335
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
3436

35-
- name: Install Zola
36-
run: cargo install --locked --git https://github.com/senekor/zola --rev 79410eea82f837e4de9b1e4c3905287060b69255
37-
- run: zola build
37+
- run: cargo zola build
3838
- run: cp CNAME ./public/
3939
- run: touch public/.nojekyll
4040

.github/workflows/snapshot_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
if: contains(github.event.pull_request.body, 'RUN_SNAPSHOT_TESTS')
1313
steps:
1414
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
15+
with:
16+
submodules: "recursive"
1517
- run: rustup override set ${{ env.RUST_VERSION }}
1618
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
17-
- name: Install Zola
18-
run: cargo install --locked --git https://github.com/senekor/zola --rev 79410eea82f837e4de9b1e4c3905287060b69255
1919

2020
- run: git fetch --depth 2
2121
- run: git checkout origin/master

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ It uses [Zola](https://www.getzola.org/) and is deployed to GitHub Pages via Git
88

99
## Building
1010

11-
To serve the site locally, first install Zola: (takes a couple minutes)
11+
To serve the site locally, first make sure the zola submodule is initialized:
1212

1313
```sh
14-
# using a fork because we rely on a few patches that haven't landed yet
15-
cargo install --locked --git https://github.com/senekor/zola --rev 79410eea82f837e4de9b1e4c3905287060b69255
14+
git submodule update --init --recursive
1615
```
1716

18-
Now run `zola serve --open`.
17+
Now run `cargo zola serve --open`.
18+
(The first run takes a while to compile Zola.)
1919
The site will be reloaded automatically when you make any changes.
2020

2121
## Contributing

content/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
+++
22
title = "Rust Blog"
33
description = "Empowering everyone to build reliable and efficient software."
4+
sort_by = "permalink"
45
generate_feeds = true
56
[extra]
67
index_title = "The Rust Programming Language Blog"

content/inside-rust/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
+++
22
title = "Inside Rust Blog"
33
description = "Want to follow along with Rust development? Curious how you might get involved? Take a look!"
4+
sort_by = "permalink"
45
generate_feeds = true
56
[extra]
67
index_title = 'The "Inside Rust" Blog'

crates/snapshot/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
fn snapshot() {
33
std::env::set_current_dir(concat!(env!("CARGO_MANIFEST_DIR"), "/../..")).unwrap();
44
let _ = std::fs::remove_dir_all("public");
5-
let status = std::process::Command::new("zola")
6-
.arg("build")
5+
let status = std::process::Command::new("cargo")
6+
.args(["zola", "build"])
77
.status()
88
.unwrap();
99
assert!(status.success(), "failed to build site");

0 commit comments

Comments
 (0)