News for hackers. Stuff that matters.
Re:Blogging Like a Hacker (2008) by greggman2 on Wednesday September 18, 2019 @07:43PM (#21011725)
I switched to a static site gen and a git repo. I lost the ability to preview. Sure, if I'm at home I can run the build script, launch a simple server, navigate to the page on localhost but it's a long way from say wordpress (previous solution) where it was a much nicer experience to preview.

Adding images into a post was also nicer. Just drag and drop instead of copy into folder, check into git, manaully type urls like it is now.

I use a private repo on github so at least I can add something without having to be at my computer but still no preview or nice UI.

Any static generators have well designed solutions for this?

Re:Blogging Like a Hacker (2008) by Eiriksmal on Thursday September 19, 2019 @01:11AM (#21013469)
A markdown-based blog lets you preview, if you're typing into an editor that supports previewing markdown. I do my long-form writing in LibreOffice Writer (because Fedora), then the "blogging"/translating bit in PyCharm in a markdown file. PyCharm has a rich markdown previewer, so I can write short posts in it, without the translation step.

I'm not personally aware of a static site generator that supports drag-and-drop images, but nothing stops such an extension/plugin from existing. When I want to embed an image on my site, it goes into an /images/[year]/ folder and is referenced in the markdown file with the manually-typed partial URL, as you mentioned.

Re:Blogging Like a Hacker (2008) by greggman2 on Thursday September 19, 2019 @11:38AM (#21017213)
My blog uses many custom features not found in plain markdown so a simple markdown preview found in some editors isn't helpful for verifying the post will work correctly.
Re:Blogging Like a Hacker (2008) by chmaynard on Thursday September 19, 2019 @12:14AM (#21013229)
> I lost the ability to preview.

Not really. You can keep the local server running and a browser window open. The server can be configured to regenerate the site as changes are made. Simply refresh the page to see your changes.

Re:Blogging Like a Hacker (2008) by greggman2 on Thursday September 19, 2019 @11:36AM (#21017196)
I have many machines I work from. So no that won't work as easy as a non-static site. Wordpress I can edit and post from my phone. Can't run the static site generator on my phone
Re:Blogging Like a Hacker (2008) by tylery on Friday September 20, 2019 @12:58PM (#21028851)
If you use Netlify to deploy your static site, they have a nice Preview feature you can use.