3design / gbc

The repository of the new GBC website
0 stars 1 forks source link

troublshooting Filters #28

Open christinerogers opened 2 months ago

christinerogers commented 2 months ago

test page is : https://3design.github.io/gbc/network-test/

Not clear if still to be tried :

Deciding how/if to configure / deploy for the news/event page :

Steps so far (aug 29): Duplicated page and un-commented the code on line 81-90 to show the filter again Successfully added a new filter as per the README. The file to edit filters is located in /src/_data/expertiseTags.json This new tag can be added by editing the file /src/raw_data/people.tsv examined the code on network-test.njk. The code that defines the filter is on line 76 using x-data in the

. x-data is part of a JS library https://alpinejs.dev/. looked up information on x-data on the alpine site here: https://alpinejs.dev/directives/data in the code of network-test.njk on line 76 and elsewhere, there is a call for the file expertiseTags.tags . Did a search on my local folder for this file and the only hit is the .json file

3design commented 2 months ago

From what I understand, the tags themselves are declared in the expertiseTags.json file. This is what will show up on the webpage.

The tags in Leeds people.tsv are then used to tag the individuals by entering the appropriate tags declared in the expertiseTags.json.

When the site is built, the file Leeds people.json is created and used to populate the Network page.

My next questions are:

  1. How do we add a filter to the 'resources' page. What files need to be created to drive the filtering?
  2. How do we create a tags entry for each individual 'njk' file in the resources folder (where the new cards templates are read)