justint / papaya Goto Github PK
View Code? Open in Web Editor NEWA clean Zola theme for blogging and projects.
Home Page: https://justintennant.me/papaya/
License: MIT License
A clean Zola theme for blogging and projects.
Home Page: https://justintennant.me/papaya/
License: MIT License
We should get some kind of automated testing set up for new releases of zola, to avoid an instance of breaking changes like #9 happening again.
Originally posted by @justint in #9 (comment)
Your justint.github.io
repo's README
states:
Don't just fork/copy: there are specific things in here developed just for this site alone [...]
However, adding the Papaya theme is rather frustrating compared to doing exactly the above: forking justint.github.io
.
I start from a clean zola init
and add the theme.
After doing everything before Customization in the README
.
❯ zola serve
Building site...
Warning: config.toml contains both default language specific information at base and under section `[languages.en]`, which may cause merge conflicts. Please use only one to specify language specific information
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 0 pages (0 orphan) and 2 sections
Error: Failed to serve the site
Error: Failed to render pager 1
Error: Reason: Failed to render 'blog.html'
Error: Reason: Variable `config.extra.color_mode` not found in context while rendering 'blog.html'
Ok, so I add color_mode
to my config.toml
. This is not mentioned anywhere in the README
btw.
Try again:
❯ zola serve
Building site...
Warning: config.toml contains both default language specific information at base and under section `[languages.en]`, which may cause merge conflicts. Please use only one to specify language specific information
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 0 pages (0 orphan) and 2 sections
Error: Failed to serve the site
Error: Failed to render section '/home/moritz/code/virtualritz.github.io/content/_index.md'
Error: Reason: Failed to render 'index.html' (error happened in a parent template)
Error: Reason: Variable `config.extra.menu_items` not found in context while rendering 'index.html'
Ok, so the menu is mandatory. I read the resp. Customization section, add it, and try again:
❯ zola serve
Building site...
Warning: config.toml contains both default language specific information at base and under section `[languages.en]`, which may cause merge conflicts. Please use only one to specify language specific information
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 0 pages (0 orphan) and 2 sections
Error: Failed to serve the site
Error: Failed to render section '/home/moritz/code/virtualritz.github.io/content/_index.md'
Error: Reason: Failed to render 'index.html'
Error: Reason: Function call 'resize_image' failed
Error: Reason: `resize_image`: Cannot find file: /static/banner.jpg
That's when I gave up and forked justint.github.io
and started modifying it. ☺
I guess I am trying to say: if you want users to not fork justint.github.io
there are two options:
zola serve
succeeds after adding the Papaya theme?justint.github.io
but stripped of specifics.Hello,
thanks for the clean and simple theme papaya !
Papaya now has i18n support, thanks to #3 ! 🎉
It would be great to add a language selector to the theme, to allow for easy switching to different languages.
This selector would ideally auto-populate the language options based off of what's defined in the config.toml
and stay within the general theme's aesthetic. Perhaps it could be added to the footer as a simple listing of language options, eg:
$ zola serve
Building site...
Warning: config.toml contains both default language specific information at base and under section `[languages.en]`, which may cause merge conflicts. Please use only one to specify language specific information
Error: Failed to serve the site
Error: `title` for default language is specified twice, as "Papaya" and "Papaya".
The warning is related to #12, which I need to update the theme on since the dependent changes in zola have now been released.
I'm getting this error when building papaya with zola v0.16.1:
Error: Failed to serve the site
Error: Page `\\?\C:\Users\Justin\\papaya\content\blog\another-post.md` has taxonomy `tags` which is not defined in config.toml
Have not figured out the cause yet, will be investigating.
Hi!
Noob here, was attracted by how well-thought out and well-designed the theme is! (disclaimer to let you know this may be totally a me issue)
You mention in the guide that the theme supports additional languages. I was wondering if there is a clean way to remove this ability? When I try to remove language related lines in config.toml or in any other place, the site refuses to build, missing various language related items in multiple places.
Edited - Thanks Justin, it works! Wanted to follow your lead and not mark it closed, so didn't comment on your reply (close with comment).
I want to create a hierarchy in Projects like:
Media
Software
Hi, I'd like to add i18n support to this clean theme. I'm a newborn to Rust/Zola/Tera, so my knowledge is limited. I found three ways to do that:
base.html
, replace every language-specific text with corresponding variable. One problem is variable defined in base template cannot used inside macro, so variables can only be passed into macro by using additional parameters. Another problem is the path of extends
keyword must be static, so in order to switch language it seems must change the path of extends
keyword instead of changing config.toml
.i18n::text(key)
, then use i18n::text(key="recent_projects")
to get that text. This method seems better than method 1, but the macro definition is unelegent and will be very huge.{% macro text(key) %}
{% if config.extra.lang == "en" -%}
{% if key == "recent_projects" -%}
Recent projects
{% elif key == "recent_blog_posts" -%}
Recent blog posts
{% elif key == "about" -%}
About
{% endif -%}
{% elif config.extra.lang == "zh" -%}
{% if key == "recent_projects" -%}
近期项目
{% elif key == "recent_blog_posts" -%}
近期博文
{% elif key == "about" -%}
关于
{% endif -%}
{% endif -%}
{% endmacro %}
config.toml
. This method is the simplest way, gives user more control of language-specific text, but the config.toml
will be large.<nav>
<ul>
<li><a href="http://127.0.0.1:1111//projects">Projects</a></li>
<li><a href="http://127.0.0.1:1111//blog">Blog</a></li>
<li><a href="http://127.0.0.1:1111//tags">Tags</a></li>
<li><a href="http://127.0.0.1:1111//about">About</a></li>
</ul>
</nav>
This commit attempted to solve this problem, but introduced a new issue where the menu items would be missing a "/" inbetween the base url and the menu item slug (eg: justintennant.me/papayablog instead of justintennant.me/papaya/blog) for sites hosted within a directory of a domain (eg: justintennant.me/papaya). I've since reverted it until I can find a more elegant solution.
Hi,
I noticed that Zola stop building and report a file not found error for a featured image when the folder contain a capital letter or an underscore in its name and a featured image is called in the index.md :
Error: Reason: resize_image
: Cannot find file: "file path and name"
It works fine when no capital are in the folder name.
Light/dark mode is now implemented as an automatic swapping feature in the opeik/main branch.
It would be great to let people customize in their config.toml if they want the mode set as auto
, light
, or dark
.
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.