Skip to content

fix: add "Go Back" and "Up Next" navigation buttons for Specification… #1708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14,526 changes: 14,526 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"postcss": "^8.4.41",
"prettier": "3.3.3",
"tailwindcss": "^3.3.5",
"typescript": "5.7.2",
"typescript": "5.3.3",
"webpack": "^5.94.0"
},
"babel": {
Expand Down
6 changes: 6 additions & 0 deletions pages/draft-05/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ type: docs
authors: ['Austin Wright']
Metaschema: 'https://json-schema.org/draft-04/schema'
Specification: 'https://json-schema.org/draft-05/draft-wright-json-schema-00.pdf'
prev:
label: Draft 06
url: /draft-06
next:
label: Specification Links
url: /specification-links
---

### Draft-05 Documents
Expand Down
8 changes: 7 additions & 1 deletion pages/draft-05/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SectionContext } from '~/context';
import DocTable from '~/components/DocTable';
import { Headline1 } from '~/components/Headlines';
import { DocsHelp } from '~/components/DocsHelp';

import NextPrevButton from '~/components/NavigationButtons';
export async function getStaticProps() {
const index = fs.readFileSync('pages/draft-05/index.md', 'utf-8');
const main = fs.readFileSync('pages/draft-05/release-notes.md', 'utf-8');
Expand Down Expand Up @@ -40,6 +40,12 @@ export default function ImplementationsPages({
<DocTable frontmatter={frontmatter} />
<StyledMarkdown markdown={blocks.index} />
<StyledMarkdown markdown={blocks.body} />
<NextPrevButton
prevLabel={frontmatter?.prev?.label}
prevURL={frontmatter?.prev?.url}
nextLabel={frontmatter?.next?.label}
nextURL={frontmatter?.next?.url}
/>
<DocsHelp fileRenderType={fileRenderType} />
</SectionContext.Provider>
);
Expand Down
6 changes: 6 additions & 0 deletions pages/draft-06/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ type: docs
authors: ['Austin Wright', 'Henry Andrews']
Metaschema: 'https://json-schema.org/draft-06/schema'
Specification: 'https://json-schema.org/draft-06/draft-wright-json-schema-01.html'
prev:
label: Draft 07
url: /draft-07
next:
label: Draft 05
url: /draft-05
---

### Draft-06 Documents
Expand Down
8 changes: 7 additions & 1 deletion pages/draft-06/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SectionContext } from '~/context';
import DocTable from '~/components/DocTable';
import { Headline1 } from '~/components/Headlines';
import { DocsHelp } from '~/components/DocsHelp';

import NextPrevButton from '~/components/NavigationButtons';
export async function getStaticProps() {
const index = fs.readFileSync('pages/draft-06/index.md', 'utf-8');

Expand Down Expand Up @@ -37,6 +37,12 @@ export default function ImplementationsPages({
<Headline1>{frontmatter.title}</Headline1>
<DocTable frontmatter={frontmatter} />
<StyledMarkdown markdown={blocks.index} />
<NextPrevButton
prevLabel={frontmatter?.prev?.label}
prevURL={frontmatter?.prev?.url}
nextLabel={frontmatter?.next?.label}
nextURL={frontmatter?.next?.url}
/>
<DocsHelp fileRenderType={fileRenderType} />
</SectionContext.Provider>
);
Expand Down
9 changes: 7 additions & 2 deletions pages/draft-07/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ type: docs
authors: ['Austin Wright', 'Henry Andrews']
Metaschema: 'https://json-schema.org/draft-07/schema'
Specification: 'https://json-schema.org/draft-07/draft-handrews-json-schema-01.html'
prev:
label: Draft 2019-09
url: /draft/2019-09
next:
label: Draft 06
url: /draft-06
---

### Introduction
Expand Down Expand Up @@ -37,5 +43,4 @@ _These were updated without changing functionality or meta-schemas due to a few
- [JSON Schema Release Notes](../draft-07/json-schema-release-notes)
- [JSON Hyper-Schema Release Notes](../draft-07/json-hyper-schema-release-notes)


Note that the draft-handrews-\*-00 versions of JSON Hyper-Schema and Relative JSON Pointer had confusing bugs, and have been replaced by draft-handrews-\*-01 versions. The -00 versions may be found in the [obsolete](obsolete) directory.
Note that the draft-handrews-\*-00 versions of JSON Hyper-Schema and Relative JSON Pointer had confusing bugs, and have been replaced by draft-handrews-\*-01 versions. The -00 versions may be found in the [obsolete](obsolete) directory.
8 changes: 7 additions & 1 deletion pages/draft-07/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SectionContext } from '~/context';
import DocTable from '~/components/DocTable';
import { Headline1 } from '~/components/Headlines';
import { DocsHelp } from '~/components/DocsHelp';

import NextPrevButton from '~/components/NavigationButtons';
export async function getStaticProps() {
const index = fs.readFileSync('pages/draft-07/index.md', 'utf-8');

Expand Down Expand Up @@ -37,6 +37,12 @@ export default function ImplementationsPages({
<Headline1>{frontmatter.title}</Headline1>
<DocTable frontmatter={frontmatter} />
<StyledMarkdown markdown={blocks.index} />
<NextPrevButton
prevLabel={frontmatter?.prev?.label}
prevURL={frontmatter?.prev?.url}
nextLabel={frontmatter?.next?.label}
nextURL={frontmatter?.next?.url}
/>
<DocsHelp fileRenderType={fileRenderType} />
</SectionContext.Provider>
);
Expand Down
7 changes: 7 additions & 0 deletions pages/draft/2019-09/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ authors:
- Greg Dennis
Published: 17 September 2019
Metaschema: https://json-schema.org/draft/2019-09/schema
prev:
label: Draft 2020-12
url: /draft/2020-12
next:
label: Draft 07
url: /draft-07
---

### Introduction
Expand Down Expand Up @@ -43,6 +49,7 @@ One significant update is the shift to HTTPS for all meta-schema URIs. While the
- [JSON Schema recommended output schema](https://json-schema.org/draft/2019-09/output/schema)
- [JSON Hyper-Schema recommended output schema](https://json-schema.org/draft/2019-09/output/hyper-schema)
- Output examples

- [JSON Schema verbose output example](https://json-schema.org/draft/2019-09/output/verbose-example)

### Release Notes
Expand Down
8 changes: 7 additions & 1 deletion pages/draft/2019-09/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SectionContext } from '~/context';
import DocTable from '~/components/DocTable';
import { Headline1 } from '~/components/Headlines';
import { DocsHelp } from '~/components/DocsHelp';

import NextPrevButton from '~/components/NavigationButtons';
export async function getStaticProps() {
const index = fs.readFileSync('pages/draft/2019-09/index.md', 'utf-8');
const { content: indexContent, data: indexData } = matter(index);
Expand Down Expand Up @@ -36,6 +36,12 @@ export default function ImplementationsPages({
<Headline1>{frontmatter.title}</Headline1>
<DocTable frontmatter={frontmatter} />
<StyledMarkdown markdown={blocks.index} />
<NextPrevButton
prevLabel={frontmatter?.prev?.label}
prevURL={frontmatter?.prev?.url}
nextLabel={frontmatter?.next?.label}
nextURL={frontmatter?.next?.url}
/>
<DocsHelp fileRenderType={fileRenderType} />
</SectionContext.Provider>
);
Expand Down
8 changes: 7 additions & 1 deletion pages/draft/2020-12/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ type: docs
authors: ['Austin Wright', 'Henry Andrews', 'Ben Hutton', 'Greg Dennis']
Metaschema: 'https://json-schema.org/draft/2020-12/schema'
Specification: 'https://json-schema.org/draft/2020-12/json-schema-core.html'
prev:
label: Specification
url: /specification
next:
label: Draft 2019-09
url: /draft/2019-09
---

### Introduction
Expand Down Expand Up @@ -55,4 +61,4 @@ _These were updated without changing functionality or meta-schemas due to a few

### Release Notes

- [Draft 2020-12 Release Notes](../draft/2020-12/release-notes)
- [Draft 2020-12 Release Notes](../draft/2020-12/release-notes)
8 changes: 7 additions & 1 deletion pages/draft/2020-12/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SectionContext } from '~/context';
import DocTable from '~/components/DocTable';
import { Headline1 } from '~/components/Headlines';
import { DocsHelp } from '~/components/DocsHelp';

import NextPrevButton from '~/components/NavigationButtons';
export async function getStaticProps() {
const index = fs.readFileSync('pages/draft/2020-12/index.md', 'utf-8');
const { content: indexContent, data: indexData } = matter(index);
Expand Down Expand Up @@ -36,6 +36,12 @@ export default function ImplementationsPages({
<Headline1>{frontmatter.title}</Headline1>
<DocTable frontmatter={frontmatter} />
<StyledMarkdown markdown={blocks.index} />
<NextPrevButton
prevLabel={frontmatter?.prev?.label}
prevURL={frontmatter?.prev?.url}
nextLabel={frontmatter?.next?.label}
nextURL={frontmatter?.next?.url}
/>
<DocsHelp fileRenderType={fileRenderType} />
</SectionContext.Provider>
);
Expand Down
Loading
Loading