Comments (6)
What's the usecase there? We are already serializing the front-matter
from zola.
Basically, the idea is to offer a way to get around some of the restrictions on hidden pages by offering a way to load a "page" in a limited capacity from an external file. Not the full parsing of a page, just the ability to parse the front matter correctly.
Right now I'm trying to switch from an existing jank, custom setup to using zola for generating my website, and one of the existing pages under that jank setup is my CV, which is made up of a bunch of sections that could be all included in one massive page file, but would probably be easier if split up. It would be nice to be able to colocate the metadata (front matter) in the files instead of having to load two files each time, and when I tried to make a macro for it, it didn't really work out well.
The thought is, adding proper ways to have "hidden" or "internal" pages seems way out of scope, but adding in a method to parse the front matter in templates feels like an okay compromise. It would also let you separate out some content pages into multiple files without having to create dedicated pages for them, since you could embed those parts using shortcodes.
from zola.
The thought is, adding proper ways to have "hidden" or "internal" pages seems way out of scope,
We do have render = false
on sections currently exactly for that purpose
from zola.
Oh, I totally missed that, then. There isn't a render = false
option for pages but I guess that making a page into a "section" that isn't rendered would probably work fine.
EDIT: Hmm, running off of master, it still seems to render index.html
for sections even if I have render = false
in their _index.md
files. I'm not 100% sure how this is supposed to work, but at minimum the docs really aren't that clear.
from zola.
Yeah it's lacking in page
right now.
Can you share an example? In the code, the template rendering is after the render
check so it shouldn't happen
from zola.
I don't want to share my existing example because it's a mess, but I'll try to create a minimally reproducible version since it'll probably help resolve the confusion. I tried looking into the code but I didn't quite understand the one if statement that seems to be branching on this flag, and whether it would be enough to fully stop the rendering. I'd have to understand more about the code structure to really know if it's working properly.
EDIT: Okay, I see the issue. I thought I had cleaned the public
folder multiple times after setting render = false
but I actually hadn't, and it is working properly.
The only bug I can see is that it's still generating empty folders, which I guess isn't the worst, but maybe I'll look into the code later how it can be done. I'll also try and see if I can implement a version of render = false
for pages, since that seems like the best path forward.
from zola.
Related Issues (20)
- Fetaure Request: Add the possibility to pass the language to get_section HOT 2
- Unnecessary configuration or unnecessary warning with `generate_feed` in multilingual site HOT 2
- Feature request: build a non distroless docker image HOT 3
- IPv6 address links don't get rendered properly HOT 4
- Feature request: tags for zola themes
- Hope provide Linux musl pre-builds , even if it's slow. HOT 4
- BibTeX: load_data fails on non-numeric values in the "month" field HOT 5
- Section that is nested under a page takes file path instead of URL path HOT 4
- Multilang index.md results in Error: We can't have a page called `index.md` in the same folder as an index section in HOT 3
- get_url returns url for wrong language HOT 2
- Stack overflow when blog count is too high HOT 10
- Feature request: build datetime HOT 4
- Add support for relative links (../content/page) to broken link checker HOT 9
- `zola serve`: option to store html files on disk. HOT 1
- "`feed_filename` for default language is specified twice" even though it's not HOT 4
- Add OPDS Support to Zola HOT 2
- Docker image for 0.18.0 is broken HOT 9
- Dark mode for docs? HOT 1
- Feature request: Add `hidden` property for frontmatter HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zola.