docs: feat: ✨ init Docusaurus
Signed-off-by: slumbering <slumbering.pierrot@gmail.com>
This commit is contained in:
committed by
Andrea Luzzardi
parent
c4162b1e98
commit
bc3f61b928
20
tools/daggosaurus/.gitignore
vendored
Normal file
20
tools/daggosaurus/.gitignore
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# Dependencies
|
||||
/node_modules
|
||||
|
||||
# Production
|
||||
/build
|
||||
|
||||
# Generated files
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
33
tools/daggosaurus/README.md
Normal file
33
tools/daggosaurus/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Website
|
||||
|
||||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
||||
|
||||
## Installation
|
||||
|
||||
```console
|
||||
yarn install
|
||||
```
|
||||
|
||||
## Local Development
|
||||
|
||||
```console
|
||||
yarn start
|
||||
```
|
||||
|
||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||
|
||||
## Build
|
||||
|
||||
```console
|
||||
yarn build
|
||||
```
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||
|
||||
## Deployment
|
||||
|
||||
```console
|
||||
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
|
||||
```
|
||||
|
||||
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.
|
3
tools/daggosaurus/babel.config.js
Normal file
3
tools/daggosaurus/babel.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
};
|
12
tools/daggosaurus/custom_plugins/index.js
Normal file
12
tools/daggosaurus/custom_plugins/index.js
Normal file
@@ -0,0 +1,12 @@
|
||||
module.exports = function (context, options) {
|
||||
return {
|
||||
name: "custom-docusaurus-plugin",
|
||||
configureWebpack(config, isServer, utils) {
|
||||
return {
|
||||
resolve: {
|
||||
symlinks: false
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
1
tools/daggosaurus/docs
Symbolic link
1
tools/daggosaurus/docs
Symbolic link
@@ -0,0 +1 @@
|
||||
../../docs
|
48
tools/daggosaurus/docusaurus.config.js
Normal file
48
tools/daggosaurus/docusaurus.config.js
Normal file
@@ -0,0 +1,48 @@
|
||||
const path = require('path');
|
||||
|
||||
/** @type {import('@docusaurus/types').DocusaurusConfig} */
|
||||
module.exports = {
|
||||
title: 'Dagger',
|
||||
tagline: 'Dagger is a programmable deployment system',
|
||||
url: 'https://docs.dagger.io',
|
||||
baseUrl: '/',
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
favicon: 'img/favicon.png',
|
||||
organizationName: 'Dagger',
|
||||
projectName: 'Dagger',
|
||||
stylesheets: [
|
||||
'https://fonts.gstatic.com',
|
||||
'https://fonts.googleapis.com/css2?family=Poppins:wght@700&display=swap',
|
||||
'https://fonts.googleapis.com/css2?family=Karla&family=Poppins:wght@700&display=swap'
|
||||
],
|
||||
themeConfig: {
|
||||
sidebarCollapsible: false,
|
||||
prism: {
|
||||
defaultLanguage: 'go',
|
||||
},
|
||||
navbar: {
|
||||
logo: {
|
||||
alt: 'My Site Logo',
|
||||
src: 'img/dagger-logo.png',
|
||||
},
|
||||
},
|
||||
},
|
||||
presets: [
|
||||
[
|
||||
'@docusaurus/preset-classic',
|
||||
{
|
||||
docs: {
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
editUrl:
|
||||
'https://github.com/dagger/dagger/blob/main',
|
||||
routeBasePath: '/',
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
plugins: [path.resolve(__dirname, './custom_plugins')],
|
||||
};
|
39
tools/daggosaurus/package.json
Normal file
39
tools/daggosaurus/package.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "daggosaurus",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "docusaurus start",
|
||||
"build": "docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
"deploy": "docusaurus deploy",
|
||||
"clear": "docusaurus clear",
|
||||
"serve": "docusaurus serve",
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.0.0-beta.0",
|
||||
"@docusaurus/preset-classic": "2.0.0-beta.0",
|
||||
"@mdx-js/react": "^1.6.21",
|
||||
"@svgr/webpack": "^5.5.0",
|
||||
"clsx": "^1.1.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"url-loader": "^4.1.1"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.5%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
}
|
||||
}
|
45
tools/daggosaurus/sidebars.js
Normal file
45
tools/daggosaurus/sidebars.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* Creating a sidebar enables you to:
|
||||
- create an ordered group of docs
|
||||
- render a sidebar for each doc of that group
|
||||
- provide next/previous navigation
|
||||
|
||||
The sidebars can be generated from the filesystem, or explicitly defined here.
|
||||
|
||||
Create as many sidebars as you want.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
// By default, Docusaurus generates a sidebar from the docs folder structure
|
||||
tutorialSidebar: [
|
||||
{ type: 'autogenerated', dirName: '.' },
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Community',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{
|
||||
type: 'link',
|
||||
label: 'Github',
|
||||
href: 'https://github.com/dagger/dagger'
|
||||
},
|
||||
{
|
||||
type: 'link',
|
||||
label: 'Discord',
|
||||
href: 'https://discord.gg/Rmffpmc'
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
// But you can create a sidebar manually
|
||||
/*
|
||||
tutorialSidebar: [
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Tutorial',
|
||||
items: ['hello'],
|
||||
},
|
||||
],
|
||||
*/
|
||||
};
|
99
tools/daggosaurus/src/css/custom.css
Normal file
99
tools/daggosaurus/src/css/custom.css
Normal file
@@ -0,0 +1,99 @@
|
||||
/* stylelint-disable docusaurus/copyright-header */
|
||||
/**
|
||||
* Any CSS included here will be global. The classic template
|
||||
* bundles Infima by default. Infima is a CSS framework designed to
|
||||
* work well for content-centric websites.
|
||||
*/
|
||||
|
||||
/* You can override the default Infima variables here. */
|
||||
:root {
|
||||
--ifm-color-primary: #0e2b3d;
|
||||
--ifm-color-primary-dark: #131226;
|
||||
--ifm-color-primary-darker: rgb(31, 165, 136);
|
||||
--ifm-color-primary-darkest: rgb(26, 136, 112);
|
||||
--ifm-color-primary-light: #fffef3;
|
||||
--ifm-color-primary-lighter: rgb(102, 212, 189);
|
||||
--ifm-color-primary-lightest: rgb(146, 224, 208);
|
||||
--ifm-code-font-size: 95%;
|
||||
--ifm-navbar-height: 5rem;
|
||||
--ifm-background-color: var(--ifm-color-primary-light);
|
||||
--ifm-navbar-background-color: transparent;
|
||||
--ifm-menu-color-active: var(--ifm-color-primary-dark);
|
||||
--ifm-font-family-base: "Karla", sans-serif;
|
||||
/* --ifm-font-family-monospace: "Karla", sans-serif; */
|
||||
--ifm-h2-font-size: 2rem;
|
||||
--ifm-menu-color-background-active: var(--ifm-color-primary);
|
||||
--ifm-menu-color-active: var(--ifm-color-primary-light);
|
||||
--ifm-leading-desktop: 2;
|
||||
}
|
||||
|
||||
html[data-theme="dark"] {
|
||||
--ifm-background-color: var(--ifm-color-primary-dark);
|
||||
--ifm-navbar-background-color: transparent;
|
||||
--ifm-menu-color-active: var(--ifm-color-primary-light);
|
||||
--ifm-menu-color-active: var(--ifm-color-primary-light);
|
||||
--ifm-link-color: var(--ifm-color-primary-light);
|
||||
}
|
||||
|
||||
#__docusaurus {
|
||||
background-color: var(--ifm-color-primary-light);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] #__docusaurus {
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
var(--ifm-color-primary-dark),
|
||||
var(--ifm-color-primary)
|
||||
);
|
||||
}
|
||||
|
||||
.docusaurus-highlight-code-line {
|
||||
background-color: rgb(72, 77, 91);
|
||||
display: block;
|
||||
margin: 0 calc(-1 * var(--ifm-pre-padding));
|
||||
padding: 0 var(--ifm-pre-padding);
|
||||
}
|
||||
|
||||
.navbar__brand {
|
||||
height: var(--ifm-navbar-height);
|
||||
}
|
||||
|
||||
.navbar {
|
||||
max-width: var(--ifm-container-width-xl);
|
||||
align-self: center;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.main-wrapper {
|
||||
max-width: var(--ifm-container-width-xl);
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
font-family: "Poppins", sans-serif;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-weight: 700;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.markdown > h2 {
|
||||
--ifm-h2-font-size: 1.5rem;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.table-of-contents {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.table-of-contents__link--active {
|
||||
font-weight: bold;
|
||||
}
|
0
tools/daggosaurus/static/.nojekyll
Normal file
0
tools/daggosaurus/static/.nojekyll
Normal file
BIN
tools/daggosaurus/static/img/dagger-logo.png
Normal file
BIN
tools/daggosaurus/static/img/dagger-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
tools/daggosaurus/static/img/favicon.png
Normal file
BIN
tools/daggosaurus/static/img/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
8780
tools/daggosaurus/yarn.lock
Normal file
8780
tools/daggosaurus/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user