3 ms·
Well I had to do our corporate team site and got so frustrated with SharePoint that I coded a script in python to generate the html from rst files. It was a cou
by kfk 6y ago
Well I had to do our corporate team site and got so frustrated with SharePoint that I coded a script in python to generate the html from rst files. It was a couple of days of work. It runs behind nginx and automatically updated on GitHub commit of new content. Bootstrap is very well documented and you can use rst directives for “widgets”. I am in the process of moving to markdown + yaml now to make writing content even easier.
- dewey 6y agoWhy not just use any other static site generator like Hugo instead of re-inventing it?
- ipieter 6y agoI can answer that, since I also made a small static site generator from scratch in python. I was using another static site generator (Hexo), but at some point I wanted to change some things and add some custom html to my posts. Since the documentation was ... well ... minimalistic on some aspects, I also spent some time looking at the source code. But at that point I was really wondering what benefit I still had from using that generator. In the end, all a static site generator does is collecting some markdown or RST files, converting them to html and putting that into a template html file. And generating some lists (index page, RSS, ...) and some metadata for SEO. So it took me a single Saturday to make a working static site generator and now I can do anything I want without looking up documentation or source code, since it's my own dumpster fire :-)
- kfk 6y agoBecause my team has an easier time managing our simple code vs a new tool. Also we have a lot of custom components because we use our site to provide navigation for our apps, dashboards and docs. I couldn’t find a generator that would fit all those requirements.
- lowdose 6y agoGoogle docs also has options to export to markdown.
- jnbiche 6y ago> I coded a script in python to generate the html from rst files There’s an outstanding and fairly flexible static site generator for rst files in Python that’s been around for quite a long time, called Sphinx. It’s basically a docs generator but I’ve used it as a generic static site generator.