I’ve been using Jekyll for quite some time, and I wanted to explore how to create AMP pages with Jekyll. Turns out that there are two options now: either use a theme that is entirely AMP-based or use the jekyll-amp plugin … which is now unfortunately not maintained.
So, I decided to get my own hands dirty. Long story short, it involves creating a new layout, some new configuration variables in _config.yml, creating an scss file inside _includes, and using some interesting features of Jekyll, such as Collections.
I have written a blog post about it (of course using Jekyll), and even though it is a round-about way of doing things, I believe once the setup is done, making the AMP version of existing/new posts becomes a lot easier. Here is the link:
It includes a sample layout file, and codes I wrote. I also realized along the way that this approach allows using the rouge syntax highlighter in amp pages without any additional steps. Since this approach is not reliant on any additional plugins, I believe this approach can also be used with Github Pages auto-build feature.
err: I broke my website. Please hang tight while I work on fixing it. nothing to do with amp btw.
ps ps: and it is back