Skip to content

Commit

Permalink
Remove thematic area related docs
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfdsilva committed Apr 10, 2023
1 parent cf883f6 commit f07bc62
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 161 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

## Why are you creating this Pull Request?

- [Adding Datasets, Discoveries or Thematic areas](?title=Content%3A%20%3Cname%3E&expand=1&template=content.md)
- [Adding Datasets or Discoveries](?title=Content%3A%20%3Cname%3E&expand=1&template=content.md)
- [Version Release](?title=Deploy%20vX.X.X&expand=1&template=version_release.md)
- [Other](?expand=1&template=default.md)
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

![VEDA logo](./static/graphics/nasa-veda-logo-pos.svg)

VEDA is a dashboard to explore data.

VEDA is a dashboard to explore data.

VEDA is organized around the concept of Thematic areas. Each thematic area explores a topic in detail via datasets and discoveries.
VEDA is organized around datasets and discoveries.
A Dataset represents a piece of geo-referenced data displayed as a set of related layers on a map.
Discoveries are long form pieces of content that tell a story about some interesting portion of the data.

Expand Down
64 changes: 6 additions & 58 deletions admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,13 @@ collections:
title: fields.id
identifier_field: fields.id
slug: "{{fields.id}}.data"
preview_path: "{{fields.thematics[0]}}/datasets/{{fields.id}}/explore"
preview_path: "data-catalog/{{fields.id}}/explore"
summary: "{{fields.name}}"
fields:
- label: "Featured on"
name: "featuredOn"
widget: "relation"
required: false
collection: thematic
value_field: id
search_fields:
- id
- name
multiple: true
- label: "Featured"
name: "featured"
widget: boolean
default: false
- label: Usage
name: usage
widget: list
Expand All @@ -54,14 +48,7 @@ collections:
- { label: "Description", name: "description", widget: "text" }
- label: "Thematics"
name: "thematics"
widget: "relation"
required: false
collection: thematic
value_field: id
multiple: true
search_fields:
- id
- name
widget: list
- label: "Image"
name: "media"
required: false
Expand Down Expand Up @@ -391,42 +378,3 @@ collections:
# - {label: "color", name: "", widget: "text" }
# - {label: "label", name: "label", widget: "text" }
- { label: "Body", name: "body", widget: "markdown" }
- name: "thematic"
label: "Thematic"
folder: "thematic"
media_folder: "thematic"
create: true
extension: "mdx"
format: "frontmatter"
title: fields.id
identifier_field: fields.id
slug: "{{fields.id}}.thematic"
summary: "{{fields.name}}"
fields:
- { label: "ID", name: "id", widget: "string" }
- { label: "Thematic name", name: "name", widget: "string" }
- { label: "Description", name: "description", widget: "text" }
- label: "About"
name: "about"
widget: "object"
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Description", name: "description", widget: "string" }
- label: "Image"
name: "media"
widget: "object"
fields:
- { label: "File", name: "src", widget: "image" }
- { label: "Alt text", name: "alt", widget: "string" }
- label: "Author"
name: "author"
widget: "object"
required: false
fields:
- {
label: "Name",
name: "name",
required: false,
widget: "string",
}
- { label: "URL", name: "url", required: false, widget: "string" }
7 changes: 2 additions & 5 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ The `.env` file contains a list of all available variables and comments explaini
The `veda.config.js` file is an additional configuration file for veda.
It is through this file that you specify how the Veda content can be found.

This is done by providing a glob path for each one of the [content types](./CONTENT.md). (Thematic areas, Datasets, Discoveries).
This is done by providing a glob path for each one of the [content types](./CONTENT.md). (Datasets, Discoveries).
The default configuration is:
```js
thematics: './thematic/*.thematic.mdx'
datasets: './datasets/*.data.mdx'
discoveries: './discoveries/*.discoveries.mdx'
```
Expand All @@ -22,16 +21,14 @@ discoveries: './discoveries/*.discoveries.mdx'
To adapt the Veda dashboard to the individual needs of you instance, some content/component overrides are provided. These overrides allow you to alter certain parts of the application, or inject code without having to fork the UI part of veda.

There are essentially 2 types of possible overrides:
- `Content Overrides` - allow you to change the default content of a page. Like with the different content types (discoveries, datasets, and thematic areas), you'll have access to all [MDX_BLOCK.md](./MDX_BLOCKS.md). Depending on the content override you'll also be able to provide some frontmatter variables. The name of the override config variable will follow the `<name>Content` scheme.
- `Content Overrides` - allow you to change the default content of a page. Like with the different content types (discoveries, datasets), you'll have access to all [MDX_BLOCK.md](./MDX_BLOCKS.md). Depending on the content override you'll also be able to provide some frontmatter variables. The name of the override config variable will follow the `<name>Content` scheme.
- `Component Overrides` - allow you to alter a specific component of the app, by providing new javascript code for it (advanced usage). No Mdx Blocks are available.

The overrides are defined in the `veda.config.js` under `pageOverrides` by specifying the path to the mdx file to load.
These are the current available overrides:

```js
pageOverrides: {
// Content for the root about page. This is the global about page, before
// entering a thematic area.
// Type: Content override
aboutContent: '<file path>.mdx'

Expand Down
112 changes: 19 additions & 93 deletions docs/CONTENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,29 @@
- Check the [MDX_BLOCK.md](./MDX_BLOCKS.md) for information on the different blocks that can be used to compose the content layout.
- Check [layer.md](./frontmatter/layer.md) for details on the different properties of a dataset layer.
- Check [media.md](./frontmatter/media.md) for information on the images needed for the content's covers.
- Check [GH_CODESPACES.md](./GH_CODESPACES.md) for a video walktrhough of adding content to VEDA with github codespaces.
- Check [GH_CODESPACES.md](./GH_CODESPACES.md) for a video walkthrough of adding content to VEDA with github codespaces.

----

# Content

- [Content](#content)
- [Thematic Areas](#thematic-areas)
- [Datasets](#datasets)
- [Discoveries](#discoveries)

Veda consists of Thematic Areas, Datasets, and Discoveries. Each dataset and discovery belongs to a thematic area (or multiple thematic areas), and discovery can use datasets. When you are adding contents using published datasets in Veda, you would need to know which thematic area it belongs to, and if you need to create a new thematic area.

Veda consists of Datasets, and Discoveries.
Each piece of content is written in [MDX](https://mdxjs.com/docs/what-is-mdx/#what-is-mdx) with configuration frontmatter. Frontmatter is separate by a set of `---` from MDX content.

A file will look something like:
```yml
---
id: theme1
name: Thematic area 1
id: discovery1
name: Example discovery
---

<Block>
<Prose>
## About thematic area
## About this discovery

Once upon a time there was a content string
</Prose>
Expand All @@ -39,53 +37,6 @@ Each `Block` comes with its own rules and needed props, so check the [MDX_BLOCK.

---

## Thematic Areas

Frontmatter configuration for the Thematic Area

```yaml
id: string
name: string
description: string
media: Media

about:
title: string
description: string
```
**id**
`string`
Id of this thematic area. Must be unique in the whole application.

**name**
`string`
Name of this thematic area. This is used to reference to this thematic area in the application.

**description**
`string`
Brief description of this thematic area. This is displayed on cards and the header of a thematic area.

**media**
`Media`
Image to identify this resource. See [media.md](./frontmatter/media.md).

**about**
`object`
Information for the Thematic area about page.

**about.title**
`string`
Title for the about page.

**about.description**
`string`
Description for the about page.

MDX content for thematic areas will show up under /about page. For example, `air-quality` thematic area's MDX contents will show up under `/air-quality/about`.

---

## Datasets

Frontmatter configuration for the Dataset
Expand All @@ -97,7 +48,7 @@ description: string
media: Media

thematics: string[]
featuredOn: string[]
featured: boolean

layers: Layer[]
related: Related[]
Expand All @@ -119,6 +70,8 @@ usage: Usage[]
</Block>
```

MDX content for datasets will show up on its own page under `/data-catalog/:dataset-id`. For example, `no2` dataset MDX will show up under `/data-catalog/no2`.

**id**
`string`
Id of this dataset. Must be unique in the whole application
Expand All @@ -137,23 +90,17 @@ Image to identify this resource. See [media.md](./frontmatter/media.md).

**thematics**
`string[]`
List of thematic areas ids this dataset belongs to. These values are used by the application to establish a relationship between thematic areas and datasets.
List of thematic areas this dataset belongs to.
Example:
```yaml
thematics:
- covid-19
- agriculture
```
**featuredOn**
`string[]`
List of thematic areas ids where this dataset is featured. A featured dataset will show up in the thematic area homepage.
Example:
```yaml
featuredOn:
- covid-19
- agriculture
```
**featured**
`boolean`
Whether this dataset is featured
![](./media/fm-featured-dataset.png)

**layers**
Expand All @@ -167,7 +114,6 @@ layers:
- id: anotherLayerId
... # more props
```
MDX content for datasets will show up under /overview page. For example, `no2` dataset MDX accessed from `air-quality` thematic area will show up under `/air-quality/datasets/no2`.

**related**
`Related[]`
Expand All @@ -179,17 +125,10 @@ List of related contents. This list will be displayed at the bottom of dataset o
Each content should be formatted like below.

```yaml
# when related content is dataset
- type: dataset
id: dataset-id
thematic: thematic-dataset-belongs
# when related content is discovery
- type: discovery
id: discovery-id
thematic: thematic-discovery-belongs
# when related content is thematic (doesn't need thematic attribute)
- type: thematic
id: thematic-id
```

**usage**
Expand Down Expand Up @@ -236,7 +175,7 @@ media: Media
pubDate: string
thematics: string[]
featuredOn: string[]
featured: boolean
related: Related[]
- type: string
Expand All @@ -253,6 +192,8 @@ related: Related[]
</Block>
```

MDX content for discoveries will show up on its own page under `/discoveries/:discovery-id`. For example, `air-quality-and-covid-19` discovery MDX will show up under `/discoveries/air-quality-and-covid-19`.

**id**
`string`
Id of this discovery. Must be unique in the whole application.
Expand All @@ -275,28 +216,20 @@ Publication date for this discovery. Should be in YYYY-MM-DD format.

**thematics**
`string[]`
List of thematic areas ids this discovery belongs to. These values are used by the application to establish a relationship between thematic areas and discoveries.
List of thematic areas this discovery belongs to.
Example:
```yaml
thematics:
- covid-19
- agriculture
```

**featuredOn**
`string[]`
List of thematic areas ids where this discovery is featured. A featured discovery will show up in the thematic area homepage.
Example:
```yaml
featuredOn:
- covid-19
- agriculture
```
**featured**
`boolean`
Whether this discovery is featured

![](./media/fm-featured-discovery.png)

MDX content for discovery will show up under its own page under `:thematic-area/discoveries/:discovery-id`. For example, `air-quality-and-covid-19` discovery, which belongs to `air-quality` thematic area will show up under `/air-quality/discoveries/air-quality-and-covid-19`

**related**
`Related[]`
List of related contents. This list will be displayed at the bottom of discovery page like below.
Expand All @@ -307,15 +240,8 @@ List of related contents. This list will be displayed at the bottom of discovery
Each content should be formatted like below

```yaml
# when related content is dataset
- type: dataset
id: dataset-id
thematic: thematic-dataset-belongs
# when related content is discovery
- type: discovery
id: discovery-id
thematic: thematic-discovery-belongs
# when related content is thematic (doesn't need thematic attribute)
- type: thematic
id: thematic-id
```
Binary file modified docs/media/related-content-discovery.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f07bc62

Please sign in to comment.