Skip to content

Commit 34c5e05

Browse files
committed
πŸŽ‰ init
0 parents  commit 34c5e05

230 files changed

Lines changed: 54439 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '.github/workflows/deploy-docs.yml'
9+
- 'docs/**'
10+
- 'blog/**'
11+
- 'src/**'
12+
- 'static/**'
13+
- 'i18n/**'
14+
- 'versioned_docs/**'
15+
- 'versioned_sidebars/**'
16+
- 'versions.json'
17+
- 'sidebars.ts'
18+
- 'docusaurus.config.ts'
19+
- 'docusaurus.config.navigation.js'
20+
- 'package.json'
21+
- 'package-lock.json'
22+
workflow_dispatch:
23+
24+
permissions:
25+
contents: read
26+
pages: write
27+
id-token: write
28+
29+
concurrency:
30+
group: "pages"
31+
cancel-in-progress: false
32+
33+
jobs:
34+
build:
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v4
40+
41+
- name: Setup Node.js
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: '20'
45+
cache: 'npm'
46+
cache-dependency-path: package-lock.json
47+
48+
- name: Setup Pages
49+
uses: actions/configure-pages@v5
50+
51+
- name: Install dependencies
52+
run: npm ci
53+
54+
- name: Build website
55+
run: npm run build
56+
57+
- name: Upload artifact
58+
uses: actions/upload-pages-artifact@v3
59+
with:
60+
path: build
61+
62+
deploy:
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deployment.outputs.page_url }}
66+
runs-on: ubuntu-latest
67+
needs: build
68+
steps:
69+
- name: Deploy to GitHub Pages
70+
id: deployment
71+
uses: actions/deploy-pages@v4

β€Ž.gitignoreβ€Ž

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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*
21+
22+
# IDE
23+
.idea
24+
.vscode
25+
*.swp
26+
*.swo
27+
*~

β€Ž.npmrcβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
engine-strict=true
2+
legacy-peer-deps=false

β€ŽREADME.mdβ€Ž

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# Structus Documentation Website
2+
3+
This directory contains the source code for the Structus documentation website, built with [Docusaurus 3](https://docusaurus.io/).
4+
5+
## πŸš€ Quick Start
6+
7+
### Prerequisites
8+
9+
- Node.js 18.0 or higher
10+
- npm 10.0 or higher
11+
12+
### Installation
13+
14+
```bash
15+
npm install
16+
```
17+
18+
### Local Development
19+
20+
```bash
21+
npm start
22+
```
23+
24+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
25+
26+
### Build
27+
28+
```bash
29+
npm run build
30+
```
31+
32+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
33+
34+
### Serve Built Site
35+
36+
```bash
37+
npm run serve
38+
```
39+
40+
This command serves the built website locally for testing.
41+
42+
## πŸ“ Project Structure
43+
44+
```
45+
.
46+
β”œβ”€β”€ blog/ # Blog posts
47+
β”‚ β”œβ”€β”€ authors.yml # Blog authors
48+
β”‚ └── *.md # Blog post files
49+
β”œβ”€β”€ docs/ # Documentation files
50+
β”‚ β”œβ”€β”€ intro.md # Introduction page
51+
β”‚ β”œβ”€β”€ getting-started/ # Getting started guides
52+
β”‚ β”œβ”€β”€ architecture/ # Architecture documentation
53+
β”‚ β”œβ”€β”€ advanced/ # Advanced topics
54+
β”‚ β”œβ”€β”€ best-practices/ # Best practices
55+
β”‚ └── reference/ # API reference
56+
β”œβ”€β”€ src/
57+
β”‚ β”œβ”€β”€ components/ # React components
58+
β”‚ β”œβ”€β”€ css/ # Custom CSS
59+
β”‚ └── pages/ # Custom pages (homepage, etc.)
60+
β”œβ”€β”€ static/
61+
β”‚ └── img/ # Static images
62+
β”œβ”€β”€ docusaurus.config.ts # Docusaurus configuration
63+
β”œβ”€β”€ sidebars.ts # Sidebar configuration
64+
β”œβ”€β”€ package.json # Dependencies
65+
└── tsconfig.json # TypeScript configuration
66+
```
67+
68+
## 🎨 Customization
69+
70+
### Theme Colors
71+
72+
Edit `src/css/custom.css` to customize the color scheme. The current theme uses a purple/indigo palette inspired by detekt.dev.
73+
74+
### Homepage
75+
76+
Edit `src/pages/index.tsx` to customize the homepage content and layout.
77+
78+
### Navigation
79+
80+
Edit `docusaurus.config.ts` to modify the navbar and footer links.
81+
82+
### Sidebar
83+
84+
Edit `sidebars.ts` to organize the documentation structure.
85+
86+
## πŸ“ Writing Documentation
87+
88+
### Creating a New Doc
89+
90+
1. Create a new `.md` file in the appropriate `docs/` subdirectory
91+
2. Add frontmatter at the top:
92+
93+
```markdown
94+
---
95+
sidebar_position: 1
96+
title: Your Title
97+
---
98+
99+
# Your Content
100+
```
101+
102+
3. The file will automatically appear in the sidebar based on the directory structure
103+
104+
### Adding a Blog Post
105+
106+
1. Create a new `.md` file in `blog/` with the format `YYYY-MM-DD-slug.md`
107+
2. Add frontmatter:
108+
109+
```markdown
110+
---
111+
slug: your-slug
112+
title: Your Title
113+
authors: [melsardes]
114+
tags: [tag1, tag2]
115+
---
116+
117+
Your content here
118+
119+
<!-- truncate -->
120+
121+
More content after the fold
122+
```
123+
124+
## 🚒 Deployment
125+
126+
### GitHub Pages
127+
128+
The site can be deployed to GitHub Pages using:
129+
130+
```bash
131+
npm run deploy
132+
```
133+
134+
Make sure to configure the `organizationName`, `projectName`, and `url` in `docusaurus.config.ts`.
135+
136+
### Other Platforms
137+
138+
The built site in the `build/` directory can be deployed to:
139+
- Netlify
140+
- Vercel
141+
- AWS S3
142+
- Any static hosting service
143+
144+
## πŸ“š Resources
145+
146+
- [Docusaurus Documentation](https://docusaurus.io/)
147+
- [Markdown Features](https://docusaurus.io/docs/markdown-features)
148+
- [Styling and Layout](https://docusaurus.io/docs/styling-layout)
149+
150+
## 🀝 Contributing
151+
152+
Contributions to the documentation are welcome! Please:
153+
154+
1. Fork the repository
155+
2. Create a feature branch
156+
3. Make your changes
157+
4. Submit a pull request
158+
159+
## πŸ‘¨β€πŸ’» Creator
160+
161+
**Structus** was created by [Mel Sardes](https://github.com/melsardes).
162+
163+
## πŸ“„ License
164+
165+
This documentation is part of the Structus project and is licensed under the MIT License.

0 commit comments

Comments
Β (0)