getzola / themes Goto Github PK
View Code? Open in Web Editor NEWCreates the templates section to be used in Zola doc site
License: MIT License
Creates the templates section to be used in Zola doc site
License: MIT License
I see the "update all themes" action ran successfully this morning. However it didn't trigger the other action that creates the PR to the main zola repo.
Digging around, I came across this answer:
https://github.com/orgs/community/discussions/27598#discussioncomment-3279511
If you want the push from an action to trigger another action, you need to create a PAT and use that to authorize the push
Not sure if you want to setup a PAT to be used in the action? If you do, then it would be pretty straightforward to update the action. I'll gladly make the PR.
name: Update all themes
on:
workflow_dispatch:
schedule:
- cron: "51 5 * * 1"
jobs:
update-all-themes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
+ token: ${{ secrets.GH_PAT }}
- name: Update submodules
run: "git submodule update --remote"
- name: Commit and push changes
run: |
git status
if [[ `git status --short` ]]; then
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "Update all themes"
git push
fi
If someone has experience with GitHub automation, it would be nice to generate automatically the theme site after a merge occurs in master.
The generate_docs.py
script halts when a theme's TOML is malformed, preventing further processing of other themes. Proposing to capture and log these errors instead of stopping the entire process, and then display a summary at the end.
While using the generate_docs.py
script, the process halts entirely when encountering a theme with a malformed TOML, such as duplicate keys. This is currently happening with the zola-henry
theme: sirodoht/zola-henry#6
If a theme's TOML has a duplicate key or any other TOML error, the script halts entirely. This means that a single theme with a malformed TOML can stop all subsequent themes from being processed.
While the current behavior makes it evident which theme has an error due to the halt, this approach may not be ideal if the goal is to update/process all themes that have no errors.
# Global scope
errors = []
# Inside Theme class constructor
try:
with open(os.path.join(self.path, "theme.toml")) as f:
self.metadata = toml.load(f)
except Exception as e:
error_message = f"Error parsing TOML for theme {self.name}. {str(e)}"
errors.append(error_message)
self.metadata = None
return
# At the end of the script
if errors:
print("\n\n---- ERRORS ----")
for error in errors:
print(error)
It might also be a good idea to add a summary line at the end of the script that tells how many themes were successfully processed and how many had errors:
print(f"Processed {successful_count} themes successfully. Encountered errors in {error_count} themes.")
I'd be happy to create a PR with the suggested changes.
particle repo link needs water... 404 on this page
https://www.getzola.org/themes/particle/
https://github.com/svavs/particle 404
Assalamualaikum
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.