Comments (5)
I would be open to adding :date
to the post metadata but can you clarify what the use case for the :slug
would be?
from cryogen.
:slug
may ultimately be misplaced and should exist in the main config file. I haven't thought it through completely yet, to be honest.
The use case involves the situation where you want to alter the URL structure of your site. Currently (unless I'm mistaken) you can't have a post URL be something like example.com/posts/fizzbuzz
or example.com/posts/1
where the post slug is just the title or an ID number or something else outside of the current fixed structure of YYYY-MM-DD-title.html
.
I can imagine a solution to this involving some sort URL structure key in the main config.edn
file.
from cryogen.
Currently (unless I'm mistaken) you can't have a post URL be something like example.com/posts/fizzbuzz or example.com/posts/1 where the post slug is just the title or an ID number or something else outside of the current fixed structure of YYYY-MM-DD-title.html.
Well if you want you use a structure outside of yyyy-MM-dd-title.md
for the Markdown files then the :date
parameter would take care of that by allowing you to just name your file as title.md
.
Your use case is a little confusing to me. It sounds like you want to use the slug as a post's uri when it ultimately gets rendered into an html file so why should it exist in the main config file? This implies that the slug parameter should be post-specific, not global. If this is the use case that you're going for then it doesn't really seem like a feature worth adding because how often is a user going to name their Markdown file foo.md
but want it to render as bar.html
?
from cryogen.
I think that's a much clearer line of reasoning than I had. My only remaining use case that could be solved with some clever URL rewriting on the server is the case where you have a post called foo.md
and it renders as foo.html
but you actually want it rendered as foo/index.html
. I know that this is something that Jekyll and other static site generators offer as an option, but it may not fit into the design goals of Cryogen.
Unless there are objections, I think I'll work on adding :date
to the post metadata as a pull request over the next couple of days.
from cryogen.
It's still a very niche use case so I'd say go ahead with the :date
parameter but let's leave out the :slug
.
from cryogen.
Related Issues (20)
- Add support for author avatar and bio for multiple authors HOT 1
- How to change the port for `lein serve` HOT 4
- [feature] pagination for posts summary HOT 1
- [feature] unique files names HOT 1
- `clojure -M:build` exite code HOT 1
- Sass-location theme error, with fresh project, using lotus/nucleus HOT 1
- deploy in nginx, but" hljs is not defined" HOT 1
- Doc: "full build" is only mentioned in the end. HOT 3
- MathJax integration HOT 2
- RSS feed: only publishes article's "summary" HOT 2
- deps-new error when creating a new site HOT 2
- Auto-refresh feature doesn't work with Nucleus template. HOT 1
- How to upgrade old blog to newest version of Cryogen HOT 1
- How to set one post to the home page HOT 1
- Router serving static-file only works locally HOT 6
- Lotus Theme error, "resource content/themes/lotus/img not found" HOT 2
- The `/blog/blog/` problem HOT 3
- Cryogen does not list as a clojure project HOT 2
- Feature Request: Marking posts as "unlisted" HOT 3
- `lein serve` fails with "The BROWSE action is not supported on the current platform!"
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 cryogen.