this-week-in-rust icon indicating copy to clipboard operation
this-week-in-rust copied to clipboard

Link to latest issue?

Open senekor opened this issue 1 year ago • 5 comments

Hi, quick question. We're considering to link to TWiR's events section from the website www.rust-lang.org. Is it possible to link to the latest issue of TWiR? e.g. something like this-week-in-rust.org/blog/latest/#upcoming-events

This is not a feature request, I'm just wondering if it's already possible and I don't know about it. Thanks!

senekor avatar May 23 '24 18:05 senekor

There is not a way that I know of off the top of my head - though I would be very open to this if someone is able to add this feature.

nellshamrell avatar May 24 '24 03:05 nellshamrell

I played around a little bit with the repo and couldn't find a satisfying solution. There is the pelican-redirect plugin but it doesn't fit our use case. All I can come up with is writing a custom pelican plugin and adding a script outside the normal pelican build process. Both ideas aren't worth the maintenance burden in my view. I don't plan on pursuing this any further.

senekor avatar May 27 '24 18:05 senekor

This would still require some dev outside TWiR, but maybe you could grab the URL from the RSS feed since we know the format of the URL will always be the same?

eg: https://this-week-in-rust.org/blog/2024/05/22/this-week-in-rust-548/#upcoming-events

@mariannegoldin do you have any other ideas to potentially see this happen?

bennyvasquez avatar May 27 '24 18:05 bennyvasquez

Looking into this. I think there is a way to do this in the pelican templating.

mariannegoldin avatar Jun 20 '24 02:06 mariannegoldin

I might misunderstand this, but in the Perl Weekly newsletter we generate a file called latest.html that redirects to the latest edition. This might help here as well.

The file now it looks like this:

<meta http-equiv="REFRESH" content="1; url=/archive/699.html">
<script>
window.location = location.origin + "/archive/699.html";
</script>

szabgab avatar Dec 19 '24 07:12 szabgab