I should really write something before I post to GitHub
#
- It works! At least for me, with a lot of limitations. But this post (and the two previous posts) on my Gatsby-powered blog was written in Drummer. The Dummer posts are integrated with the previous posts that were written in Markdown. The code for my blog with the new OPML plugin is on GitHub.#
- As I mentioned, I started with demo code by Andrew Shell for Little Outliner outlines. That was written for Gatsby v2, I submitted a couple of fixes so it would work with Gatsby v3 and the recently released v4. #
- The demo code plugin creates Markdown 'nodes' for the outline entries. I added a couple of frontmatter entries to these nodes for ease of processing. I then adapted my `gatsby-node.js` to handle both Markdown files and the Markdown nodes from the OPML plugin.#
- There are still a lot of limitations. It ignores blog posts without titles (my wish, for now) and does not support most of the attributes used by the OldSchool CMS. But now it's my template, my layout, and my code, and I can add those features later whenever I want! 😛#
Will this get rendered out? It shouldn't
#
What will the world bring today?
#
Can I put my own index.html template on GitHub? We'll see!
#
Yes, it works. Then it gets pushed to Netlify where it is statically served
#
- I created a new repository DrummerTest on GitHub, and cloned it to my Mac.#
- There I created a file templates/index.html, and copied in the default Drummer Template, making a trivial change to the HTML title to make sure Drummer was using the new template. #
- I pushed my changes to GitHub. It would be possible for Drummer to get the template from GitHub using a raw.githubusercontent.com URL, but that always takes a few minutes to update, so it's not so convenient.#
- So I set up a free Netlify site connected to the DrummerTest repository. That means the Netlify site will update every time changes are pushed to GitHub. It takes about 5 seconds. #
- Netlify gave me a crazy URL https://brave-kirch-962987.netlify.app/templates/index.html, which I set as the urlTemplate OPML header on my blog.opml.#
- It worked! For now I've only changed the HTML title, but next I'll be tweaking the styles.#
Wake me up when September ends. Or whatever.
#