Skip to content

Commit f1cd513

Browse files
author
Sean Katz
committed
Add Lava flavored Docusaurus website
This is an npx website generation of Docusaurus, with a few changes to fit Lava: - Site is only docs (no homepage, no blogs) - Static assets replaced to Volcanos :) - Basic redirects to Lava docs website and github repo Other technical things: - Started as TS and not JS - Cleaned out scaffolding comments
1 parent f4e80c7 commit f1cd513

13 files changed

+7894
-0
lines changed

.gitignore

+20
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*

babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docs/intro.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
sidebar_position: 1
3+
id: intro
4+
slug: /
5+
---
6+
7+
# 👋 Introduction
8+
9+
What is Lava?
10+
11+
## Getting Started
12+
13+

docusaurus.config.js

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// @ts-check
2+
// Note: type annotations allow type checking and IDEs autocompletion
3+
4+
const lightCodeTheme = require('prism-react-renderer/themes/github');
5+
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
6+
7+
/** @type {import('@docusaurus/types').Config} */
8+
const config = {
9+
title: 'Lava Docs',
10+
tagline: 'Decentralizing Web3 Infra',
11+
url: 'https://docs.lavanet.xyz',
12+
baseUrl: '/',
13+
onBrokenLinks: 'throw',
14+
onBrokenMarkdownLinks: 'warn',
15+
favicon: 'img/favicon.ico',
16+
organizationName: 'lavanet',
17+
projectName: 'docs',
18+
i18n: {
19+
defaultLocale: 'en',
20+
locales: ['en'],
21+
},
22+
23+
presets: [
24+
[
25+
'classic',
26+
/** @type {import('@docusaurus/preset-classic').Options} */
27+
({
28+
docs: {
29+
routeBasePath: '/',
30+
sidebarPath: require.resolve('./sidebars.js'),
31+
editUrl:
32+
'https://github.com/lavanet/docs/tree/master/',
33+
},
34+
theme: {
35+
customCss: require.resolve('./src/css/custom.css'),
36+
},
37+
}),
38+
],
39+
],
40+
41+
themeConfig:
42+
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
43+
({
44+
navbar: {
45+
title: 'Lava Docs',
46+
logo: {
47+
alt: 'Lava Docs Logo',
48+
src: 'img/volcano_emoji.png',
49+
},
50+
items: [
51+
{
52+
href: 'https://github.com/lavanet/docs',
53+
label: 'GitHub',
54+
position: 'right',
55+
},
56+
],
57+
},
58+
footer: {
59+
style: 'dark',
60+
copyright: `Copyright © ${new Date().getFullYear()} Lava. Docs built with Docusaurus.`,
61+
},
62+
prism: {
63+
theme: lightCodeTheme,
64+
darkTheme: darkCodeTheme,
65+
},
66+
}),
67+
};
68+
69+
module.exports = config;

package.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "lava-docs",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"docusaurus": "docusaurus",
7+
"start": "docusaurus start",
8+
"build": "docusaurus build",
9+
"swizzle": "docusaurus swizzle",
10+
"deploy": "docusaurus deploy",
11+
"clear": "docusaurus clear",
12+
"serve": "docusaurus serve",
13+
"write-translations": "docusaurus write-translations",
14+
"write-heading-ids": "docusaurus write-heading-ids",
15+
"typecheck": "tsc"
16+
},
17+
"dependencies": {
18+
"@docusaurus/core": "2.0.0-beta.21",
19+
"@docusaurus/preset-classic": "2.0.0-beta.21",
20+
"@mdx-js/react": "^1.6.22",
21+
"clsx": "^1.1.1",
22+
"prism-react-renderer": "^1.3.3",
23+
"react": "^17.0.2",
24+
"react-dom": "^17.0.2"
25+
},
26+
"devDependencies": {
27+
"@docusaurus/module-type-aliases": "2.0.0-beta.21",
28+
"@tsconfig/docusaurus": "^1.0.5",
29+
"typescript": "^4.6.4"
30+
},
31+
"browserslist": {
32+
"production": [
33+
">0.5%",
34+
"not dead",
35+
"not op_mini all"
36+
],
37+
"development": [
38+
"last 1 chrome version",
39+
"last 1 firefox version",
40+
"last 1 safari version"
41+
]
42+
}
43+
}

sidebars.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// @ts-check
2+
3+
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
4+
const sidebars = {
5+
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
6+
};
7+
8+
module.exports = sidebars;

src/css/custom.css

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Any CSS included here will be global. The classic template
3+
* bundles Infima by default. Infima is a CSS framework designed to
4+
* work well for content-centric websites.
5+
*/
6+
7+
/* You can override the default Infima variables here. */
8+
:root {
9+
--ifm-color-primary: #852e2e;
10+
--ifm-color-primary-dark: #782929;
11+
--ifm-color-primary-darker: #712727;
12+
--ifm-color-primary-darkest: #5d2020;
13+
--ifm-color-primary-light: #923333;
14+
--ifm-color-primary-lighter: #993535;
15+
--ifm-color-primary-lightest: #ad3c3c;
16+
--ifm-code-font-size: 95%;
17+
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
18+
}
19+
20+
/* For readability concerns, you should choose a lighter palette in dark mode. */
21+
[data-theme='dark'] {
22+
--ifm-color-primary: #fdb4b4;
23+
--ifm-color-primary-dark: #fc8a8a;
24+
--ifm-color-primary-darker: #fb7575;
25+
--ifm-color-primary-darkest: #fa3535;
26+
--ifm-color-primary-light: #fedede;
27+
--ifm-color-primary-lighter: #fff3f3;
28+
--ifm-color-primary-lightest: #ffffff;
29+
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
30+
}

static/.nojekyll

Whitespace-only changes.

static/img/favicon.ico

4.19 KB
Binary file not shown.

static/img/volcano_emoji.png

29.8 KB
Loading

static/img/volcano_emoji_32.png

3.3 KB
Loading

tsconfig.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
// This file is not used in compilation. It is here just for a nice editor experience.
3+
"extends": "@tsconfig/docusaurus/tsconfig.json",
4+
"compilerOptions": {
5+
"baseUrl": "."
6+
}
7+
}

0 commit comments

Comments
 (0)