Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Project for Local Development #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
const path = require('path');
const fs = require('fs');

// Verify @docusaurus/core is installed
const docusaurusCorePath = path.resolve(__dirname, 'node_modules', '@docusaurus', 'core');
if (!fs.existsSync(docusaurusCorePath)) {
throw new Error('@docusaurus/core is not installed in node_modules');
}

module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
env: {
development: {
presets: [
// Add any development-specific presets here
],
plugins: [
// Add any development-specific plugins here
],
},
production: {
presets: [
// Add any production-specific presets here
],
plugins: [
// Add any production-specific plugins here
],
},
},
};
9 changes: 4 additions & 5 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const config = {
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://docs.codeautopilot.com',
url: 'http://localhost:3000',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
Expand Down Expand Up @@ -39,8 +39,7 @@ const config = {
({
docs: {
routeBasePath: '/', // Serve the docs at the site's root
editUrl:
'https://github.com/codeautopilot/docs/tree/main/',
// Removed editUrl as per the task requirement
},
blog: false,
theme: {
Expand Down Expand Up @@ -72,7 +71,7 @@ const config = {
items: [
{
label: 'Discord',
href: 'https://discord.gg/r72ykfvyx7',
href: 'http://localhost:3000/discord',
},
],
},
Expand All @@ -86,4 +85,4 @@ const config = {
}),
};

module.exports = config;
module.exports = config;
20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,23 @@
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
"write-heading-ids": "docusaurus write-heading-ids",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@docusaurus/core": "2.4.3",
"@docusaurus/preset-classic": "2.4.3",
"@docusaurus/core": "^2.7.1",
"@docusaurus/preset-classic": "^2.7.1",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.3"
"@docusaurus/module-type-aliases": "^2.7.1",
"eslint": "^8.50.0",
"jest": "^29.7.0"
},
"browserslist": {
"production": [
Expand All @@ -38,6 +42,6 @@
]
},
"engines": {
"node": ">=16.14"
"node": ">=18.0.0"
}
}
}
18 changes: 14 additions & 4 deletions src/components/HomepageFeatures/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import styles from './styles.module.css';
const FeatureList = [
{
title: 'Easy to Use',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
Svg: require('../../static/img/undraw_docusaurus_mountain.svg').default,
description: (
<>
Docusaurus was designed from the ground up to be easily installed and
Expand All @@ -15,7 +15,7 @@ const FeatureList = [
},
{
title: 'Focus on What Matters',
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
Svg: require('../../static/img/undraw_docusaurus_tree.svg').default,
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
Expand All @@ -25,14 +25,24 @@ const FeatureList = [
},
{
title: 'Powered by React',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
Svg: require('../../static/img/undraw_docusaurus_react.svg').default,
description: (
<>
Extend or customize your website layout by reusing React. Docusaurus can
be extended while reusing the same header and footer.
</>
),
},
{
title: 'Customizable',
Svg: require('../../static/img/undraw_docusaurus_customizable.svg').default,
description: (
<>
Docusaurus is highly customizable, allowing you to tailor the look and
feel of your site to match your brand.
</>
),
},
];

function Feature({Svg, title, description}) {
Expand Down Expand Up @@ -61,4 +71,4 @@ export default function HomepageFeatures() {
</div>
</section>
);
}
}
Loading