Skip to content

Commit 3f19ec8

Browse files
committed
feat: add documentation sync task to Rakefile and update README
1 parent 1ff64d9 commit 3f19ec8

File tree

3 files changed

+46
-52
lines changed

3 files changed

+46
-52
lines changed

README.md

Lines changed: 8 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
1-
git submodule init
2-
git submodule update
3-
4-
### Build Errors
5-
6-
If you encounter build errors:
1+
## 🚀 Quick Start
72

83
```bash
9-
npm run clear # Clear Docusaurus cache
10-
npm install # Reinstall dependencies
11-
npm run build # Try building again
4+
git submodule init
5+
git submodule update --recursive --remote
126
```
137

14-
15-
## 🚀 Quick Start
16-
178
### Prerequisites
189

1910
- Node.js 20 or higher
@@ -39,46 +30,12 @@ This command starts a local development server and opens up a browser window. Mo
3930
npm run build
4031
```
4132

33+
### Build Errors
4234

43-
44-
# Website
45-
46-
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
47-
48-
## Installation
49-
50-
```bash
51-
yarn
52-
```
53-
54-
## Local Development
55-
56-
```bash
57-
yarn start
58-
```
59-
60-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
61-
62-
## Build
63-
64-
```bash
65-
yarn build
66-
```
67-
68-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
69-
70-
## Deployment
71-
72-
Using SSH:
73-
74-
```bash
75-
USE_SSH=true yarn deploy
76-
```
77-
78-
Not using SSH:
35+
If you encounter build errors:
7936

8037
```bash
81-
GIT_USER=<Your GitHub username> yarn deploy
38+
npm run clear # Clear Docusaurus cache
39+
npm install # Reinstall dependencies
40+
npm run build # Try building again
8241
```
83-
84-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

Rakefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
require "fileutils"
2+
3+
desc "Copy documentation files from projects to docs"
4+
task :sync_docs do
5+
projects = {
6+
"ferrum" => { source: "projects/ferrum/docs", dest: "docs/ferrum" },
7+
"cuprite" => { source: "projects/cuprite/docs", dest: "docs/cuprite" },
8+
"vessel" => { source: "projects/vessel/docs", dest: "docs/vessel" }
9+
}
10+
11+
projects.each do |name, paths|
12+
source_dir, dest_dir = paths.values_at(:source, :dest)
13+
14+
unless Dir.exist?(source_dir)
15+
puts "⚠️ Skipping #{name}: #{source_dir} does not exist"
16+
next
17+
end
18+
19+
puts "📄 Syncing #{name} docs..."
20+
21+
# Ensure destination directory exists
22+
FileUtils.mkdir_p(dest_dir)
23+
24+
# Copy all Markdown files
25+
Dir.glob(File.join(source_dir, '*.md')).each do |file|
26+
filename = File.basename(file)
27+
dest_file = File.join(dest_dir, filename)
28+
29+
FileUtils.cp(file, dest_file)
30+
puts " ✓ Copied #{filename}"
31+
end
32+
end
33+
34+
puts "✅ Documentation sync complete!"
35+
end
36+
37+
task default: :sync_docs

0 commit comments

Comments
 (0)