From ce847746d2b5d2ba9ff0fad9a111b23a85d97c5c Mon Sep 17 00:00:00 2001 From: Luccas Mateus de Medeiros Gomes Date: Fri, 5 May 2023 08:54:19 -0300 Subject: [PATCH] [docs][sm] - use "groups" instead of title for facets --- site/content/docs/index.md | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/site/content/docs/index.md b/site/content/docs/index.md index bf465937..6d5a827f 100644 --- a/site/content/docs/index.md +++ b/site/content/docs/index.md @@ -168,12 +168,12 @@ Any frontmatter attribute that you add will automatically get indexed and be usa ### Adding filters -Sometimes contextual search is not enough. Let's add a filter. To do so, add a title to your `content/my-incredible-dataset/index.md` like so: +Sometimes contextual search is not enough. Let's add a filter. To do so, lets add a new metadata field called "groups", add it to your `content/my-incredible-dataset/index.md` like so: ``` --- -title: 'My incredible dataset' +groups: ['Incredible'] --- # My Incredible Dataset @@ -190,6 +190,23 @@ This is my incredible dataset. /> ``` +Also add it to your `content/my-awesome-dataset/index.md` like so: + +``` +--- +title: 'My awesome dataset' +groups: ['Awesome'] +--- + +# My Awesome Dataset + +Built with PortalJS + +## Table + + +``` + Now on your `content/index.md` you can add a "facet" to the `Catalog` component, like so: ``` @@ -197,12 +214,12 @@ Now on your `content/index.md` you can add a "facet" to the `Catalog` component, List of available datasets: - + ``` You now have a filter in your page with all possible values automatically added to it. -![](https://i.imgur.com/vAzJ47h.png) +![](https://i.imgur.com/72aHZkD.png) ## Deploying your PortalJS app