Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
binarystargames opened this issue Feb 12, 2022 · 5 comments
Labels
enhancement New feature or request needs info Further information is requested

Comments

@binarystargames
Copy link
Contributor

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
Copy link
Contributor

🤔 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
Copy link
Contributor Author

binarystargames commented Feb 12, 2022

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 michaeltlombardi added enhancement New feature or request needs info Further information is requested labels Feb 12, 2022
@michaeltlombardi
Copy link
Contributor

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:

  • Use a script in whatever language the prototyper is comfortable with that can be run adhoc from the local directory; a GitHub Action can come later
  • Define a layout type, maybe platen/itch/devlog with list and single views
    • The list should be paginated and may be mostly a reproduction of the posts layout from hugo-book
    • The single should, ideally, be the itch devlog's HTML munged to fit what Platen/hugo-book expect for default theming.

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
Copy link
Contributor Author

binarystargames commented Feb 12, 2022

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
Copy link
Contributor

🤔 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants