Compare commits
211 Commits
fix/roadma
...
devops-con
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cf645237c | ||
|
|
23407cc208 | ||
|
|
d4bd2d9577 | ||
|
|
404859737d | ||
|
|
5e8929c36b | ||
|
|
33cb7b9de5 | ||
|
|
cec01c3df5 | ||
|
|
126d28f7f2 | ||
|
|
ab432f7be8 | ||
|
|
65a0a8c5bf | ||
|
|
781721cd54 | ||
|
|
f371aa602f | ||
|
|
1ef8a2746f | ||
|
|
0385a97062 | ||
|
|
a40e9bc0d3 | ||
|
|
a3cd0fa52e | ||
|
|
837f8457cd | ||
|
|
b67ca1dab6 | ||
|
|
35e74516c1 | ||
|
|
6108963b9c | ||
|
|
bcf59df1db | ||
|
|
841bc996a6 | ||
|
|
04947d5b44 | ||
|
|
6000ef92b1 | ||
|
|
11ad1a8086 | ||
|
|
2a840c4f7e | ||
|
|
48d33e87cf | ||
|
|
70dac4377e | ||
|
|
d405582f50 | ||
|
|
7112987e54 | ||
|
|
b6aa554e1d | ||
|
|
b3a8da98f2 | ||
|
|
9e952fe22b | ||
|
|
85ec75eff4 | ||
|
|
47123f575b | ||
|
|
bd2719749d | ||
|
|
bc4e29521b | ||
|
|
4037e3bb31 | ||
|
|
267d2b54f2 | ||
|
|
d5e75fb39f | ||
|
|
26f46eb8ce | ||
|
|
1ec4c94680 | ||
|
|
53be600df4 | ||
|
|
870a8c409c | ||
|
|
cf078e515f | ||
|
|
b32cb60f8e | ||
|
|
8d81cc6789 | ||
|
|
cdf2ce6b11 | ||
|
|
b739deba99 | ||
|
|
763dfe4cbd | ||
|
|
798ae0a994 | ||
|
|
e426b8bda8 | ||
|
|
f289a74af8 | ||
|
|
b298dbacb0 | ||
|
|
32d25b32d1 | ||
|
|
e0fc5c2464 | ||
|
|
c177a42afe | ||
|
|
f5bbc55eb7 | ||
|
|
eff2e26fe4 | ||
|
|
baceeb37cf | ||
|
|
c9d602f044 | ||
|
|
642653f281 | ||
|
|
eb511f7edd | ||
|
|
e17bc250ec | ||
|
|
21f2c9384d | ||
|
|
8adf1866e7 | ||
|
|
ea27fb9bdd | ||
|
|
049079690a | ||
|
|
124362af1f | ||
|
|
5fb84ea00d | ||
|
|
b4b581b1f4 | ||
|
|
20506756d6 | ||
|
|
aba52447e2 | ||
|
|
822467ab16 | ||
|
|
bfb348141c | ||
|
|
0bcda11f85 | ||
|
|
290de3c419 | ||
|
|
76a9a62afb | ||
|
|
588a2d0061 | ||
|
|
79a51a5562 | ||
|
|
02e2aba320 | ||
|
|
911f34cba4 | ||
|
|
fe1a869a66 | ||
|
|
76dd708f1f | ||
|
|
bc71395f64 | ||
|
|
9accbd7067 | ||
|
|
2b05f72a80 | ||
|
|
ef48708a94 | ||
|
|
9a39de1fad | ||
|
|
229c552255 | ||
|
|
de0181681c | ||
|
|
91c34ec5ea | ||
|
|
b46f01d590 | ||
|
|
882b01a165 | ||
|
|
7e4cce86a6 | ||
|
|
d300e97a04 | ||
|
|
51b960420b | ||
|
|
06aa93a46d | ||
|
|
c45c872de6 | ||
|
|
2142409fb4 | ||
|
|
7c9cd39002 | ||
|
|
5b16390245 | ||
|
|
73a3b00b0f | ||
|
|
8e7abe933a | ||
|
|
aabaaec699 | ||
|
|
d02248e0b4 | ||
|
|
a54e2add53 | ||
|
|
fec7be3d6d | ||
|
|
1e880bbba9 | ||
|
|
19b480402c | ||
|
|
50c4d41fde | ||
|
|
9927fd1b3e | ||
|
|
5b66040031 | ||
|
|
ab7488092a | ||
|
|
14425bb18a | ||
|
|
90ccd44e22 | ||
|
|
eba754f40a | ||
|
|
5fc6ac79f7 | ||
|
|
462ff16ddb | ||
|
|
6878af33c1 | ||
|
|
44a415bb9f | ||
|
|
2d454348cc | ||
|
|
14bd6bb529 | ||
|
|
f7ad6a167a | ||
|
|
db287215a8 | ||
|
|
e1e7b416c3 | ||
|
|
9d37525350 | ||
|
|
a08d4beac0 | ||
|
|
4840828024 | ||
|
|
c4079e0099 | ||
|
|
ed412ab0c2 | ||
|
|
e6d10ef592 | ||
|
|
08e8b83262 | ||
|
|
9d0052b569 | ||
|
|
ca1932a45e | ||
|
|
816d0edf3e | ||
|
|
5fafd3b544 | ||
|
|
3c81846e6c | ||
|
|
a290cafa35 | ||
|
|
c892e7178c | ||
|
|
fdac509ec8 | ||
|
|
8d82df7545 | ||
|
|
0eca17ea45 | ||
|
|
503dc7d6ea | ||
|
|
0d3e261bc3 | ||
|
|
c573675446 | ||
|
|
0aacba53b2 | ||
|
|
7b11f31dfa | ||
|
|
7b411e7c34 | ||
|
|
ae74f50d4a | ||
|
|
6a0d8cdae2 | ||
|
|
a8f2c38a2f | ||
|
|
e712bbdaba | ||
|
|
f3b5d845ed | ||
|
|
fc2512e4f9 | ||
|
|
f798ab4876 | ||
|
|
c14aa17721 | ||
|
|
30c9507945 | ||
|
|
daea67602a | ||
|
|
3da9bd51a2 | ||
|
|
6c6dccf766 | ||
|
|
3db62c9e4d | ||
|
|
10eb82805b | ||
|
|
76a9d24845 | ||
|
|
91eff12b8f | ||
|
|
4038681fb5 | ||
|
|
d0c5e3ba68 | ||
|
|
bd111db80f | ||
|
|
774d1ee3b1 | ||
|
|
fecbde4786 | ||
|
|
79f5f423ab | ||
|
|
2379ab3640 | ||
|
|
58d1a790f2 | ||
|
|
89932bc18d | ||
|
|
469f4ca530 | ||
|
|
7882a91a3d | ||
|
|
0c72a6c36e | ||
|
|
e4183c2f21 | ||
|
|
bcb75c4a9b | ||
|
|
30761f17f4 | ||
|
|
4b0e48d9e8 | ||
|
|
0a721514fd | ||
|
|
61ae2ce5f3 | ||
|
|
302c4381b2 | ||
|
|
a47e057e48 | ||
|
|
75ce6942d8 | ||
|
|
8e020a90b7 | ||
|
|
3feaabcf0d | ||
|
|
2d98d34f41 | ||
|
|
3048800364 | ||
|
|
77764abdd5 | ||
|
|
12294196d9 | ||
|
|
cedffd7fb0 | ||
|
|
c8b47634ea | ||
|
|
9de76da66f | ||
|
|
2c5ae2d774 | ||
|
|
853a26b6f4 | ||
|
|
5379aec4b2 | ||
|
|
f417fd4fdc | ||
|
|
7f0d8bac58 | ||
|
|
0f99964bd6 | ||
|
|
7d91696c85 | ||
|
|
4303e09f92 | ||
|
|
0bc124bcd9 | ||
|
|
0e66361a0d | ||
|
|
02e7373bcd | ||
|
|
b1223a90e5 | ||
|
|
8c4ae121fe | ||
|
|
e4b475cd78 | ||
|
|
fda439f0e9 | ||
|
|
c8ba7578d2 |
@@ -3,6 +3,6 @@
|
||||
"enabled": false
|
||||
},
|
||||
"_variables": {
|
||||
"lastUpdateCheck": 1748277554631
|
||||
"lastUpdateCheck": 1753810743067
|
||||
}
|
||||
}
|
||||
1
.astro/types.d.ts
vendored
@@ -1 +1,2 @@
|
||||
/// <reference types="astro/client" />
|
||||
/// <reference path="content.d.ts" />
|
||||
155
.cursor/rules/content-migration.mdc
Normal file
@@ -0,0 +1,155 @@
|
||||
---
|
||||
description: When user requests migrating old roadmap content to new folder from content-old to content folder
|
||||
globs:
|
||||
alwaysApply: false
|
||||
---
|
||||
# Content Migration Rule
|
||||
|
||||
## Rule Name: content-migration
|
||||
|
||||
## Description
|
||||
This rule provides a complete process for migrating roadmap content from old structure to new structure using migration mapping files.
|
||||
|
||||
## When to Use
|
||||
Use this rule when you need to:
|
||||
- Migrate content from content-old directories to content directories
|
||||
- Use a migration-mapping.json file to map topic paths to content IDs
|
||||
- Populate empty content files with existing content from legacy structure
|
||||
|
||||
## Process
|
||||
|
||||
### 1. Prerequisites Check
|
||||
- Verify the roadmap directory has a `migration-mapping.json` file
|
||||
- Confirm `content-old/` directory exists with source content
|
||||
- Confirm `content/` directory exists with target files
|
||||
|
||||
### 2. Migration Script Creation
|
||||
Create a Node.js script with the following functionality:
|
||||
|
||||
```javascript
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// Load the migration mapping
|
||||
const migrationMapping = JSON.parse(fs.readFileSync('migration-mapping.json', 'utf8'));
|
||||
|
||||
// Function to find old content file based on topic path
|
||||
function findOldContentFile(topicPath) {
|
||||
const parts = topicPath.split(':');
|
||||
|
||||
if (parts.length === 1) {
|
||||
// Top level file like "introduction"
|
||||
return path.join('content-old', parts[0], 'index.md');
|
||||
} else if (parts.length === 2) {
|
||||
// Like "introduction:what-is-rust"
|
||||
const [folder, filename] = parts;
|
||||
return path.join('content-old', folder, `${filename}.md`);
|
||||
} else if (parts.length === 3) {
|
||||
// Like "language-basics:syntax:variables"
|
||||
const [folder, subfolder, filename] = parts;
|
||||
return path.join('content-old', folder, subfolder, `${filename}.md`);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// Function to find new content file based on content ID
|
||||
function findNewContentFile(contentId) {
|
||||
const contentDir = 'content';
|
||||
const files = fs.readdirSync(contentDir);
|
||||
|
||||
// Find file that ends with the content ID
|
||||
const matchingFile = files.find(file => file.includes(`@${contentId}.md`));
|
||||
|
||||
if (matchingFile) {
|
||||
return path.join(contentDir, matchingFile);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// Process each mapping
|
||||
console.log('Starting content migration...\n');
|
||||
|
||||
let migratedCount = 0;
|
||||
let skippedCount = 0;
|
||||
|
||||
for (const [topicPath, contentId] of Object.entries(migrationMapping)) {
|
||||
const oldFilePath = findOldContentFile(topicPath);
|
||||
const newFilePath = findNewContentFile(contentId);
|
||||
|
||||
if (!oldFilePath) {
|
||||
console.log(`❌ Could not determine old file path for: ${topicPath}`);
|
||||
skippedCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!newFilePath) {
|
||||
console.log(`❌ Could not find new file for content ID: ${contentId} (topic: ${topicPath})`);
|
||||
skippedCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!fs.existsSync(oldFilePath)) {
|
||||
console.log(`❌ Old file does not exist: ${oldFilePath} (topic: ${topicPath})`);
|
||||
skippedCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
// Read old content
|
||||
const oldContent = fs.readFileSync(oldFilePath, 'utf8');
|
||||
|
||||
// Write to new file
|
||||
fs.writeFileSync(newFilePath, oldContent);
|
||||
|
||||
console.log(`✅ Migrated: ${topicPath} -> ${path.basename(newFilePath)}`);
|
||||
migratedCount++;
|
||||
} catch (error) {
|
||||
console.log(`❌ Error migrating ${topicPath}: ${error.message}`);
|
||||
skippedCount++;
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`\n📊 Migration complete:`);
|
||||
console.log(` Migrated: ${migratedCount} files`);
|
||||
console.log(` Skipped: ${skippedCount} files`);
|
||||
console.log(` Total: ${Object.keys(migrationMapping).length} mappings`);
|
||||
```
|
||||
|
||||
### 3. Execution Steps
|
||||
1. Navigate to the roadmap directory (e.g., `src/data/roadmaps/[roadmap-name]`)
|
||||
2. Create the migration script as `migrate_content.cjs`
|
||||
3. Run: `node migrate_content.cjs`
|
||||
4. Review the migration results
|
||||
5. Clean up the temporary script file
|
||||
|
||||
### 4. Validation
|
||||
After migration:
|
||||
- Verify a few migrated files have proper content (not just titles)
|
||||
- Check that the content structure matches the old content
|
||||
- Ensure proper markdown formatting is preserved
|
||||
|
||||
## File Structure Expected
|
||||
```
|
||||
roadmap-directory/
|
||||
├── migration-mapping.json
|
||||
├── content/
|
||||
│ ├── file1@contentId1.md
|
||||
│ ├── file2@contentId2.md
|
||||
│ └── ...
|
||||
└── content-old/
|
||||
├── section1/
|
||||
│ ├── index.md
|
||||
│ ├── topic1.md
|
||||
│ └── subsection1/
|
||||
│ └── subtopic1.md
|
||||
└── section2/
|
||||
└── ...
|
||||
```
|
||||
|
||||
## Notes
|
||||
- The migration mapping uses colons (`:`) to separate nested paths
|
||||
- Content files in the new structure use the pattern `filename@contentId.md`
|
||||
- The script handles 1-3 levels of nesting in the old structure
|
||||
- Always create the script with `.cjs` extension to avoid ES module issues
|
||||
10
.vscode/settings.json
vendored
@@ -2,5 +2,13 @@
|
||||
"prettier.documentSelectors": ["**/*.astro"],
|
||||
"[astro]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
},
|
||||
"tailwindCSS.experimental.classRegex": [
|
||||
["\\b\\w+[cC]lassName\\s*=\\s*[\"']([^\"']*)[\"']"],
|
||||
["\\b\\w+[cC]lassName\\s*=\\s*`([^`]*)`"],
|
||||
["[\\w]+[cC]lassName[\"']?\\s*:\\s*[\"']([^\"']*)[\"']"],
|
||||
["[\\w]+[cC]lassName[\"']?\\s*:\\s*`([^`]*)`"],
|
||||
["cva\\(((?:[^()]|\\([^()]*\\))*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
|
||||
["cx\\(((?:[^()]|\\([^()]*\\))*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"roadmap-links": "node scripts/roadmap-links.cjs",
|
||||
"roadmap-dirs": "node scripts/roadmap-dirs.cjs",
|
||||
"roadmap-assets": "tsx scripts/editor-roadmap-assets.ts",
|
||||
"refresh-assets": "tsx scripts/refresh-assets.ts",
|
||||
"editor-roadmap-dirs": "tsx scripts/editor-roadmap-dirs.ts",
|
||||
"editor-roadmap-content": "tsx scripts/editor-roadmap-content.ts",
|
||||
"roadmap-content": "node scripts/roadmap-content.cjs",
|
||||
@@ -39,6 +40,7 @@
|
||||
"@nanostores/react": "^1.0.0",
|
||||
"@napi-rs/image": "^1.9.2",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
||||
"@radix-ui/react-popover": "^1.1.14",
|
||||
"@resvg/resvg-js": "^2.6.2",
|
||||
"@roadmapsh/editor": "workspace:*",
|
||||
"@tailwindcss/vite": "^4.1.7",
|
||||
@@ -72,6 +74,7 @@
|
||||
"npm-check-updates": "^18.0.1",
|
||||
"playwright": "^1.52.0",
|
||||
"prismjs": "^1.30.0",
|
||||
"radix-ui": "^1.4.2",
|
||||
"react": "^19.1.0",
|
||||
"react-calendar-heatmap": "^1.10.0",
|
||||
"react-confetti": "^6.4.0",
|
||||
@@ -119,6 +122,7 @@
|
||||
"prettier": "^3.5.3",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||
"tailwind-scrollbar": "^4.0.2",
|
||||
"tsx": "^4.19.4"
|
||||
}
|
||||
}
|
||||
|
||||
1040
pnpm-lock.yaml
generated
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 821 KiB After Width: | Height: | Size: 821 KiB |
|
Before Width: | Height: | Size: 386 KiB After Width: | Height: | Size: 386 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 256 KiB |
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1013 KiB After Width: | Height: | Size: 1013 KiB |
|
Before Width: | Height: | Size: 370 KiB After Width: | Height: | Size: 370 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 203 B |
|
Before Width: | Height: | Size: 1021 B After Width: | Height: | Size: 1021 B |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 405 KiB After Width: | Height: | Size: 405 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 149 KiB |
|
Before Width: | Height: | Size: 936 KiB After Width: | Height: | Size: 936 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 398 KiB After Width: | Height: | Size: 398 KiB |
|
Before Width: | Height: | Size: 286 KiB After Width: | Height: | Size: 286 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 312 KiB After Width: | Height: | Size: 312 KiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 170 KiB After Width: | Height: | Size: 170 KiB |