Comments (2)
Right now, I sanitize the entire object before saving it. If you have an empty string it gets removed from the object altogether.
Can you help me understand why you need to save empty/falsy attributes in your frontmatter? Do you leverage that in any particular way in your website?
from pages-cms.
To be blunt because there's a lot of bad code that does stuff like this:
{{ $artists := where $.Site.Data.artists.artists "name" $term }}
{{- range $artists -}}
{{- $countryData := (index $.Site.Data.countries .nation) -}}
{{- end -}}
Which expects a value to be there. Yeah, definitely, the code should be more defensive and do a check that .nation
exists.
from pages-cms.
Related Issues (20)
- One folder per post HOT 5
- Support Toml config and front matter HOT 3
- Support for yaml lists HOT 3
- Setting content extension or filename to json allows editing but fails to list HOT 6
- Support for empty image paths
- Settings for HTML files HOT 2
- List with no names for its fields
- Zola Support "Failed to parse frontmatter for 1 entry. Your settings may be wrong." HOT 10
- Docker Image HOT 7
- feat: add customizable git messages HOT 1
- feat: add draft functionality HOT 2
- Use .env file HOT 2
- Info: Custom domain authorization callback URL to matches the BASE_URL
- Feature: Improve builtin text editor HOT 5
- [Feature] Add Option to Specify Root Folder or Discover .pages.yml HOT 4
- Media location for a folder per post HOT 3
- Problems deploying to Cloudflare HOT 7
- Too many open branches from dependabot HOT 1
- Dual Collections Results In Text Block HOT 2
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 pages-cms.