askonomm / babe Goto Github PK
View Code? Open in Web Editor NEWA data oriented static site generator.
License: MIT License
A data oriented static site generator.
License: MIT License
Current data mapping isn't very flexible, cannot map a single item or combine multiple. Therefore I think it should be changed to something like this:
{
"data": {
"posts": {
"content": "blog",
"sortBy": "date",
"order": "desc"
}
}
}
Now the key of an item inside "data" is the variable name, the content
in it would determine what to map to that variable. For example if the content
is just a string like blog
it will attempt to look for everything inside of a blog directory. However if you changed it to something like blog/hello-world.md
, then the only thing that would be mapped to that variable is that singular content item. Similarly, you could pass an array instead, like this:
{
"data": {
"posts": {
"content": ["thoughts", "ideas"],
"sortBy": "date",
"order": "desc"
}
}
}
And this would combine data from two different directories. You can also pass an array of actual content items for more fine control.
And we'd also want to group stuff, so we could pass an additional groupBy
to each data item which could take a meta key (easy to implement) and additionally what I would also like to have is to have some special grouping abilities for built-in special meta fields like date
. Say you wanted to group your blog posts by year, perhaps could pass it as groupBy: "date|year"
, or something of that nature. I think this would open up a lot of possibilities.
If there are errors in your templating, the watcher dies and no errors are shown, which can confuse the user.
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.