Skip to content

Commit b71612e

Browse files
Initialize site with Docusaurus (#310)
Signed-off-by: Anders Swanson <[email protected]>
1 parent 9e31933 commit b71612e

29 files changed

+18003
-0
lines changed

site/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

site/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
Requirements:
6+
- latest version of NodeJS
7+
8+
## Installation
9+
10+
```bash
11+
npm
12+
```
13+
14+
## Local Development
15+
16+
```bash
17+
npm start
18+
```
19+
20+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
21+
22+
## Build
23+
24+
```bash
25+
npm run build
26+
```
27+
28+
## Versioning
29+
30+
```bash
31+
npm run docusaurus docs:version 1.1.0
32+
```
33+
34+
Then, add the version to the `docusaurus.config.ts` versions navbar.
35+
36+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
37+
38+
## Deployment
39+
40+
Using SSH:
41+
42+
```bash
43+
USE_SSH=true yarn deploy
44+
```
45+
46+
Not using SSH:
47+
48+
```bash
49+
GIT_USER=<Your GitHub username> yarn deploy
50+
```
51+
52+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Configuration",
3+
"position": 3,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "How to configure the Oracle Database Metrics Exporter."
7+
}
8+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Configuration
3+
sidebar_position: 1
4+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Getting Started",
3+
"position": 2,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Learn the most important Oracle Database Metrics Exporter concepts."
7+
}
8+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Quickstart
3+
sidebar_position: 1
4+
---

site/docs/intro.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Introduction
6+

site/docusaurus.config.ts

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
import {themes as prismThemes} from 'prism-react-renderer';
2+
import type {Config} from '@docusaurus/types';
3+
import type * as Preset from '@docusaurus/preset-classic';
4+
5+
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
6+
7+
const config: Config = {
8+
title: 'Oracle Database Metrics Exporter',
9+
tagline: 'OpenTelemetry Metrics for your Oracle Database instances',
10+
favicon: 'img/favicon-32x32.png',
11+
12+
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
13+
future: {
14+
v4: true, // Improve compatibility with the upcoming Docusaurus v4
15+
},
16+
17+
// TODO: Set the production url of your site here
18+
url: 'https://oracle.github.io',
19+
// Set the /<baseUrl>/ pathname under which your site is served
20+
// For GitHub pages deployment, it is often '/<projectName>/'
21+
baseUrl: '/oracle-db-appdev-monitoring/',
22+
23+
// GitHub pages deployment config.
24+
// If you aren't using GitHub pages, you don't need these.
25+
organizationName: 'oracle', // Usually your GitHub org/user name.
26+
projectName: 'oracle-db-appdev-monitoring', // Usually your repo name.
27+
28+
onBrokenLinks: 'throw',
29+
onBrokenMarkdownLinks: 'warn',
30+
31+
// Even if you don't use internationalization, you can use this field to set
32+
// useful metadata like html lang. For example, if your site is Chinese, you
33+
// may want to replace "en" with "zh-Hans".
34+
i18n: {
35+
defaultLocale: 'en',
36+
locales: ['en'],
37+
},
38+
39+
presets: [
40+
[
41+
'classic',
42+
{
43+
docs: {
44+
sidebarPath: './sidebars.ts',
45+
// Please change this to your repo.
46+
// Remove this to remove the "edit this page" links.
47+
editUrl:
48+
'https://github.com/oracle/oracle-db-appdev-monitoring/tree/main/site/',
49+
},
50+
theme: {
51+
customCss: './src/css/custom.css',
52+
},
53+
} satisfies Preset.Options,
54+
],
55+
],
56+
57+
themeConfig: {
58+
// Replace with your project's social card
59+
image: 'img/logo.png',
60+
navbar: {
61+
title: 'Oracle Database Monitoring Exporter',
62+
logo: {
63+
alt: 'Oracle Database Monitoring Exporter Logo',
64+
src: 'img/logo_home.png',
65+
},
66+
items: [
67+
{
68+
type: 'docSidebar',
69+
sidebarId: 'tutorialSidebar',
70+
position: 'left',
71+
label: 'Docs',
72+
},
73+
{
74+
type: 'docsVersionDropdown',
75+
versions: ['current']
76+
},
77+
{
78+
href: 'https://github.com/oracle/oracle-db-appdev-monitoring',
79+
label: 'GitHub',
80+
position: 'right',
81+
},
82+
],
83+
},
84+
footer: {
85+
style: 'dark',
86+
links: [
87+
{
88+
title: 'Docs',
89+
items: [
90+
{
91+
label: 'Tutorial',
92+
to: '/docs/intro',
93+
},
94+
],
95+
},
96+
{
97+
title: 'Community',
98+
items: [
99+
{
100+
label: 'Stack Overflow',
101+
href: 'https://stackoverflow.com/questions/tagged/oracle',
102+
},
103+
],
104+
},
105+
{
106+
title: 'More',
107+
items: [
108+
{
109+
label: 'Oracle Blogs',
110+
to: 'https://blogs.oracle.com/',
111+
},
112+
{
113+
label: 'Oracle LiveLabs',
114+
to: 'https://livelabs.oracle.com/pls/apex/r/dbpm/livelabs/home'
115+
},
116+
{
117+
label: 'GitHub',
118+
href: 'https://github.com/oracle/oracle-db-appdev-monitoring',
119+
},
120+
],
121+
},
122+
],
123+
copyright: `Copyright © ${new Date().getFullYear()}, Oracle and/or its affiliates. Built with ❤️ using Docusaurus.`,
124+
},
125+
prism: {
126+
theme: prismThemes.github,
127+
darkTheme: prismThemes.dracula,
128+
},
129+
} satisfies Preset.ThemeConfig,
130+
};
131+
132+
export default config;

0 commit comments

Comments
 (0)