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

Contentful-based stories on the home page #4

Open
ManonGros opened this issue Aug 24, 2023 · 7 comments
Open

Contentful-based stories on the home page #4

ManonGros opened this issue Aug 24, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@ManonGros
Copy link
Collaborator

Right now there is a hard coded set of stories in the homepage. Ideally, we would like to have something more dynamic that allows us to select stories from contenful that can be displayed on the homepage.

@ManonGros ManonGros added the enhancement New feature or request label Aug 24, 2023
@MortenHofft
Copy link
Member

The theme allows for dynamic stories. But we have to decide how to search for them (how to tag them). We can search by pretty much anything. The website currently only allows for showing, dataset use, news and events. And we can filter based on the language

@dnoesgaard
Copy link
Member

Based on discussions with @ManonGros, I'd like to propose that we add a filter for Contentful tags. Note, that these live outside the scope of the content model and apply to all content types, e.g.:

{
  "tags": [
    {
      "sys": {
        "type": "Link",
        "linkType": "Tag",
        "id": "crowdin"
      }
    },
    {
      "sys": {
        "type": "Link",
        "linkType": "Tag",
        "id": "grscicoll"
      }
    }
  ]
}

In the first phase, we suggest that tags are added/curated by Secretariat staff. Based on the outcome of the next community call, we can decide what the next phase is.

@ManonGros
Copy link
Collaborator Author

@MortenHofft I have tagged some items in contentful, I checked how the stories are set up in the French portal but I don't understand how it is all put together. I can see this file (https://github.com/gbif/hp-france/blob/master/resourceKey.md) but where is it called?

Do I need to set up a similar file? Can I just put something in https://github.com/gbif/hp-grscicoll/blob/master/_data/navCards.yml? (sorry I am a bit confused)

@MortenHofft
Copy link
Member

You cannot search by those tags. They live outside the normal content model that we index. To get it work requires work in how we index: gbif/content-ws#19

If we simply added a tags field to the content model for the various items it would work automatically.

Using the metadata tags is also an option, but doesn't work for now

@MortenHofft
Copy link
Member

The resourceKey.md file need to look like that yes. And you need to explicitly say you want to see articles on the site https://github.com/gbif/hp-france/blob/master/_data/examples.yml#L79

@MortenHofft
Copy link
Member

@dnoesgaard and @ManonGros are there any specific reason you chose this solution? Being able to tag vocabularies etc isn't necessary. Does it have to do with access permissions? Or being able to handle available tags centrally?

@dnoesgaard
Copy link
Member

True, we don't need tags for every single content type.

But it's more convenient to handle tags this way because it's independent from the content types. It's controlled and we don't have to worry about editing content models.

That being said, this is the first real use case (aside from Crowdin).

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

No branches or pull requests

3 participants