Skip to content

Bug fix: allow local builds without requiring client directory #243

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

liorsve
Copy link
Contributor

@liorsve liorsve commented Apr 22, 2025

Description

Currently building the zola site locally is not possible when the clients directory is not built, as the zola serve command fails.
This is fixed by introducing an additional boolean variable clients_built in the client's page frontmatter, which is set to false by default, but updates to be true when running the init_topics_and_clients.sh script successfully. The page loads only if this var is set to true, otherwise a "Clients page not found" message is displayed, similar to the behavior in the commands and topics documentation.

Issues Resolved

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the BSD-3-Clause License.

Copy link
Member

@stockholmux stockholmux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I can't get this to work as written.

If I change the value of clients_built to false then it does indeed not need the clients to build successfully (yay!) but if then try to run ./build/init-topics-and-clients.sh ../valkey-doc/topics ../valkey-doc/clients I get sed: 1: "content/clients/_index.md": command c expects \ followed by text and it doesn't flip the front matter boolean.

@@ -2,6 +2,7 @@
title = "Client Libraries"
template = "client-list.html"
[extra]
clients_built = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be set to false initially?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, sorry about that — must’ve been left over from an earlier iteration when I was testing it

Signed-off-by: Lior Sventitzky <[email protected]>
@liorsve
Copy link
Contributor Author

liorsve commented Jun 11, 2025

@stockholmux did you run it on macOS? I’ve updated the sed command so it works on both Linux and macOS now, in case that was the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants