platenio / hugo-platen

Platen core theme for Hugo: build websites for digital tabletop games
MIT License
3 stars 2 forks source link

(Spike) Itch.io devlogs from designated projects crosspost to the Platen blog #36

Open binarystargames opened 2 years ago

binarystargames commented 2 years ago

As a developer, when writing devlogs, I want to write content once and have it be posted to my Platen site in addition to itch.io.

michaeltlombardi commented 2 years ago

🤔 I think an integration like this will end up being a GitHub Action. To clarify, you want to write a devlog on itch (example devlog and be able to automatically submit it as a PR to your Platen site? Or do you want a way to draft markdown in Platen and automatically submit a devlog to itch?

In any case, I think this might be very custom - it doesn't look like any of itch's APIs touch on the devlogs - so at best we might be able to scrape from itch, suck up their HTML and convert to markdown to submit. If they actually have an RSS feed, we might be able to add something that just lists the devlogs or puts them in an iframe or something.

binarystargames commented 2 years ago

There is an RSS feed: https://itch.io/updates/updates-to-devlogs

You can access the feed directly by appending /devlog.rss to your project's URL.

If and when this happens (and I am thinking github action, incidentally, I didn't want to be too specific in the issue definition though) that's probably the first place to look.

michaeltlombardi commented 2 years ago

Okay, so it seems like the best way to go about this is prototyping an rss feed ingestion mechanism + figuring a template for a hugo page which can display the devlogs/have a similar pagination front as the blog.

I think in an initial pass, to see feasibility, a prototyper should:

Once prototyping is wrapped and we can see how feasible this is, we'll know if we want to continue along this path or not. If so, it's looking to me like we might end up creating a separate module, hugo-platen-itch to keep this work and move the extant shortcode for a game widget over and see what other integrations/helpers we can add.

binarystargames commented 2 years ago

Seems viable. I'll probably take this on after epub generation is squared away if I still have development capacity.

My thought was to generate blog post markdown files in exactly the same capacity if possible rather than make a distinct itch blog post - this basically makes it a WYSIWYG Platen blog post editor without having to actually make one.

michaeltlombardi commented 2 years ago

🤔 Noodling on this a bit, a potential avenue to explore is then:

  1. Write a shortcode that can yank the content of an itch devlog at build time from a given url and display that
  2. Prototype this with a near-empty post with metadata and the shortcode, like this:

    ---
    author: Michael T. Lombardi
    date: 2021-09-17
    linktitle: A Third Friendly Sponsor!
    title: A Third Friendly Sponsor!
    categories:
     - itch_devlog
    ---
    
    {{ itch-devlog https://michaeltlombardi.itch.io/picaroons/devlog/295341/a-third-friendly-sponsor }}
  3. Figure out a GitHub Action to automatically crawl (or fire on RSS Feed update) for a new devlog and submit a PR with the correct minimum markdown file in content/posts.

The only extremely minor problem I see with this (much simpler and better) approach is that we might want a way to update the page if the devlog is updated on itch.

RE: WYSIWYG blog post editor, some of that functionality is already enabled via the netlify-cms module, which allows you to write blog posts via the Netlify CMS GUI instead of in a code editor.