Skip to content

Commit

Permalink
feat: initialize documentation site
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi committed May 4, 2022
1 parent ab2ec65 commit facaf1f
Show file tree
Hide file tree
Showing 22 changed files with 23,307 additions and 2,106 deletions.
132 changes: 132 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"extends": ["@sapphire", "plugin:import/typescript"],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"jsx": true
},
"plugins": ["import", "jsx-a11y", "react", "react-hooks"],
"settings": {
"react": {
"version": "detect"
}
},
"overrides": [
{
"files": ["docusaurus.config.js", "babel.config.js", "sidebars.js"],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/ban-ts-comment": "off"
}
}
],
"rules": {
"no-extra-label": "warn",
"no-iterator": "warn",
"no-label-var": "warn",
"no-labels": [
"warn",
{
"allowLoop": true,
"allowSwitch": true
}
],
"no-lone-blocks": "warn",
"no-loop-func": "warn",
"no-mixed-operators": [
"warn",
{
"groups": [
["&", "|", "^", "~", "<<", ">>", ">>>"],
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"]
],
"allowSamePrecedence": false
}
],
"no-multi-str": "warn",
"rest-spread-spacing": ["warn", "never"],
"no-restricted-properties": [
"error",
{
"object": "require",
"property": "ensure",
"message": "Please use import() instead. More info: https://facebook.github.io/create-react-app/docs/code-splitting"
},
{
"object": "System",
"property": "import",
"message": "Please use import() instead. More info: https://facebook.github.io/create-react-app/docs/code-splitting"
}
],
"getter-return": "warn",
"import/first": "error",
"import/no-amd": "error",
"import/no-webpack-loader-syntax": "error",
"react/forbid-foreign-prop-types": [
"warn",
{
"allowInPropTypes": true
}
],
"react/jsx-no-comment-textnodes": "warn",
"react/jsx-no-duplicate-props": "warn",
"react/jsx-no-target-blank": "warn",
"react/jsx-no-undef": "error",
"react/jsx-pascal-case": [
"warn",
{
"allowAllCaps": true,
"ignore": []
}
],
"react/jsx-uses-react": "warn",
"react/jsx-uses-vars": "warn",
"react/no-children-prop": "warn",
"react/no-access-state-in-setstate": "warn",
"react/no-danger": "error",
"react/no-danger-with-children": "warn",
"react/no-direct-mutation-state": "warn",
"react/no-is-mounted": "warn",
"react/no-this-in-sfc": "warn",
"react/no-typos": "error",
"react/react-in-jsx-scope": "error",
"react/require-render-return": "error",
"react/style-prop-object": "warn",
"react/void-dom-elements-no-children": "warn",
"jsx-a11y/accessible-emoji": "warn",
"jsx-a11y/alt-text": "warn",
"jsx-a11y/anchor-has-content": "warn",
"jsx-a11y/anchor-is-valid": [
"warn",
{
"aspects": ["noHref", "invalidHref"]
}
],
"jsx-a11y/aria-activedescendant-has-tabindex": "warn",
"jsx-a11y/aria-props": "warn",
"jsx-a11y/aria-proptypes": "warn",
"jsx-a11y/aria-role": [
"warn",
{
"ignoreNonDOM": true
}
],
"jsx-a11y/aria-unsupported-elements": "warn",
"jsx-a11y/heading-has-content": "warn",
"jsx-a11y/iframe-has-title": "warn",
"jsx-a11y/img-redundant-alt": "warn",
"jsx-a11y/no-access-key": "warn",
"jsx-a11y/no-distracting-elements": "warn",
"jsx-a11y/no-redundant-roles": "warn",
"jsx-a11y/role-has-required-aria-props": "warn",
"jsx-a11y/role-supports-aria-props": "warn",
"jsx-a11y/scope": "warn",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error"
}
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,7 @@ dist

# TernJS port file
.tern-port

# Docusaurus
.docusaurus
build
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "projects/sapphire-plugins"]
path = projects/sapphire-plugins
url = https://github.com/zhycorp/sapphire-plugins
branch = main
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# template
> A repository for Zhycorp's project base
# docs
> A repository for Zhycorp's project docs website
# Work In Progress
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
Empty file added docs/intro.md
Empty file.
113 changes: 113 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Zhycorp Docs',
url: 'https://docs.zhycorp.org',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/logo.png',
organizationName: 'zhycorp',
projectName: 'documentation',
plugins: [
[
'docusaurus-plugin-typedoc',
{
id: 'Sapphire-Plugins',
entryPointStrategy: 'resolve',
entryPoints: [
'./projects/sapphire-plugins/packages/command-context/src/index.ts'
],
tsconfig: './tsconfig.typedoc.json',
readme: 'none',
out: 'documentation/plugins',
plugin: ['typedoc-plugin-mdn-links', 'typedoc-plugin-djs-links'],
sidebar: {
categoryLabel: 'Zhycorp Sapphire Plugins',
position: 2
}
}
],
],
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/zhycorp/docs/tree/main/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'Zhycorp',
logo: {
alt: 'Zhycorp Logo',
src: 'img/logo.png',
},
items: [
{
type: 'doc',
docId: 'intro',
position: 'left',
label: 'Documentation',
},
{
href: 'https://github.com/zhycorp/docs',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Guides',
items: [
{
label: 'Documentation',
to: '/docs/intro',
},
],
},
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://zhycorp.org/discord',
}
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/zhycorp',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Zhycorp Organization`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};

module.exports = config;
Loading

0 comments on commit facaf1f

Please sign in to comment.