Skip to content

Commit d6f5283

Browse files
committed
Update: Wiki page
1 parent 21282fe commit d6f5283

2 files changed

Lines changed: 83 additions & 2 deletions

File tree

docs/wiki-content.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,65 @@
4646
"An Elaina Theme release zip or a local build output from this repository.",
4747
"A writable Pengu Loader plugins folder."
4848
],
49+
"quickGuide": {
50+
"warning": "Do exactly the guide if you don't know what you gonna do",
51+
"steps": [
52+
{
53+
"title": "Active Pengu Loader",
54+
"images": [
55+
{
56+
"alt": "Active Pengu Loader",
57+
"src": "https://user-images.githubusercontent.com/94338907/232275600-d2917ec3-62a8-4f16-8411-6750ccf2c43b.png"
58+
}
59+
]
60+
},
61+
{
62+
"title": "Download theme [here](https://github.com/Elaina69/Elaina-theme/releases)",
63+
"images": [
64+
{
65+
"alt": "Download theme release",
66+
"src": "https://github.com/user-attachments/assets/4a642bb8-28e7-49fb-bbdb-c3d848ed2c80"
67+
}
68+
]
69+
},
70+
{
71+
"title": "Extract theme (Choose \"Extract to...\")",
72+
"images": [
73+
{
74+
"alt": "Extract theme",
75+
"src": "https://github.com/user-attachments/assets/fffaff79-0a7e-481a-8874-54845ff8fcec"
76+
}
77+
]
78+
},
79+
{
80+
"title": "Open Plugin folder",
81+
"images": [
82+
{
83+
"alt": "Open Plugin folder from Pengu Loader",
84+
"src": "https://github.com/Elaina69/Elaina-V4/assets/94338907/b357078e-f868-4c23-a5fa-2c85d25d51a2"
85+
},
86+
{
87+
"alt": "Pengu Loader plugins folder",
88+
"src": "https://github.com/Elaina69/Elaina-V4/assets/94338907/19214594-91de-4f10-a33f-d88fc0175731"
89+
}
90+
]
91+
},
92+
{
93+
"title": "Copy extracted folder to Pengu Loader `plugins` folder",
94+
"images": [
95+
{
96+
"alt": "Copy Elaina Theme folder to plugins folder",
97+
"src": "https://github.com/Elaina69/Elaina-V2/assets/94338907/08caceba-e092-4808-a2af-3a05b3b36e71"
98+
}
99+
]
100+
},
101+
{
102+
"title": "Done"
103+
}
104+
],
105+
"treeIntro": "So...It must be like this",
106+
"tree": ".\n├── plugins/ # Pengu plugins folder\n│ └── Elaina-theme/ # Ur theme here\n│ ├── assets/\n│ ├── config/\n│ ├── locales/\n│ └── index.js\n├── ...\n\n└──"
107+
},
49108
"folderLayout": [
50109
"The theme folder should be placed inside the Pengu Loader plugins directory.",
51110
"The folder must contain the built `index.js`, `assets`, `config`, `locales`, and related theme files.",

scripts/generate-wiki.mjs

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,26 @@ function renderNumberedList(items) {
112112
return items.map((item, index) => `${index + 1}. ${item}`).join('\n');
113113
}
114114

115+
function renderInstallationQuickGuide(quickGuide) {
116+
if (!quickGuide) return '';
117+
118+
const steps = quickGuide.steps.map((step, index) => {
119+
const images = (step.images || [])
120+
.map((image) => `<img alt="${image.alt || 'image'}" src="${image.src}" />`)
121+
.join('\n\n');
122+
const body = step.body ? `\n\n${step.body}` : '';
123+
const imageBlock = images ? `\n\n${images}` : '';
124+
125+
return `${index + 1}. ${step.title}${body}${imageBlock}`;
126+
}).join('\n\n');
127+
128+
const tree = quickGuide.tree
129+
? `\n\n### Expected folder structure\n\n${quickGuide.treeIntro || ''}\n\n\`\`\`text\n${quickGuide.tree}\n\`\`\``
130+
: '';
131+
132+
return `## Main Installation Guide\n\n**${quickGuide.warning}**\n\n***\n\n${steps}${tree}\n`;
133+
}
134+
115135
function renderLinkList(items) {
116136
return items.map((item) => `- [${item.title}](${item.file.replace(/\.md$/, '')})`).join('\n');
117137
}
@@ -121,8 +141,8 @@ function renderPageFooter() {
121141
'',
122142
'---',
123143
'',
124-
'> This page is generated from `docs/wiki-content.json`, `docs/settings-meta.json`, and `src/src/config/datastoreDefault.js`.',
125-
'> Edit those files to update the wiki content.',
144+
// '> This page is generated from `docs/wiki-content.json`, `docs/settings-meta.json`, and `src/src/config/datastoreDefault.js`.',
145+
// '> Edit those files to update the wiki content.',
126146
'',
127147
].join('\n');
128148
}
@@ -163,6 +183,8 @@ ${install.introduction}
163183
164184
${renderBulletList(install.requirements)}
165185
186+
${renderInstallationQuickGuide(install.quickGuide)}
187+
166188
## Folder layout
167189
168190
${renderBulletList(install.folderLayout)}

0 commit comments

Comments
 (0)