| 331 | * Sync wiki pages from the CodeceptJS.wiki repo into website docs. |
| 332 | */ |
| 333 | export async function wiki() { |
| 334 | task.stopOnFailures() |
| 335 | if (!fs.existsSync('docs/wiki/Home.md')) { |
| 336 | await shell`git clone git@github.com:codeceptjs/CodeceptJS.wiki.git docs/wiki` |
| 337 | } |
| 338 | await shell`git pull origin master`.cwd('docs/wiki') |
| 339 | |
| 340 | await writeToFile('docs/community-helpers.md', line => { |
| 341 | line`---` |
| 342 | line`permalink: /community-helpers` |
| 343 | line`title: Community Helpers` |
| 344 | line`editLink: false` |
| 345 | line`---` |
| 346 | line`` |
| 347 | line`# Community Helpers` |
| 348 | line`> Share your helpers at our [Wiki Page](https://github.com/codeceptjs/CodeceptJS/wiki/Community-Helpers)` |
| 349 | line`` |
| 350 | line.fromFile('docs/wiki/Community-Helpers-&-Plugins.md') |
| 351 | }) |
| 352 | |
| 353 | await writeToFile('docs/examples.md', line => { |
| 354 | line`---` |
| 355 | line`permalink: /examples` |
| 356 | line`layout: Section` |
| 357 | line`sidebar: false` |
| 358 | line`title: Examples` |
| 359 | line`editLink: false` |
| 360 | line`---` |
| 361 | line`` |
| 362 | line`# Examples` |
| 363 | line`> Add your own examples to our [Wiki Page](https://github.com/codeceptjs/CodeceptJS/wiki/Examples)` |
| 364 | line.fromFile('docs/wiki/Examples.md') |
| 365 | }) |
| 366 | |
| 367 | await writeToFile('docs/books.md', line => { |
| 368 | line`---` |
| 369 | line`permalink: /books` |
| 370 | line`layout: Section` |
| 371 | line`sidebar: false` |
| 372 | line`title: Books & Posts` |
| 373 | line`editLink: false` |
| 374 | line`---` |
| 375 | line`` |
| 376 | line`# Books & Posts` |
| 377 | line`> Add your own books or posts to our [Wiki Page](https://github.com/codeceptjs/CodeceptJS/wiki/Books-&-Posts)` |
| 378 | line.fromFile('docs/wiki/Books-&-Posts.md') |
| 379 | }) |
| 380 | |
| 381 | await writeToFile('docs/videos.md', line => { |
| 382 | line`---` |
| 383 | line`permalink: /videos` |
| 384 | line`layout: Section` |
| 385 | line`sidebar: false` |
| 386 | line`title: Videos` |
| 387 | line`editLink: false` |
| 388 | line`---` |
| 389 | line`` |
| 390 | line`> Add your own videos to our [Wiki Page](https://github.com/codeceptjs/CodeceptJS/wiki/Videos)` |