from Hacker News

Show HN: I built an open-source web hosting platform for static sites

by symkat on 3/14/22, 6:57 PM with 38 comments

HI Hacker News!

I’m very excited to show you this project I have been working on, MarkdownSite.com.

For folks who interact with the website, it is a web hosting platform where you can add your repository and have a website built from the `public/` directory. Files in `site/` with an `.md` extension are rendered from markdown to HTML, and the website is then available at a random subdomain.

For folks that set up their own instance, it can also become a framework for customized building. The entire project is open source and I tried my best to document and explain the structure of the machines and how they interact in various mermaid graphs in the readme files under the `devops/` folder.

There is still a lot of work to be done, I hope that you find this useful. It's been super fun to work on!

  • by HeckFeck on 3/14/22, 10:31 PM

    Sweet, a roll-your-own Geocities but in Markdown! I'd like it if this approach took off for personal websites/blogs/social media. Maybe share it with some of those lists of self-hosted alternatives? Like here: https://github.com/awesome-selfhosted/awesome-selfhosted

    I've actually been working on my own static website builder in Perl too - though it is nowhere near as sophisticated as a whole hosting platform. Being able to feed these beasts directories of text files, hitting enter and watching it do all the work (using your work) is a pleasure all on its own.

  • by jaza on 3/15/22, 6:42 AM

    It's nice to have the option of deploying static sites to your own server, more-or-less as easily as they can now be deployed to GitHub Pages, Netlify, Vercel, and friends.

    Funny timing: I just finished converting all my old sites to be statically generated, and deploying them all on Netlify, so that I don't have to pay for, or be the sysadmin of, a personal VPS anymore (after many years of doing just that). It's hard to argue the case for hosting anything much myself these days, when the alternative is free, zero-maintenance, and (thanks to CDNs) able to handle any load lightning-fast.

  • by jph on 3/14/22, 11:03 PM

    Great work, thank you for sharing this. I see an opportunity for you to create tutorial steps, to teach a developer step-by-step what an input repo should contain in order to output "Hello World". Perhaps this is as simple as an example repo that contains a couple of files such as example.md and example.css?
  • by MathMonkeyMan on 3/15/22, 5:23 AM

  • by maxloh on 3/15/22, 4:40 AM

    If I recalled it right, it can be done with GitHub Actions - just build and push to `gh-page` bramch whenever a new commit arrives. GitHub will do the job for you. No backend is required.
  • by jaimex2 on 3/15/22, 1:17 AM

    Just curious on when you would use this over GitHub Pages?

    https://pages.github.com/

  • by andybak on 3/15/22, 10:54 AM

    Any idea why this repo doesn't work? https://github.com/icosa-gallery/open-brush-docs

    I can't see anything other than 404's. I tried /resources.html etc

    EDIT - I think maybe it's expecting me to put everything in a site subdir. Which is very unclear from the docs. (and means I probably won't try it out as I was hoping I could use my docs repo "as is")

  • by 97-109-107 on 3/15/22, 11:59 AM

    Tangential question - what are other examples of solutions that can be vaguely summarized as "platform for hosting and managing (and routing) discrete static websites" are out there?

    I'm looking for streamlined alternatives to the following architecture (which works okay, but has too many separate parts):

      - Static websites compiled with different assets from the same root create discrete independent "public" folders
      - Folders are uploaded to a single bucket in Amazon S3 
      - Route53 and a separate reverse-proxy nginx server handle traffic to X.domain.com where X is the name of a folder in S3
  • by nwithan8 on 3/15/22, 4:00 AM

    Why are other people's logs exposed when I try to make a site? https://markdownsite.com/status/9?reject_job=1
  • by adriangrigore on 3/15/22, 9:03 AM

    Looks cool! I've beginning to wonder if Markdown is the right tool for generating "presentation" or "complex" web pages, as it was originally created for blog posts mostly. I believe that's the reason people complain of the lack of customizability of popular static site generators.

    Markdown was made for blog posts not for custom web pages.

    P.S. Built my own static site generator https://mkws.sh but don't support Markdown out of the box, just plain HTML.

  • by account42 on 3/16/22, 1:56 PM

    Does this really count as static site hosting if you use on-demand rendering instead of rendering everything? One of the big advantages of static sites is that the runtime complexity is as minimal as it can be.
  • by EgeAytin on 3/17/22, 2:06 PM

    Do you have plans to host static sites which builded with plain HTML it would be awesome.
  • by henriquez on 3/15/22, 8:26 AM

    This looks great - please consider adding a Free/Libre Open Source license such as AGPL. Or any license!
  • by throwaway4837 on 3/15/22, 5:00 AM

    Me too! I think this might be the next Hello World. Goodbye Todo list app.
  • by andybak on 3/15/22, 10:40 AM

    Typo: Github sponser