Comments (3)
Thanks @marcfilleul
Really appreciate it! I'm super pumped about this project. I was often looking for a Simple Static Site Generator, but hadn't really found one that made me happy or excited. That's why Static was born 😄
That Eleventy fetch package would probably work really well. Do you know the JSON format that is output from Airtable?
Here are a few ways we might do that
Using the Markdown as content
As long as the Markdown files get placed in the content
folder it should be able to parse it. If it has frontmatter, you should be able to access it like normal.
On the otherhand if you wanted to loop through data such as a set of posts, you could add that as a collection.
Using the data in a collection
If you want to use that data as a collection
, you could create it as a JSON file, such as posts.json
in the collections
folder. This could change down the road, but for now collections only work with a flat array of JSON data, like this:
[
{
"title": "Title Here",
"description" : "description here..."
},
{
"title": "Title 2 Here",
"description" : "description 2 here..."
},
{
"title": "Title 3 Here",
"description" : "description 3 here..."
}
]
Whereas this would not work:
[
{
"title": "Title Here",
"description" : "description here...",
"date" : {
"month" : "Jan",
"year" : "2018"
}
}
]
Unless you transformed that data 👆 into a flat array and then placed it to the collections
folder.
I've also thought about the idea of adding a 'Plugin' system, where you could build additional functionality into Static by leveraging events throughout the build process. Let me know your thoughts 😁
Thanks as well for being the first issue submitter 👏
from static.
I realize I should try to work on it before asking so let's pause this issue for now ;)
I'm going to try eleventy-fetch to fetch external json data and see if I can make it work.
Regarding the Airtable flavoured markdown coming from my json data, I will make some tests too.
from static.
Thanks a lot for the detailed answer!
My json output from Airtable is not a flat array so it will spare me some time scratching my head 😅
I made some tests to see how far I could go compared to the Astro starter I've tailored for my clients.
There are too many limitations for my needs currently but I will follow this great journey!
I'll be happy to use Static for side projects and to help with feedbacks or ideas.
Keep up the good work 👏
Best regards.
from static.
Related Issues (13)
- Wrong install command for templates in templates GitHub repo HOT 1
- New Website Initialization Fails, Missing package.json HOT 10
- Page transitions guide? HOT 1
- Updating main.css doesn't trigger live reload HOT 2
- Reverse ordering of collections HOT 1
- SASS support HOT 1
- build command for subfolder not working... (github pages subfolder) HOT 2
- Tailwind @apply is not working on 'static dev' but works in built
- issues with self closing tag, space between start and end dag, and using {slot} inside component HOT 1
- the version of Node HOT 1
- Can not install
- Failed to create project due to null value of "global-modules-path"
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 static.