Skip to content

Commit

Permalink
Version 3 (#166)
Browse files Browse the repository at this point in the history
* upgrading to docusaurus v3

Signed-off-by: Mohab Mohie <[email protected]>

* Update docusaurus.config.js

Signed-off-by: Mohab Mohie <[email protected]>

* Update package.json

Signed-off-by: Mohab Mohie <[email protected]>

* Update tsconfig.json

Signed-off-by: Mohab Mohie <[email protected]>

* Update deploy.yml

Signed-off-by: Mohab Mohie <[email protected]>

* Update test.yml

Signed-off-by: Mohab Mohie <[email protected]>

* Update docusaurus.config.js

Signed-off-by: Mohab Mohie <[email protected]>

* Update docusaurus.config.js

Signed-off-by: Mohab Mohie <[email protected]>

* local compilation and dep upgrade

* ++additionalLanguages

---------

Signed-off-by: Mohab Mohie <[email protected]>
  • Loading branch information
MohabMohie authored Jan 29, 2024
1 parent 3f91c34 commit c7ef3dd
Show file tree
Hide file tree
Showing 6 changed files with 2,906 additions and 3,268 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: yarn

- name: Install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: yarn

- name: Install
Expand Down
36 changes: 21 additions & 15 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const {themes} = require('prism-react-renderer');
const lightTheme = themes.github;
const darkTheme = themes.dracula;

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand All @@ -26,6 +27,16 @@ const config = {
i18n: {
defaultLocale: 'en',
locales: ['en'],
path: 'i18n',
localeConfigs: {
en: {
label: 'English',
direction: 'ltr',
htmlLang: 'en-US',
calendar: 'gregory',
path: 'en',
},
},
},

trailingSlash: false,
Expand Down Expand Up @@ -155,11 +166,6 @@ const config = {
label: 'JavaDocs',
position: 'right',
},
{
href: 'https://shafthq.github.io/SHAFT_ENGINE/',
label: 'Configuration Manager',
position: 'right',
},
{
href: 'https://github.com/shafthq/SHAFT_ENGINE',
label: 'GitHub',
Expand All @@ -177,6 +183,10 @@ const config = {
label: 'Getting Started',
to: '/docs/Getting_Started/Prerequisites',
},
{
label: 'Properties',
to: '/docs/Properties/PropertyTypes',
},
{
label: 'Actions',
to: '/docs/Keywords/GUI/Element_Actions',
Expand Down Expand Up @@ -215,10 +225,6 @@ const config = {
label: 'GitHub',
href: 'https://github.com/ShaftHQ',
},
{
label: 'Configuration Manager',
to: 'https://shafthq.github.io/SHAFT_ENGINE/',
},
{
label: 'JavaDocs',
to: 'https://shafthq.github.io/SHAFT_ENGINE/apidocs/index.html',
Expand All @@ -229,11 +235,11 @@ const config = {
copyright: `Copyright © ${new Date().getFullYear()} ShaftHQ. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['java', 'json'],
theme: lightTheme,
darkTheme: darkTheme,
additionalLanguages: ['java', 'json', 'json5', 'gherkin', 'properties', 'powershell', 'regex', 'sql', 'xml-doc', 'yaml', 'javadoc', 'javastacktrace', 'javadoclike'],
},
}),
};

module.exports = config;
export default config;
20 changes: 9 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "^1.1.0",
"@docusaurus/core": "2.4.3",
"@docusaurus/preset-classic": "2.4.3",
"@mdx-js/react": "^1.6.22",
"clsx": "^2.1.0",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"@docusaurus/core": "3.1.1",
"@docusaurus/preset-classic": "3.1.1",
"@mdx-js/react": "^3.0.0",
"prism-react-renderer": "^2.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.1.0",
"@tsconfig/docusaurus": "^2.0.1",
"typescript": "^5.3.3"
"@docusaurus/module-type-aliases": "3.1.1",
"@docusaurus/types": "3.1.1"
},
"browserslist": {
"production": [
Expand All @@ -43,6 +41,6 @@
]
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
}
7 changes: 0 additions & 7 deletions tsconfig.json

This file was deleted.

Loading

0 comments on commit c7ef3dd

Please sign in to comment.