From 89ba260b703f222463e8404279c70f03759ab5d5 Mon Sep 17 00:00:00 2001 From: Luccas Mateus de Medeiros Gomes Date: Fri, 5 May 2023 08:56:09 -0300 Subject: [PATCH] [docs][m] - tutorial part 4 --- site/content/docs/index.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/site/content/docs/index.md b/site/content/docs/index.md index 6d5a827f..6b7bcf80 100644 --- a/site/content/docs/index.md +++ b/site/content/docs/index.md @@ -221,6 +221,41 @@ You now have a filter in your page with all possible values automatically added ![](https://i.imgur.com/72aHZkD.png) +## Showing metadata + +If you go now to `http://localhost:3000/my-awesome-dataset`, you will see that we now have two titles on the page. That's because `title` is one of the default metadata fields supported by PortalJS. + +![](https://i.imgur.com/O145uuc.png) + +Change the content inside `/content/my-awesome-dataset/index.md` to this. + +``` +--- +title: 'My awesome dataset' +author: 'Rufus Pollock' +description: 'An awesome dataset displaying some awesome data' +modified: '2023-05-04' +files: ['data.csv'] +groups: ['Awesome'] +--- + +Built with PortalJS + +## Table + + +``` + +Once you refresh the page at `http://localhost:3000/my-awesome-dataset` you should see something like this at the top: + +![](https://i.imgur.com/nvDYJQT.png) + +These are the standard metadata fields that will be shown at the top of the page if you add them. + +- `title` that gets displayed as a big header at the top of the page +- `author`, `description`, and `modified` which gets displayed below the title +- `files` that get displayed as a table with two columns: `File` which is linked directly to the file, and `Format` which show the file format. + ## Deploying your PortalJS app Finally, let's learn how to deploy PortalJS apps to Vercel or Cloudflare Pages.