From b23ce35ad5380b0bbe298f12eb6fe1516605acbb Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 29 Nov 2018 22:43:10 +0100 Subject: [PATCH] /reference/ -> /references/ --- content/{reference => references}/introduction.md | 0 data/repositories.yml | 4 ++-- data/sections.yml | 2 +- data/sidebars/{reference.yml => references.yml} | 8 ++++---- gatsby-node.js | 6 +++--- src/components/HeaderSection.module.scss | 2 +- src/templates/ApiSwagger.jsx | 6 +++--- src/templates/Doc.jsx | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) rename content/{reference => references}/introduction.md (100%) rename data/sidebars/{reference.yml => references.yml} (69%) diff --git a/content/reference/introduction.md b/content/references/introduction.md similarity index 100% rename from content/reference/introduction.md rename to content/references/introduction.md diff --git a/data/repositories.yml b/data/repositories.yml index d9ec9e6f..76b40b6b 100644 --- a/data/repositories.yml +++ b/data/repositories.yml @@ -8,12 +8,12 @@ - name: aquarius links: - name: API reference - url: /reference/aquarius/ + url: /references/aquarius/ - name: brizo links: - name: API reference - url: /reference/brizo/ + url: /references/brizo/ - name: pleuston diff --git a/data/sections.yml b/data/sections.yml index 2cb4e55d..4593830f 100644 --- a/data/sections.yml +++ b/data/sections.yml @@ -15,5 +15,5 @@ - title: API & Library References description: Get the references for REST APIs and library methods for all relevant components. - link: /reference/introduction/ + link: /references/introduction/ color: green diff --git a/data/sidebars/reference.yml b/data/sidebars/references.yml similarity index 69% rename from data/sidebars/reference.yml rename to data/sidebars/references.yml index 4cdd32e8..f75ee6ee 100644 --- a/data/sidebars/reference.yml +++ b/data/sidebars/references.yml @@ -1,7 +1,7 @@ - group: Overview items: - title: API References - link: /reference/introduction/ + link: /references/introduction/ # - group: squid-js # items: @@ -11,14 +11,14 @@ - group: aquarius items: - title: API reference - link: /reference/aquarius/ + link: /references/aquarius/ - group: brizo items: - title: API reference - link: /reference/brizo/ + link: /references/brizo/ - group: pet store items: - title: API reference - link: /reference/petstore/ + link: /references/petstore/ diff --git a/gatsby-node.js b/gatsby-node.js index e64801c7..7850bee1 100755 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -156,7 +156,7 @@ exports.createPages = ({ graphql, actions }) => { './src/templates/ApiSwagger.jsx' ) - const petStoreSlug = '/reference/petstore/' + const petStoreSlug = '/references/petstore/' try { const spec = await getSpec() @@ -174,7 +174,7 @@ exports.createPages = ({ graphql, actions }) => { } const aquariusSpecs = require('./data/aquarius.json') - const aquariusSlug = '/reference/aquarius/' + const aquariusSlug = '/references/aquarius/' createPage({ path: aquariusSlug, @@ -186,7 +186,7 @@ exports.createPages = ({ graphql, actions }) => { }) const brizoSpecs = require('./data/brizo.json') - const brizoSlug = '/reference/brizo/' + const brizoSlug = '/references/brizo/' createPage({ path: brizoSlug, diff --git a/src/components/HeaderSection.module.scss b/src/components/HeaderSection.module.scss index d8a6a4c1..6ed1cff6 100644 --- a/src/components/HeaderSection.module.scss +++ b/src/components/HeaderSection.module.scss @@ -23,7 +23,7 @@ color: $orange; } - :global(.reference) & { + :global(.references) & { color: $green; } } diff --git a/src/templates/ApiSwagger.jsx b/src/templates/ApiSwagger.jsx index 1999a407..d764669d 100644 --- a/src/templates/ApiSwagger.jsx +++ b/src/templates/ApiSwagger.jsx @@ -220,7 +220,7 @@ export default class ApiSwaggerTemplate extends Component { // output section title as defined in sections.yml const sectionTitle = sections.map(({ node }) => { // compare section against section title from sections.yml - if (node.title.toLowerCase().includes('reference')) { + if (node.title.toLowerCase().includes('references')) { return node.title } }) @@ -228,7 +228,7 @@ export default class ApiSwaggerTemplate extends Component { return ( <> - + @@ -83,7 +83,7 @@ export default class DocTemplate extends Component { toc={ isApiSection && !location.pathname.includes( - '/reference/introduction/' + '/references/introduction/' ) } tableOfContents={tableOfContents}