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!
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.
Does it have a built in Under Construction banner, hit counter, country flags, scrolling text and all the other must have features?
If you’ve used and like GitHub Pages, and are just going to host a website as quickly as possible, it’s probably going to be the better option for you. GitHub can host the website, and GitHub Pages has better documentation and support than MarkdownSite does. MarkdownSite would likely be the bad choice right now for this. It launched literally last night, and I am hoping to get enough traffic and feedback from people playing with it so I can see where I can improve it.
If you want to run your own version of GitHub Pages, and host the website on virtual machines or bare metal servers in a data center, and to then provide that hosting to others, I don’t believe GitHub Pages has any self hosting option that I could see. If that’s true, MarkdownSite would be the better option in that situation.
On a personal note, it is perhaps an incredibly self-indulgent project in that I’ve always simply liked web hosting technology. I want to share that by creating and running a hosting platform myself, and to have the code and documentation and network diagrams out in the open for it so anyone else can run their own too.
I hope this helps explain some of the rational, thanks for checking it out!
Currently, I have a static blog served @ [0] and it is literally a git repo that runs git hooks. I think the project you're doing is awesome, but it would be nice if it could be tuned, e.g. choose my markdown processor of preference, etc.
the git repo for the blog is here: [1]
My blog uses a forked tool called blogit (made by pedantic.software) and it's makefiles and a standard markdown processor with raw html templates for headers, footers, etc.
I haven't actually used this but I think it's promising: (mkws.sh) [2]
just spitballing some ideas here and there. Nice project.
references
[0] https://trevcan.duckdns.org/blog/
[1] https://git-trevcan.duckdns.org/trevcan.github.io.git/
[2] https://mkws.sh/
You are not alone! :-)
Also, thank you for making this!
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 S3You can use it via cURL or github actions (https://github.com/marketplace/actions/gostatic-deploy), and there's a node-based CLI coming soon
e.g. curl https://www.gostaticapp.com/api/deploy/artifact \ -X POST \ -H "Accept: application/json" \ -H "Authorization: Bearer your-api-token" \ -F "file=@file.zip"
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.
[0]: https://slightknack.dev/blog
[1]: https://github.com/slightknack/slightknack.dev/blob/master/....
I have some examples on markdownsite.com in the middle, I’ll post them here as well, thank you for asking:
https://github.com/symkat/mds-example.markdownsite.net - A static website made from markdown files
https://github.com/symkat/hugo-example.markdownsite.net - A static website made with Hugo
https://github.com/symkat/os-example.markdownsite.net - A hand-rolled website with HTML/CSS
The websites for each can be seen at their respective domains:
https://mds-example.markdownsite.net/
https://hugo-example.markdownsite.net/
https://os-example.markdownsite.net/
I absolutely want to get the docs more cleaned up and make understanding how to get a site running something effectively communicated. Right now I have this https://markdownsite.com/docs explaining some stuff. Thanks again!
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")
I haven't tested it, but a workaround could be making another repo, and using git submodules to put your docs repo in the site/ folder on this new repo.
I think what happened is you clicked “Build My Site!” without entering a git repository in the text input field.
Right now building sites isn’t private, and there is no authentication, so you could iterate the id numbers, and you could see build logs and from those pages. If a git repository has been used before, instead of building a new website, it brings you to the status panel to rebuild it and it is rebuilt on the same sub domain. That specific one — id 9, looks to be the first time someone clicked the build button without entering any repository, anyone else who does that would be redirected to that page.
For files in site/ that end in .md it does do rendering at the point of serving in some situations. Once it does, it both serves the file and spits out an .html file to serve for the next request. The way I thought about it is that the first request for the file generates it — like a mini hugo build or Jekyll build command running for just one path, and only running after a request has been made to it. This makes the compilation of the HTML just in time and saves processing for files that may never be rendered.
It does have draw backs, and could prove not to be the best path, and perhaps the preprocessing isn’t that big of a deal.
The use for plain HTML is documented here: https://docs.markdownsite.com/static-site/
I hope this is helpful, thanks!
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.