Code Monkey home page Code Monkey logo

gbvs.saigonfgc.com's Introduction

TL;DR:

sudo pacman -S pandoc entr python

# rerun build script whenever a `index.md` or `template.html` file is updated:
find . \( -name index.md -o -name template.html \) | entr python build.py

# host static website locally at port 8000:
python -m http.server --bind localhost

This is a ghetto static site setup powered by pandoc and some glue code, inspired by this post.

The gist is that this whole repo is a ready-to-serve static website. The build.py script looks for all files named index.md and run pandoc on them, generating index.html files in the same place as their respective markdown files.

Pros:

  • Dead simple what-you-see-is-what-you-get site structure.
  • Post-specific assets are put in the same dir as the post's md file. This allows simple relative image paths without stupid hacks (looking at you, Pelican!)
  • Pandoc's markdown-to-html translator is simply better: automatic <figure> element for top-level images was why I considered pandoc in the first place.
  • Maximum flexibility: I can already see how custom pages will be a breeze with this setup, since each page is extremely self-contained. I can finally do crazy stuff like Zach Holman's blog.

Cons:

  • No automatic index generation (that I know of).
  • No RSS feed out of the box.

I'll need to tinker more.

gbvs.saigonfgc.com's People

Contributors

nhanb avatar

Watchers

 avatar  avatar  avatar

gbvs.saigonfgc.com's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.