Skip to content

Commit 52c1700

Browse files
authored
Use Vitepress instead of VuePress (line#785)
VuePress is no longer maintained. And the authors says: > VuePress is now in maintenance mode. For a next-gen Vue-based SSG built on top of Vue 3 + Vite, check out [VitePress](https://vitepress.vuejs.org/). > https://github.com/vuejs/vuepress Close line#782
1 parent f6afe07 commit 52c1700

File tree

20 files changed

+6342
-47226
lines changed

20 files changed

+6342
-47226
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
run: export NODE_OPTIONS=--openssl-legacy-provider; npm run docs:build
5555
- name: Copy & Deploy
5656
run: |
57-
cp -r docs/.vuepress/dist/* doc-dist/
57+
cp -r docs/.vitepress/dist/* doc-dist/
5858
cd doc-dist
5959
git add -A
6060
git commit -m 'Deploy docs'

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
python3 generate-code.py
4343
- name: Test Project
4444
run: export NODE_OPTIONS=--max-old-space-size=6144; npm test
45+
- name: Test building apidocs
46+
run: export NODE_OPTIONS=--openssl-legacy-provider; npm run apidocs
4547
- name: Test building docs
4648
run: export NODE_OPTIONS=--openssl-legacy-provider; npm run docs:build
4749
- name: Test building examples

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Here are each top-level directory explained:
1818
* `lib`: TypeScript source code. You may modify files under this directory.
1919
* `test`: Mocha test suites. Please add tests for modification if possible.
2020
* `examples`: Example projects using this SDK
21-
* `docs`: [VuePress](https://vuepress.vuejs.org) markdowns for project documentation
21+
* `docs`: [VitePress](https://vitepress.dev/) markdowns for project documentation
2222
* `tools`: Useful tools
2323

2424
Also, you may use the following npm scripts for development:
@@ -37,4 +37,4 @@ uploading a pull request.
3737

3838
When you are sending a pull request and it's a non-trivial change beyond fixing typos, please make sure to sign
3939
[the ICLA (individual contributor license agreement)](https://cla-assistant.io/line/line-bot-sdk-nodejs). Please
40-
[contact us](mailto:[email protected]) if you need the CCLA (corporate contributor license agreement).
40+
[contact us](mailto:[email protected]) if you need the CCLA (corporate contributor license agreement).

docs/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
/.vuepress/.cache/
22
/.vuepress/.temp/
33
/apidocs/
4+
5+
/CONTRIBUTING.md
6+
/index.md
7+

docs/.vitepress/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/cache/

docs/.vitepress/config.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
const utils = require('./utils.ts');
2+
3+
utils.copyFile('README.md', 'index.md');
4+
utils.copyFile('CONTRIBUTING.md', 'CONTRIBUTING.md');
5+
6+
utils.rewriteFile('../apidocs/README.md', /\(CONTRIBUTING.md\)/g, '(../CONTRIBUTING.md)');
7+
8+
export default {
9+
title: 'line-bot-sdk-nodejs',
10+
description: 'Node.js SDK for LINE Messaging API',
11+
base: '/line-bot-sdk-nodejs/',
12+
head: [
13+
['link', { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
14+
],
15+
themeConfig: {
16+
// Navbar items
17+
nav: [
18+
{ text: 'Introduction', link: '/index.html' },
19+
{ text: 'Getting Started', link: '/getting-started.html' },
20+
{ text: 'Guide', link: '/guide.html' },
21+
{ text: 'API Reference', link: '/apidocs/modules.html' },
22+
{ text: 'Contributing', link: '/CONTRIBUTING.html' },
23+
{ text: 'LINE Developers', link: 'https://developers.line.biz/en/' },
24+
{ text: 'GitHub', link: 'https://github.com/line/line-bot-sdk-nodejs/' },
25+
],
26+
// Sidebar items
27+
sidebar: {
28+
'/': [
29+
{
30+
text: 'Introduction',
31+
items: [
32+
{text: 'Introduction', link: '/index.html'},
33+
],
34+
},
35+
{
36+
text: 'Getting Started',
37+
items: [
38+
{text: 'Requirements', link: '/getting-started/requirements.html'},
39+
{text: 'Install', link: '/getting-started/install.html'},
40+
{text: 'Basic Usage', link: '/getting-started/basic-usage.html'},
41+
],
42+
},
43+
{
44+
text: 'Guide',
45+
items: [
46+
{text: 'Webhook', link: '/guide/webhook.html'},
47+
{text: 'Client', link: '/guide/client.html'},
48+
{text: 'Basic Usage', link: '/guide/typescript.html'},
49+
],
50+
},
51+
{
52+
text: 'API Reference',
53+
items: [
54+
{text: 'API Docs', link: '/apidocs/modules.html'},
55+
],
56+
},
57+
{
58+
text: 'Contributing',
59+
items: [
60+
{text: 'Contributing', link: '/CONTRIBUTING.html'},
61+
],
62+
},
63+
],
64+
},
65+
},
66+
}

docs/.vitepress/utils.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
function copyFile(sourceFilename, targetFilename) {
5+
const sourcePath = path.join(__dirname, '../../', sourceFilename);
6+
const targetPath = path.join(__dirname, '../', targetFilename);
7+
const md = fs.readFileSync(sourcePath, 'utf-8');
8+
fs.writeFileSync(targetPath, md);
9+
}
10+
11+
function rewriteFile(filename, regex, replacement) {
12+
console.log("Rewriting file: ", filename, " with regex: ", regex, " and replacement: ", replacement)
13+
const content = fs.readFileSync(path.join(__dirname, filename), 'utf-8');
14+
const newContent = content.replace(regex, replacement);
15+
fs.writeFileSync(path.join(__dirname, filename), newContent);
16+
}
17+
18+
export {
19+
copyFile,
20+
rewriteFile,
21+
};

docs/.vuepress/config.js

Lines changed: 0 additions & 84 deletions
This file was deleted.

docs/CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)