Skip to content

Switch to upstream Zola #1632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[alias]
blog = ["run", "--package", "generate_blog"]
zola = ["run", "--manifest-path", "zola/Cargo.toml", "--"]
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: true

- run: rustup override set ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8

- name: Install Zola
run: cargo install --locked --git https://github.com/senekor/zola --rev 79410eea82f837e4de9b1e4c3905287060b69255
- run: zola build
- run: cargo zola build
- run: cp CNAME ./public/
- run: touch public/.nojekyll

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snapshot_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
if: contains(github.event.pull_request.body, 'RUN_SNAPSHOT_TESTS')
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: true
- run: rustup override set ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
- name: Install Zola
run: cargo install --locked --git https://github.com/senekor/zola --rev 79410eea82f837e4de9b1e4c3905287060b69255

- run: git fetch --depth 2
- run: git checkout origin/master
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "zola"]
path = zola
url = https://github.com/getzola/zola
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ It uses [Zola](https://www.getzola.org/) and is deployed to GitHub Pages via Git

## Building

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

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

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

## Contributing
Expand Down
1 change: 1 addition & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = "Rust Blog"
description = "Empowering everyone to build reliable and efficient software."
sort_by = "permalink"
generate_feeds = true
[extra]
index_title = "The Rust Programming Language Blog"
Expand Down
1 change: 1 addition & 0 deletions content/inside-rust/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = "Inside Rust Blog"
description = "Want to follow along with Rust development? Curious how you might get involved? Take a look!"
sort_by = "permalink"
generate_feeds = true
[extra]
index_title = 'The "Inside Rust" Blog'
Expand Down
4 changes: 2 additions & 2 deletions crates/snapshot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
fn snapshot() {
std::env::set_current_dir(concat!(env!("CARGO_MANIFEST_DIR"), "/../..")).unwrap();
let _ = std::fs::remove_dir_all("public");
let status = std::process::Command::new("zola")
.arg("build")
let status = std::process::Command::new("cargo")
.args(["zola", "build"])
.status()
.unwrap();
assert!(status.success(), "failed to build site");
Expand Down
1 change: 1 addition & 0 deletions zola
Submodule zola added at 4cc4de