Skip to content
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

Using --root seems to make it miss shortcodes #1692

Open
ralfbiedert opened this issue Dec 9, 2021 · 3 comments
Open

Using --root seems to make it miss shortcodes #1692

ralfbiedert opened this issue Dec 9, 2021 · 3 comments
Labels
bug Need Windows help We need someone using Windows to help us with this issue

Comments

@ralfbiedert
Copy link

Bug Report

Environment

Zola version: master

Expected Behavior

Running cargo run -- --root ..\..\cheats.rs build should make it find short codes, and generally 'just work'.

Current Behavior

When working on #1690 I originally tried to invoke zola from its source directory so I could run it via CLions integrated debugger:

cargo run -- --root ..\..\cheats.rs build

Unfortunately this led to an error:

Building site...
Failed to build the site
Error: Failed to render content of //?/D:/Development/Source/cheats.rs/content/_index.md
Reason: Found usage of a shortcode named `book` but we do not know about. Make sure it's not a typo and that a field name `book.{html,md} exists in the `templates/shortcodes` directory.
error: process didn't exit successfully: `target\debug\zola.exe --root ..\..\cheats.rs build` (exit code: 1)

However, the directory both has a config.toml:

❯ cat ..\..\cheats.rs\config.toml
# The URL the site will be built for
base_url = "https://cheats.rs"
title = "Rust Language Cheat Sheet"
compile_sass = true

And the respective book.html:

❯ cat ..\..\cheats.rs\templates\shortcodes\book.html
[<sup class="entry">BK</sup>](https://doc.rust-lang.org/book/{{page}})

Also, I can just go into that direction and invoke ..\_thirdparty\zola\target\debug\zola.exe build instead, which works just fine:

❯ ..\_thirdparty\zola\target\debug\zola.exe build
Building site...
Checking all internal links with anchors.
> Successfully checked 41 internal link(s) with anchors.
-> Creating 1 pages (0 orphan) and 0 sections
Done in 2.0s.
@Keats Keats added the bug label Dec 9, 2021
@Keats
Copy link
Collaborator

Keats commented Dec 9, 2021

It works on my machine (a mac). It might be a Windows specific bug?

@ralfbiedert
Copy link
Author

It might be a Windows specific bug?

Yes, I think so. Just tried on Linux where it works too.

@Keats
Copy link
Collaborator

Keats commented Dec 10, 2021

I think #1626 fixes it but I wasn't sure whether it was breaking other things. Can you check?

@Keats Keats added done in pr Already done in a PR and removed done in pr Already done in a PR labels Jan 12, 2023
@Keats Keats added the Need Windows help We need someone using Windows to help us with this issue label Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Need Windows help We need someone using Windows to help us with this issue
Projects
None yet
Development

No branches or pull requests

2 participants