DEV Community

Discussion on: blog-cli: A CLI for Blogging with Static Site Generators

Collapse
 
peterwitham profile image
Peter Witham

This is a great idea for a tool, two questions

  1. Is it possible to edit the frontmatter template easily to make it work just the way you want for any given site?

  2. Can it work with multiple blogs?

Keep up the great work!

Collapse
 
kahlil profile image
Kahlil Lechelt

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...

Collapse
 
peterwitham profile image
Peter Witham

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.

Thread Thread
 
kahlil profile image
Kahlil Lechelt

Sweet, looking forward to it.

Thread Thread
 
kahlil profile image
Kahlil Lechelt • Edited

Here is an idea: blog-cli could just check if there is a blog-cli property in the package.json that has a property pathToPosts 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:

{
  "blog-cli": {
    "paths": {
      "work-blog": "/my/work/blog/posts",
      "personal-blog": "/my/personal/blog/posts"
    }
}

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.

Thread Thread
 
peterwitham profile image
Peter Witham

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

Thread Thread
 
kahlil profile image
Kahlil Lechelt

I made an Electron app based on blog-cli now: kahlillechelt.com/2019/05/07/annou...

Thread Thread
 
peterwitham profile image
Peter Witham

Great! I will be taking a look at it.