Skip to content

Commit

Permalink
chore: add keto back up config
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Feb 10, 2022
1 parent 4f4f2af commit 8307e8d
Show file tree
Hide file tree
Showing 4 changed files with 266 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/config/keto/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
projectName: 'ORY Oathkeeper',
projectSlug: 'oathkeeper',
newsletter:
'https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53&group[17097][16]=1',
projectTagLine:
'A cloud native Identity & Access Proxy / API (IAP) and Access Control Decision API that authenticates, authorizes, and mutates incoming HTTP(s) requests. Inspired by the BeyondCorp / Zero Trust white paper. Written in Go.',
updateTags: [
{
image: 'oryd/oathkeeper',
files: ['docs/docs/install.md', 'docs/docs/configure-deploy.md']
},
{
replacer: ({ content, next }) =>
content.replace(
/v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/gi,
`${next}`
),
files: ['docs/docs/install.md']
}
],
updateConfig: {
src: '../.schema/config.schema.json',
dst: 'docs/reference/configuration.md'
}
}
205 changes: 205 additions & 0 deletions src/config/keto/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
const config = require('./contrib/config.js')
const fs = require('fs')

const githubRepoName =
config.projectSlug === 'ecosystem' ? 'docs' : config.projectSlug

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

let links = [
{
to: 'https://www.ory.sh/',
label: `Home`,
position: 'left'
},
{
href: `https://github.com/ory/${githubRepoName}/discussions`,
label: 'Discussions',
position: 'right'
},
{
href: 'https://www.ory.sh/chat',
label: 'Slack',
position: 'right'
},
{
href: `https://github.com/ory/${githubRepoName}`,
label: 'GitHub',
position: 'right'
}
]

const customCss = [require.resolve('./contrib/theme.css')]

if (fs.existsSync('./src/css/theme.css')) {
customCss.push(require.resolve('./src/css/theme.css'))
}

const githubPrismTheme = require('prism-react-renderer/themes/github')

const prismThemeLight = {
...githubPrismTheme,
styles: [
...githubPrismTheme.styles,
{
languages: ['keto-relation-tuples'],
types: ['namespace'],
style: {
color: '#666'
}
},
{
languages: ['keto-relation-tuples'],
types: ['object'],
style: {
color: '#939'
}
},
{
languages: ['keto-relation-tuples'],
types: ['relation'],
style: {
color: '#e80'
}
},
{
languages: ['keto-relation-tuples'],
types: ['delimiter'],
style: {
color: '#555'
}
},
{
languages: ['keto-relation-tuples'],
types: ['comment'],
style: {
color: '#999'
}
},
{
languages: ['keto-relation-tuples'],
types: ['subject'],
style: {
color: '#903'
}
}
]
}

module.exports = {
title: config.projectName,
tagline: config.projectTagLine,
url: `https://www.ory.sh/`,
baseUrl,
favicon: 'img/favico.png',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
organizationName: 'ory', // Usually your GitHub org/user name.
projectName: config.projectSlug, // Usually your repo name.
themeConfig: {
prism: {
theme: prismThemeLight,
darkTheme: require('prism-react-renderer/themes/dracula'),
additionalLanguages: ['json5', 'pug', 'shell-session']
},
announcementBar: {
id: 'supportus',
content:
config.projectSlug === 'docs'
? `Sign up for <a href="${config.newsletter}">important security announcements</a> and if you like the ${config.projectName} give us some ⭐️ on <a target="_blank" rel="noopener noreferrer" href="https://github.com/ory">GitHub</a>!`
: `Sign up for <a href="${config.newsletter}">important security announcements</a> and if you like ${config.projectName} give it a ⭐️ on <a target="_blank" rel="noopener noreferrer" href="https://github.com/ory/${githubRepoName}">GitHub</a>!`
},
algolia: {
appId: 'V2EFIWEJ25',
apiKey: 'dc6b220f7d2bcd12da60b9cce431d8c5',
indexName: 'ory',
contextualSearch: true,
searchParameters: {
facetFilters: [[`tags:${config.projectSlug}`, `tags:docs`]]
}
},
navbar: {
hideOnScroll: false,
logo: {
alt: config.projectName,
src: `img/logo-${config.projectSlug}.svg`,
srcDark: `img/logo-${config.projectSlug}.svg`,
href:
config.projectSlug === 'docs'
? `https://www.ory.sh`
: `https://www.ory.sh/${config.projectSlug}`
},
items: [
...links,
{
type: 'docsVersionDropdown',
position: 'right',
dropdownActiveClassDisabled: true,
dropdownItemsAfter: [
{
to: '/versions',
label: 'All versions'
}
]
}
]
},
footer: {
style: 'dark',
copyright: `Copyright © ${new Date().getFullYear()} ORY GmbH`,
links: [
{
title: 'Company',
items: [
{
label: 'Imprint',
href: 'https://www.ory.sh/imprint'
},
{
label: 'Privacy',
href: 'https://www.ory.sh/privacy'
},
{
label: 'Terms',
href: 'https://www.ory.sh/tos'
}
]
}
]
}
},
plugins: [
[
'@docusaurus/plugin-content-docs',
{
path:
config.projectSlug === 'docusaurus-template'
? 'contrib/docs'
: 'docs',
sidebarPath: require.resolve('./contrib/sidebar.js'),
editUrl: `https://github.com/ory/${githubRepoName}/edit/master/docs`,
editCurrentVersion: false,
routeBasePath: '/',
showLastUpdateAuthor: true,
showLastUpdateTime: true,
disableVersioning: false,
include: ['**/*.md', '**/*.mdx', '**/*.jsx'],
docLayoutComponent: '@theme/RoutedDocPage'
}
],
'@docusaurus/plugin-content-pages',
require.resolve('./src/plugins/ory-scripts-loader'),
require.resolve('./src/plugins/docusaurus-plugin-matamo'),
'@docusaurus/plugin-sitemap'
],
themes: [
[
'@docusaurus/theme-classic',
{
customCss
}
],
'@docusaurus/theme-search-algolia',
'docusaurus-theme-redoc'
]
}
34 changes: 34 additions & 0 deletions src/config/keto/sidebar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"Introduction": ["index", "install", "contributing"]
},
{
"Core Concepts": [
"api-access-rules",
{
"type": "category",
"label": "Handlers",
"items": [
"pipeline",
"pipeline/authn",
"pipeline/authz",
"pipeline/mutator",
"pipeline/error"
]
}
]
},
{
"Guides": ["configure-deploy"]
},
"reference/api",
{
"Reference": ["reference/configuration"]
},
{
"SDKs": ["sdk"]
},
{
"Development": ["milestones"]
}
]
1 change: 1 addition & 0 deletions src/config/keto/versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["v0.38", "v0.37"]

0 comments on commit 8307e8d

Please sign in to comment.