diff --git a/.cargo/config.toml b/.cargo/config.toml index a9b0b23cc..3fe4469e5 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,3 @@ [alias] blog = ["run", "--package", "generate_blog"] +zola = ["run", "--manifest-path", "zola/Cargo.toml", "--"] diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ab6585843..b4404b79a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/.github/workflows/snapshot_tests.yml b/.github/workflows/snapshot_tests.yml index 1c40abd68..0768ca982 100644 --- a/.github/workflows/snapshot_tests.yml +++ b/.github/workflows/snapshot_tests.yml @@ -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 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..f538c9306 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "zola"] + path = zola + url = https://github.com/getzola/zola diff --git a/README.md b/README.md index 324be0b89..4977df4a7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/content/_index.md b/content/_index.md index 348474b7d..1db41e9d8 100644 --- a/content/_index.md +++ b/content/_index.md @@ -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" diff --git a/content/inside-rust/_index.md b/content/inside-rust/_index.md index 9cf9438c9..8231cb9ef 100644 --- a/content/inside-rust/_index.md +++ b/content/inside-rust/_index.md @@ -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' diff --git a/crates/snapshot/src/lib.rs b/crates/snapshot/src/lib.rs index 44a78be29..1989a68e8 100644 --- a/crates/snapshot/src/lib.rs +++ b/crates/snapshot/src/lib.rs @@ -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"); diff --git a/zola b/zola new file mode 160000 index 000000000..4cc4dedff --- /dev/null +++ b/zola @@ -0,0 +1 @@ +Subproject commit 4cc4dedff832c8fdccd3185d19696435141998b3