My blog is built with Hugo. Every blog I ever had was built with a static site generator or a file based CMS. I love static site generators, they m...
For further actions, you may consider blocking this person and/or reporting abuse
This is a great idea for a tool, two questions
Is it possible to edit the frontmatter template easily to make it work just the way you want for any given site?
Can it work with multiple blogs?
Keep up the great work!
Currently it is not possible to configure the front matter. But that could be added as a feature quite easily. Feel free to send a PR :D
If you want to switch to a different blog just set a new path. This could be made easier too though...
Thanks for the reply, I plan to put some time aside to take a deeper look and see if I can contribute something useful to it.
Sweet, looking forward to it.
Here is an idea: blog-cli could just check if there is a
blog-cli
property in the package.json that has a propertypathToPosts
or something and if yes it could just use that.Multiple blogs could be suported by adding multiple paths in there that have an alias name as a property or something:
And then there should be a command line flag that should allow you to switch between blogs, like:
blog --switch-to work-blog
for example.I think I'd need to see an implementation of the idea to really get it.
I have been working on adding the ability to work with more than one template and to set a template path, I have it working but I need to clean it up a little and test for when it's not specified.
Once I have it done I'll submit it as a pull request, my fork is here
github.com/GrfxGuru/blog-cli
I made an Electron app based on blog-cli now: kahlillechelt.com/2019/05/07/annou...
Great! I will be taking a look at it.
Being aware of this issue I wrote my own static site generator differently: it uses a single input file. While I use it mainly to generate a blog, Plurrrr, it certainly can be used to generate (small) sites with it as well. The SSG is available on GitHub: tumblelog.
Hi Kahlil,
I hope it will work with Pelican as well.
Hi! What is Pelican?
It's Static site generator written with Python.
So far its not specific to any static site generator. All you need is a folder with markdown files that contain your posts and front matter. If Pelican has a different file format or doesn't use front matter, that can be added quite easily. You can send a PR if you want.
Yes, pelican blog posts are written in Markdown. This should work then. Thanks a ton.
Check it out I made an Electron app to do the same with a GUI kahlillechelt.com/2019/05/07/annou...
oh wow, didn't know about that one. Thank you very much!
Happy to! π€
How do you upload images and embed them?
blog-cli doesnβt help you there besides with the publishing. Youβll have to put the image into the folder your static site generator requires and then you just reference it as you would before in the MD file. Images and text will typically be deployed via a git push and then a Webhook from Netlify for example.
blog-cli is just a thin convenience layer over a static site generator.