The content is not going to be all dev-related, so dev.to
API is not an option.
What about WordPress API? Is it a good choice? BTW, I hate WordPress, because the editor isn't Markdown-based.
When I google for static site generator
, everyone seems to forget that the number of contents can get large, like so many pages -- and I want the content to be save in Markdown.
Some other reasons to use an API.
- Searchable blog is more efficient with an API -- https://www.gatsbyjs.org/docs/adding-search/#use-an-api-based-search-engine
- I want to put comment engine in the API as well, if possible
- I think comment is not possible on a SSG without an API
Top comments (5)
If you're looking for hosting mostly content, you can't go wrong with Jekyll (jekyllrb.com).
Then, instead of pulling your content from an API, you host your content in git as part of your blog and deploy new pages using automated build triggers in whatever git provider you use.
Github becomes your CMS, and editor! You can blog/write content in Markdown in whatever editor you like and push to github to be automatically deployed, or you just do it manually from the github web interface.
You can then integrate whatever tooling you want into github(or bitbucket, etc) to manage your workflow to suit your needs.
If you use Jekyll, would you let
_post/
folder to contain more than hundred of files? Wouldn't that be hard to query?Also, how would you customize markdown?
Well in this case Jekyll becomes your cms and static site generator. You wouldn't pull your posts from Jekyll and then display them somewhere else.
As for the customizations, thr markdown is converted into HTML and css in the browser. You would use the same tools as you would any other static site. You could work from existing Jekyll templates, or create your own from scratch as needed.
I wrote a static site generator that uses a single Markdown-ish file for input. It has support for JSON-feed and RSS-feed. I use it for Plurrrr, a tumblelog.
Are you considering using a headless CMS? Here's an article with more info on that in case it is something of interest: buttercms.com/blog/static-site-cms...