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

complex logicals for story blocks #281

Closed
sformel-usgs opened this issue Mar 5, 2024 · 3 comments
Closed

complex logicals for story blocks #281

sformel-usgs opened this issue Mar 5, 2024 · 3 comments
Assignees
Labels
Type: Bug Something isn't working

Comments

@sformel-usgs
Copy link

I followed the links you had sent me in a previous email about the story blocks, they were very helpful. However, I can't seem to get more than "data use" contentType to show up...

From @MortenHofft via email:

I know what the problem is. The filter countriesOfCoverage and countriesOfResearcher filters out the news stories, as no news has a value. I suppose ideally you should be able to do things like combining AND and ORs in a more complex manner (contentType=dataUse AND countriesOfCoverage=US) OR (contentType=News) A potential workaround for now could be to have multiple sections? 3 events. 3 news stories. 3 dataUse. ?

Could you please create an issue and describe what kind of options you need?

A single page that has three sections: news, events, and data use, would be sufficient. I tried to create it, but found that when I stacked story blocks, the last block populates the top block, and the other two are left blank. See: https://hp-bison.gbif-staging.org/stories_stacked/

I can make three separate pages:

  1. https://hp-bison.gbif-staging.org/stories_datause/
  2. https://hp-bison.gbif-staging.org/stories_events/
  3. https://hp-bison.gbif-staging.org/stories_news/

but that's a bit clunky. Essentially, I'm interested in a single page that provides a filtered view of the most recent, relevant news, events and data use stories from GBIF.org. No rush to get this done! It will be a nice feature but isn't hindering any work.

@MortenHofft MortenHofft self-assigned this Mar 5, 2024
@MortenHofft MortenHofft added the Type: Bug Something isn't working label Mar 5, 2024
@MortenHofft
Copy link
Member

MortenHofft commented Mar 5, 2024

That is a bug - I will look. I'm guessing that the random ID function isn't doing a good job. So the same container ID is used for all, and hence only one is updated

UPDATE: That is the issue. I'll try to specify in the theme that plugins should be inherited as well. If that isn't supported I will provide the option to provide explicit IDs

MortenHofft added a commit to gbif/hp-bison that referenced this issue Mar 5, 2024
@MortenHofft
Copy link
Member

turns out that Jekyll themes cannot inherit plugins. So I've changed it to use a less ideal random based on timestamps. That doesn't require a plugin and will work out of the box. And then there is now also the option to provide explicit IDs for the story that will be used if present. That should solve it.

sformel-usgs added a commit to gbif/hp-bison that referenced this issue Mar 5, 2024
@sformel-usgs
Copy link
Author

Works beautifully, thank you! If anyone finds this and is looking for the end result, you can start here: https://github.com/gbif/hp-bison/blob/master/stories.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants