geogeeks-au / geogeeks-au.github.io

The Geogeeks website.
https://geogeeks.org/
Apache License 2.0
3 stars 3 forks source link

links to event assets don't work on home page #57

Open johnwbryant opened 1 year ago

johnwbryant commented 1 year ago

Something to do with the routing I think. Links work OK from the event page but not from the home page, where they give you this:

image

eg. one of the QGIS template links from this week's event resolves as follows:

BudgieInWA commented 1 year ago

Makes sense, because the markdown is using relative links and the home page is rendering the content "out of context". @samwilson do you think there is a way to access the event page's path in order to repair the link in the home page template?

We could use absolute paths in the markdown (starting with /2023/) but then the event pages wouldn't be portable any more, and the markdown links would only be correct in the context of the website (whereas they are currently correct in the context of the file system too).

johnwbryant commented 1 year ago

Could we put it in a block that only displays if it's on the event page rather than the home page? Because in practice we only put assets up once the event is over. In fact we could probably just make it a practice to remove the event from the home page when it's done...

BudgieInWA commented 12 months ago

That sounds sensible too.

Maybe we could be fancy - now that we have the dates stored as comparable values - and have an "upcoming" section with full descriptions, and a "recent" section with the latest one or two events, but only show the first paragraph or first x characters of the descriptions, and link to the page.

BudgieInWA commented 11 months ago

I think we should add a "horizontal rule" ---\n separating the event description from all the rest, and using the page.excerpt (with the setting turned on for the build) to put just the event description on the front page, linking to "more".


Above the rule is the meat of my comment, and here I can link to random stuff and update historical stuff without effecting the thing I'm trying to describe above the line.

samwilson commented 11 months ago

That sounds good.

Does Jekyll use the HR as a marker for page.excerpt?

BudgieInWA commented 11 months ago

In Jekyll, you can specify a custom separator for excerpts using the excerpt_separator option in the _config.yml file. This separator tells Jekyll where to stop when creating the excerpt for the page.

Let's go with something specific like a 5 dash hr.


excerpt_separator: -----
samwilson commented 11 months ago

That sounds like a good idea.