Skip to content

Commit

Permalink
chore: update docusaurus template (#774)
Browse files Browse the repository at this point in the history
Signed-off-by: aeneasr <aeneasr@users.noreply.github.com>

Co-authored-by: aeneasr <aeneasr@users.noreply.github.com>
  • Loading branch information
aeneasr and aeneasr committed Jul 5, 2021
1 parent d717e6c commit b482431
Show file tree
Hide file tree
Showing 4 changed files with 2,638 additions and 119 deletions.
3 changes: 1 addition & 2 deletions docs/contrib/theme.css
Expand Up @@ -8,7 +8,6 @@
}

.menu__link[href*="https://"] svg,
svg[class*="iconExternalLink"]
{
svg[class*="iconExternalLink"] {
display: none !important;
}
47 changes: 39 additions & 8 deletions docs/docusaurus.config.js
Expand Up @@ -6,17 +6,33 @@ const githubRepoName =

const baseUrl = config.baseUrl ? config.baseUrl : `/${config.projectSlug}/docs/`

const links = [
let links = [
{
to: 'https://www.ory.sh/',
label: `Home`,
position: 'left'
},
{
href: 'https://www.ory.sh/blog',
label: 'Blog',
position: 'left'
},
}
]

if (config.openApiSpec) {
links = [
...links,
{
to: baseUrl,
label: `Docs`,
position: 'left',
activeBaseRegex: 'docs/(?!http-api/).*'
},
{
to: baseUrl + 'http-api/',
label: `HTTP API`,
position: 'left'
}
]
}

links = [
...links,
{
href: `https://github.com/ory/${githubRepoName}/discussions`,
label: 'Discussions',
Expand Down Expand Up @@ -123,7 +139,7 @@ module.exports = {
}
},
navbar: {
hideOnScroll: true,
hideOnScroll: false,
logo: {
alt: config.projectName,
src: `img/logo-${config.projectSlug}.svg`,
Expand Down Expand Up @@ -201,5 +217,20 @@ module.exports = {
}
],
'@docusaurus/theme-search-algolia'
],
presets: [
[
'redocusaurus',
{
specs: config.openApiSpec
? [
{
routePath: '/http-api/',
specUrl: config.openApiSpec
}
]
: []
}
]
]
}

0 comments on commit b482431

Please sign in to comment.