News for hackers. Stuff that matters.
Re:Show HN: Bear – Minimal blogging platform by jedberg on Tuesday May 26, 2020 @04:51PM (#23316239)
Things I would like in a blogging platform:

* Generate lightweight static website

* Good clean default CSS so I don't have to mess with it

* Automatically upload website to CDN and trigger expirations as necessary.

* Self-hosted

* Runs on AWS Lambda or any other Function as a Service equivilient

* Has a super lightweight CMS that I can easily use on both desktop and mobile, so if I have ideas I can start writing anywhere, and can also make minor corrections to existing posts while on the go.

* The CMS can be a frontend to git, but git is hard to use on mobile, so I don't want the CMS to just be git.

If anyone knows of something that meets these requirements I'd be super grateful!

Re:Show HN: Bear – Minimal blogging platform by harikb on Tuesday May 26, 2020 @05:53PM (#23316868)
If you have static generated website and a CDN, why do you need Lambda/Function? Or do you mean these as a set to pick and chose from?
Re:Show HN: Bear – Minimal blogging platform by jedberg on Tuesday May 26, 2020 @06:01PM (#23316936)
The lambda would generate the static website after I type words into a webpage and then upload that site to the CDN.

It would also be the code behind the web page where I write the words.

Re:Show HN: Bear – Minimal blogging platform by harikb on Wednesday May 27, 2020 @12:52AM (#23319486)
Looking at your profile, I get the sense you are trolling :) but I have a bad time imagining the need for the elasticity of lambda for those single-user actions.
Re:Show HN: Bear – Minimal blogging platform by johntash on Wednesday May 27, 2020 @01:14AM (#23319585)
I'm not sure whether it's what they meant, but I could see the "admin" cms portion being hosted on lambda.

You'd load a static editor page, write your content, and then post it to a lambda endpoint. That lambda would then generate static pages for your content and push it to s3 or wherever.

Re:Show HN: Bear – Minimal blogging platform by jedberg on Wednesday May 27, 2020 @01:19AM (#23319612)
It’s not the elasticity that matters, it’s the fact that I’d only have to pay for it to run when I want to update the site.
Re:Show HN: Bear – Minimal blogging platform by pier25 on Tuesday May 26, 2020 @09:48PM (#23318578)
Except for being "self hosted" and the "front end to git" we're building that as a commercial service.

https://pluma.cloud/

Not much to show yet but you can follow us on Twitter for updates in a couple of months: https://twitter.com/plumacloud

We're also considering providing our CMS as headless via an API so that you can connect it to your SSG and make your own template, host it wherever you want, etc, but we haven't decided yet on the pricing for that but it would be much cheaper than our main product.

Re:Show HN: Bear – Minimal blogging platform by lrdd on Wednesday May 27, 2020 @08:38AM (#23322263)
I think the mailto: link on your page is misspelt as mailt:
Re:Show HN: Bear – Minimal blogging platform by pier25 on Wednesday May 27, 2020 @10:19AM (#23323686)
Thanks!
Re:Show HN: Bear – Minimal blogging platform by embit on Tuesday May 26, 2020 @07:29PM (#23317652)
You have many requirements to blog. Blogging is substance over style. Not much required.
Re:Show HN: Bear – Minimal blogging platform by regynald on Tuesday May 26, 2020 @05:34PM (#23316670)
https://blot.im/ might be close to what you want. I think it's run on ec2 instances though.
Re:Show HN: Bear – Minimal blogging platform by jedberg on Tuesday May 26, 2020 @05:36PM (#23316708)
It's not self hosted.
Re:Show HN: Bear – Minimal blogging platform by _0vzt on Wednesday May 27, 2020 @02:22AM (#23319947)
It’s close to being conveniently self-hostable:

https://github.com/davidmerfield/Blot

Re:Show HN: Bear – Minimal blogging platform by anderspitman on Tuesday May 26, 2020 @06:09PM (#23317008)
Sounds like you just need a way to modify a remote filesystem, then trigger a build step when you're done with the modifications.

Assuming it was wrapped up in a nice UI, would that be missing any features you need?

EDIT: Put more concretely, if you had a site hosted on S3, all you need is a way to modify the source files of that site, either directly or by modifying files in another directory and running a transform step to produce the final result?

Re:Show HN: Bear – Minimal blogging platform by asiachick on Wednesday May 27, 2020 @08:55AM (#23322438)
For me. Yes, it would be missing features. I have a self hosted blog, the source is on github, there's a trigger on commits.

This sucks compared to wordpress because the UX in wordpress is much better than github and especially because there is no "preview".

There's also no easy way to upload images etc. Certainly not as easy as wordpress.

I'm not going back. I'm just saying "modify the remote file system and trigger a build" is far from what I want.

Re:Show HN: Bear – Minimal blogging platform by anderspitman on Thursday May 28, 2020 @11:38AM (#23338556)
Sounds like previews is the main thing missing though? I don't consider github to be similar to a remote filesystem, because like you said certain simple things like uploading images and other arbitrary data isn't easy.
Re:Show HN: Bear – Minimal blogging platform by jedberg on Tuesday May 26, 2020 @06:14PM (#23317072)
That pretty much sums it up!

It needs to have some sort of awareness of file changes to expire items from the CDN too.

Re:Show HN: Bear – Minimal blogging platform by nxtrafalgar on Tuesday May 26, 2020 @07:52PM (#23317845)
There's no simple commercial solution that does exactly this that I know of, but you can get very close with Google Cloud Functions, a GitHub Pages site, and a Google Sheets spreadsheet as a datastore. Not static, but it is fast, and you get a 'CMS' for free (the spreadsheet). Plus all of these services can be used completely for free.
Re:Show HN: Bear – Minimal blogging platform by manigandham on Wednesday May 27, 2020 @12:13AM (#23319330)
I'd advise just running Wordpress or Ghost. Even a small VPS is more than enough scale and you get a working blog out of the box with easy extensibility for the future. And you can still use a CDN in front.

People think a static site is enough without realizing SEO, RSS feeds, comments, etc, are all things you might need and would have to rebuild yourself.

Re:Show HN: Bear – Minimal blogging platform by jedberg on Wednesday May 27, 2020 @12:36AM (#23319427)
There’s nothing Wordpress can do that you can’t do with a static site. Even comments can be easily bolted on.

I don’t want to pay $5/mo for a VPS when I can run my whole site on AWS for 32 cents a month.

Re:Show HN: Bear – Minimal blogging platform by manigandham on Wednesday May 27, 2020 @02:32AM (#23320004)
Then what is "self-hosted" supposed to be? What CMS are you going to use? Where's that going to run?
Re:Show HN: Bear – Minimal blogging platform by jedberg on Wednesday May 27, 2020 @02:36AM (#23320039)
Control.

With self hosting I can control the code, what it does, the cost, where it stores data, how backups are made, when new versions and updates are deployed, etc.

It’s always a trade off on control, and my comfort point is “on AWS”.

For some people they want their own servers. Some people want to own the network block. It’s just what level of comfort you have with each type of control.

I don’t know what CMS I’m going to use, that was my question. Which one operates the way I want?

It’ll run on AWS lambda or an equivalent.

Re:Show HN: Bear – Minimal blogging platform by manigandham on Wednesday May 27, 2020 @02:44AM (#23320079)
Then try Netlify's CMS: https://www.netlifycms.org/

It's a single-file app. You can host it yourself, and it edits static files in a github/gitlab repo. The deployment after push and hosting with custom domains and CDN is already handled by Netlify. And it's all free.

If you use Jekyl then you can skip Netlify and Github will build and serve your site.

Re:Show HN: Bear – Minimal blogging platform by jedberg on Wednesday May 27, 2020 @02:47AM (#23320096)
Netlify is awesome but isn’t self hosted. I don’t control the deployment and I don’t have access to the logs.
Re:Show HN: Bear – Minimal blogging platform by sequoia on Tuesday May 26, 2020 @05:56PM (#23316905)
I'm struggling to understand what you mean by self-hosted. What does AWS Lambda do in this scenario? Surely not host the blog, so it must be the "cms"? At that point I'm not clear why you'd rule out netlify, as it's no longer "self-hosted." Please clarify! :)
Re:Show HN: Bear – Minimal blogging platform by jedberg on Tuesday May 26, 2020 @06:00PM (#23316932)
My imagined workflow is

* load a web page

* write words

* hit submit

* this triggers a lambda function that generates a static website and puts it on s3

* this triggers another lambda function that pokes the CDN and expires anything that changed

By self-hosted I mean I control all the parts. I can change the generation code, the CDN upload/expiration code, I can change the output, I can view the logs, all within my own account.

Re:Show HN: Bear – Minimal blogging platform by dna_polymerase on Tuesday May 26, 2020 @06:08PM (#23317003)
* Use a texteditor

* Hit save

* Let Hugo/Jekyll/Pelican/whatever compile

* FTP/SCP onto a server

* It's a blog, nobody needs a CDN for that

Re:Show HN: Bear – Minimal blogging platform by jedberg on Tuesday May 26, 2020 @06:13PM (#23317060)
* Use a texteditor

Where? On my iPhone?

* Hit save

Where does it save it to?

* Let Hugo/Jekyll/Pelican/whatever compile

Where does that happen? If I want to write on my phone it won't compile on my phone.

* FTP/SCP onto a server

From my phone? Also I specifically don't want to run a server, or more specifically, I don't want to pay for a server to run all the time.

* It's a blog, nobody needs a CDN for that

If you're writing about high scalability, it's a bit embarrassing and ruins your credibility if your site isn't speedy worldwide.

Re:Show HN: Bear – Minimal blogging platform by alexktz on Tuesday May 26, 2020 @06:55PM (#23317424)
Write on your phone, commit to git, have some CI build it and deploy. Simples :)
Re:Show HN: Bear – Minimal blogging platform by jedberg on Tuesday May 26, 2020 @07:01PM (#23317464)
> Write on your phone,

Ok that part's easy.

> commit to git

How? I've never seen a good git client for the phone

> have some CI build it and deploy.

Step one, draw a circle. Step two, draw the rest of the owl. :)

While this might be a fun exercise, it's more involved than deploying some code to Lambda.

Re:Show HN: Bear – Minimal blogging platform by mbreese on Wednesday May 27, 2020 @12:19AM (#23319357)
I don’t know... I have a Github actions workflow that on a commit, it builds a site (mkdocs) and upload it to a gh-pages branch for hosting on Github. You could also push the generated html to S3.

That coupled with Working Copy could be a pretty good mobile workflow.

For me, this was much easier than deploying Lambda code and managing How all of that worked together. Using Github Actions wasn’t much more than setting up a deploy script.

Re:Show HN: Bear – Minimal blogging platform by darkteflon on Tuesday May 26, 2020 @07:13PM (#23317548)
Fwiw, Working Copy on iOS is a good git client.
Re:Show HN: Bear – Minimal blogging platform by asiachick on Wednesday May 27, 2020 @09:00AM (#23322480)
Have that. It sucks. UI on github sucks (need something I can access anywhere, not just my desktop, thought github might cut it, it doesn't). Uploading images sucks. No preview sucks. I suppose I could trigger to staging but that means I have to commit just to see a preview then wait for the entire process vs say wordpress which has instant preview.

Managing posts also sucks. I can pre-date posts but I can't at a glance get a list of posts with data about each one. Instead I just get a file listing and have to open each file and read its headers to see its metadata (date, title). Publish vs unpublished also suck. I have folders for my posts and another folder for drafts but moving something from one to the other is no fun compared to just checking a box in wordpress.

Re:Show HN: Bear – Minimal blogging platform by jlelse on Wednesday May 27, 2020 @10:32AM (#23323893)
I've build something like this using Hugo as a SSG and a custom Micropub-backend that commits new content to a Git repo and pushes it to a Git hosting platform. That then triggers a CI build for the site generation and upload to the webserver as well as a CDN purge.
Re:Show HN: Bear – Minimal blogging platform by jedberg on Wednesday May 27, 2020 @02:11PM (#23327395)
Awesome! Is your code available anywhere?
Re:Show HN: Bear – Minimal blogging platform by j1elo on Tuesday May 26, 2020 @05:32PM (#23316655)
Maybe a static blog (e.g. Hugo), hosted on Netlify and making use of their netlify-cms package?
Re:Show HN: Bear – Minimal blogging platform by jedberg on Tuesday May 26, 2020 @05:35PM (#23316695)
Netlify is awesome and I love their service, but it's not self hosted. In particular you have to pay lots of money to get logs.
Re:Show HN: Bear – Minimal blogging platform by j1elo on Tuesday May 26, 2020 @06:10PM (#23317016)
I wonder if you can self-host the netlify-cms thing, though. That might be just what you wanted.
Re:Show HN: Bear – Minimal blogging platform by jedberg on Tuesday May 26, 2020 @06:19PM (#23317107)
From what I can tell from reading the docs on netlify-cms, it only works if you use Netlify as your CDN.

I could very well be wrong though.

Re:Show HN: Bear – Minimal blogging platform by davish on Tuesday May 26, 2020 @06:41PM (#23317298)
Netlify CMS uses the GitHub (or bitbucket, etc) API to modify your repository with the new/updated content. You can self-host the entire system, or have netlify handle the GitHub auth while you self host your website.
Re:Show HN: Bear – Minimal blogging platform by jedberg on Tuesday May 26, 2020 @06:51PM (#23317393)
But what happens after it's committed to git? What turns a git checkin into a CDN distribution?
Re:Show HN: Bear – Minimal blogging platform by davish on Tuesday May 26, 2020 @07:38PM (#23317729)
You could use GitHub actions to do the build and send it off to some CDN to deploy, or if you were self-hosting the whole thing, you could have a Flask app listen for a webhook and re-build your site when that's received. Or simply pull in from the git origin and rebuild with a cron job.
Re:Show HN: Bear – Minimal blogging platform by jedberg on Tuesday May 26, 2020 @07:44PM (#23317776)
I guess what I'm getting at is doing that would be a big patchwork of putting all that together. Not a unified system. I'd gladly make a one time payment for a unified piece of software that does everything (or of course gladly adopt something open source).

Also, to your specific example, does there exist a Flask app that runs on AWS lambda that can listen for a webhook and then build a static website?

Does there exist code that I can put into Github actions that builds a static website and uploads it to a CDN?

That's basically what I'm looking for.

Of course I could write my own solution or cobble it together with a bunch of moving parts, but my whole point is that I'm looking for an existing package that already does it.

Re:Show HN: Bear – Minimal blogging platform by garethmcc on Wednesday May 27, 2020 @04:44AM (#23320876)
If you use a tool like the Serverless Framework, you can "cobble together the moving parts" and store it into GitHub and make it easily deployable into the cloud. Putting together pieces is what software development is. If you are used to OOP this is even more relevant as the entire idea of OOP is to create discrete pieces of code and compile them together.

PHP for example used to be a "big patchwork" of seperate files working together, but the right tooling came along to think of it as "a unified system". Same thing with Serverless and the Serverless Framework

Re:Show HN: Bear – Minimal blogging platform by davish on Tuesday May 26, 2020 @08:33PM (#23318160)
Just found this module as a GitHub action:

https://github.com/marketplace/actions/s3-sync

Shouldn't be too difficult to hook this up to a build command for hugo, jekyll, or whichever static site generator you'd prefer. But this gets away from the self-hosted part of what you were saying a bit.

Re:Show HN: Bear – Minimal blogging platform by deefour on Tuesday May 26, 2020 @05:37PM (#23316713)
I absolutely love Netlify.
Re:Show HN: Bear – Minimal blogging platform by gwbas1c on Tuesday May 26, 2020 @06:44PM (#23317323)
Search around a bit, there's a static website generator that runs on git and is hosted by CDNs.

I can't remember the name, but it's commercial and targets major companies for making their landing pages.

Re:Show HN: Bear – Minimal blogging platform by alexktz on Tuesday May 26, 2020 @06:49PM (#23317375)
Hugo?

gohugo.io

Re:Show HN: Bear – Minimal blogging platform by pacifika on Wednesday May 27, 2020 @04:13AM (#23320652)
Re:Show HN: Bear – Minimal blogging platform by Fiveplus on Tuesday May 26, 2020 @11:09PM (#23318998)
Quick Question: Why is self-hosted a thing that's highly desirable on HN?
Re:Show HN: Bear – Minimal blogging platform by jedberg on Tuesday May 26, 2020 @11:16PM (#23319032)
Control.

With self hosting I can control the code, what it does, the cost, where it stores data, how backups are made, etc.

It’s always a trade off on control, and my comfort point is “on AWS”.

For some people they want their own servers. Some people want to own the network block. It’s just what level of comfort you have with each type of control.

Re:Show HN: Bear – Minimal blogging platform by m11a on Wednesday May 27, 2020 @02:18PM (#23327496)
Isn't there a downside here?

What if your content doesn't have enough views / you get bored / life changes so can't afford server costs anymore / die. Your server will expire eventually, and there goes your content. web.archive.org might have some sites archived, but many blogs won't have been archived so their content is just gone forever.

I've self-hosted many platforms, and many have died, perhaps due to running costs or lack of need anymore. It's partially why I'd never self-host my email, for example.

You can't know the future, and if your content is gone, it's gone for all of your audience (or potential future audience). Perhaps an ideal solution is some kind of self-hosted platform that mirrors content into a forever-public external repository, and hence preserves it, even if your hosting ceases to exist.

Re:Show HN: Bear – Minimal blogging platform by spurgu on Thursday May 28, 2020 @05:36AM (#23335295)
Yeah. There's a wordpress.com blog I frequently go back to and reference and the author passed away in 2014. Thanks to it being hosted on wordpress.com it will stay up there for the foreseeable future. Had it been relying on monthly payments for hosting and yearly payments for the domain it would probably have been down already by the time I realized he was no longer with us (some three months after the fact). And at that point, not all content would've probably been in archive.org and thus lost forever.

I also have a bunch of old blogs that I've just given up on at some point and now they're gone forever.

Your last point is kind of what archive.org's Wayback Machine does. Haven't checked whether they have an API where you can submit URL's you publish* or if you'd have to submit new posts manually, but this could be a decent solution. It wouldn't cover non-tech people though.

*) I just now quickly browsed through their API doc but couldn't find anything clear, other than uploading random files

Re:Show HN: Bear – Minimal blogging platform by Fiveplus on Tuesday May 26, 2020 @11:43PM (#23319156)
Cool, thanks for expanding on that man.
Re:Show HN: Bear – Minimal blogging platform by pacifika on Wednesday May 27, 2020 @05:03AM (#23320972)
You're not dependant on the service, when it goes away or gets bought.