Comments (8)
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.
I don't understand the problem you're facing @clarfonthey , once data is under "extra" inside the front matter it's only a matter of accessing it at "page.extra.foo".
What I am struggling with it getting the data inside extra. As I'm using Decap CMS.
I'm likely totally missing what you're trying to do, apologies if I'm talking across ye!
from zola.
Yeah, my issue was that I couldn't make pages without them actually showing up as pages in the index, in the sitemap, etc.
But that seems like it's going to get fixed, so, I should really just close this.
from zola.
Related Issues (20)
- Longevity of Zola HOT 1
- Slugify of german umlaute (ä, ö, ü) HOT 3
- Including multiple template files with unknown names in other templates HOT 1
- Function call `load_data` fails on next branch. HOT 1
- In Zola templates that extend another template, variables declared at top-level are not available in blocks HOT 2
- Question about `regex_replace` HOT 1
- How do I get a relative link to a page? HOT 3
- Suggestion: compress_sass_output config option HOT 7
- Register a function in Tera HOT 5
- Compile error when the same taxonomy tag is used twice with different case HOT 1
- Ignore links to #top when checking anchors HOT 1
- Zola does not recognise sections HOT 2
- [bug] page.taxonomies.tags not found in context, but it is there
- Zola should detect cyclic extends with a clean message HOT 1
- Slow build HOT 7
- GitLab CI/CD gets stuck
- Build fails if there is a mistake in commened out template code HOT 3
- Question about taxonomy and sections HOT 1
- Question: How to organize news feed items?
- Zola theme not working HOT 1
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.