Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
Rebase custom achors on remark/rehype plugins (#83)
Browse files Browse the repository at this point in the history
* Rebased on remarkHeadingIds

* Added rehype plugin
  • Loading branch information
roll authored Jun 25, 2024
1 parent 7120c21 commit 0830934
Show file tree
Hide file tree
Showing 8 changed files with 507 additions and 1,443 deletions.
37 changes: 0 additions & 37 deletions anchors/build.js

This file was deleted.

3 changes: 2 additions & 1 deletion astro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { rehypeHeadingIds } from "@astrojs/markdown-remark"
import starlight from "@astrojs/starlight"
import { defineConfig } from "astro/config"
import rehypeAutolinkHeadings from "rehype-autolink-headings"
import { remarkHeadingId } from "remark-custom-heading-id"

// https://astro.build/config
export default defineConfig({
Expand Down Expand Up @@ -102,12 +103,12 @@ export default defineConfig({
}),
],
markdown: {
remarkPlugins: [remarkHeadingId],
rehypePlugins: [
rehypeHeadingIds,
[
rehypeAutolinkHeadings,
{
// Wrap the heading text in a link.
behavior: "wrap",
},
],
Expand Down
4 changes: 2 additions & 2 deletions content/docs/specifications/data-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ A file containing a Data Package descriptor `MAY` have other name rather than `d

A Data Package descriptor `MUST` have `resoures` property and `SHOULD` have `name`, `id`, `licenses`, and `profile` properties.

### `resources` [required]
### `resources` [required] {#resources}

The `resources` property is `REQUIRED`, with at least one resource.

Packaged data resources are described in the `resources` property of the package descriptor. This property `MUST` be an array of `objects`. Each object `MUST` follow the [Data Resource ](../data-resource/) specification.

### `$schema`
### `$schema` {#dollar-schema}

A root level Data Package descriptor `MAY` have a `$schema` property that `MUST` be a profile as per [Profile](../glossary/#profile) definition that `MUST` include all the metadata constraints required by this specification.

Expand Down
8 changes: 4 additions & 4 deletions content/docs/specifications/data-resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ Standard properties of the descriptor are described below. A descriptor `MAY` in

The properties below are applicable to any Data Resource.

#### `name` [required]
#### `name` [required] {#name}

A resource `MUST` contain a `name` property. The name is a simple name or identifier to be used for this resource.

- It `MUST` be unique amongst all resources in this data package.
- It `SHOULD` be human-readable and consist only of lowercase English alphanumeric characters plus `.`, `-` and `_`.
- It would be usual for the name to correspond to the file name (minus the extension) of the data file the resource describes.

#### `path` or `data` [required]
#### `path` or `data` [required] {#path-or-data}

A resource `MUST` contain a property describing the location of the data associated to the resource. The location of resource data `MUST` be specified by the presence of one (and only one) of these two properties:

Expand Down Expand Up @@ -144,7 +144,7 @@ If property `type` is not provided, the resource is considered to be a non-speci
If a resource has `profile` property that equals to `tabular-data-resource` or `https://specs.frictionlessdata.io/schemas/tabular-data-resource.json`, an implementation `MUST` treat it as `type` property were set to `table`
:::

#### `$schema`
#### `$schema` {#dollar-schema}

A root level Data Resource descriptor `MAY` have a `$schema` property that `MUST` be a profile as per [Profile](../glossary/#profile) definition that `MUST` include all the metadata constraints required by this specification.

Expand Down Expand Up @@ -200,7 +200,7 @@ List of licenses as for [Data Package](../data-package/#licenses). If not specif

The properties below are applicable to any Tabular Data Resource.

#### `path` or `data` [required]
#### `path` or `data` [required] {#tabular-path-or-data}

If the `path` property is used for providing data than it `MUST` contain [Tabular Data](../glossary/#tabular-data).

Expand Down
2 changes: 1 addition & 1 deletion content/docs/specifications/table-dialect.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Database formats is a group of formats accessing data from databases like SQLite

## Properties

### `$schema`
### `$schema` {#dollar-schema}

A root level Table Dialect descriptor `MAY` have a `$schema` property that `MUST` be a profile as per [Profile](../glossary/#profile) definition that `MUST` include all the metadata constraints required by this specification.

Expand Down
6 changes: 3 additions & 3 deletions content/docs/specifications/table-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ An example of a Table Schema descriptor:

A Table Schema descriptor `MAY` contain these standard properties:

#### `fields` [required]
#### `fields` [required] {#fields}

A Table Schema descriptor `MUST` contain a property `fields`. `fields` `MUST` be an array where each entry in the array is a [field descriptor](#field) as defined below.

The way Table Schema `fields` are mapped onto the data source fields are defined by the `fieldsMatch` property. By default, the most strict approach is applied, i.e. fields in the data source `MUST` completely match the elements in the `fields` array, both in number and order. Using different options of the `fieldsMatch` property, a data producer can relax requirements for the data source.

#### `$schema`
#### `$schema` {#dollar-schema}

A root level Table Schema descriptor `MAY` have a `$schema` property that `MUST` be a profile as per [Profile](../glossary/#profile) definition that `MUST` include all the metadata constraints required by this specification.

Expand Down Expand Up @@ -287,7 +287,7 @@ Here is an illustration:

The field descriptor `object` `MAY` contain any number of other properties. Some specific properties are defined below. Of these, only the `name` property is `REQUIRED`.

#### `name` [required]
#### `name` [required] {#name}

The field descriptor `MUST` contain a `name` property and it `MUST` be unique amongst other field names in this Table Schema. This property `SHOULD` correspond to the name of a column in the data file if it has a name.

Expand Down
Loading

0 comments on commit 0830934

Please sign in to comment.