Skip to content

Commit

Permalink
feat(docs): migrate to vuepress 2
Browse files Browse the repository at this point in the history
  • Loading branch information
negezor committed May 31, 2022
1 parent b00c6bb commit 770b6ed
Show file tree
Hide file tree
Showing 9 changed files with 824 additions and 7,082 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ app.js
app.mjs

docs/.vuepress/dist
docs/.vuepress/.temp
docs/.vuepress/.cache
73 changes: 27 additions & 46 deletions docs/.vuepress/config.js → docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
module.exports = {
/**
* Ref:https://v1.vuepress.vuejs.org/config/#title
*/
import { defineUserConfig } from 'vuepress'

import { defaultTheme } from '@vuepress/theme-default';

import { backToTopPlugin } from '@vuepress/plugin-back-to-top';
import { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom';

export default defineUserConfig({
title: 'VK-IO',

/**
* Ref:https://v1.vuepress.vuejs.org/config/#description
*/
description: 'Modern VK API SDK for Node.js',

base: '/vk-io/',

/**
* Extra tags to be injected to the page HTML `<head>`
*
* ref:https://v1.vuepress.vuejs.org/config/#head
*/
head: [
['meta', {
name: 'theme-color',
Expand All @@ -28,35 +24,23 @@ module.exports = {
['meta', {
name: 'apple-mobile-web-app-status-bar-style',
content: 'black'
}],
// ['link', {
// rel: 'stylesheet',
// href: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/fontawesome.min.css',
// integrity: 'sha512-8jdwayz5n8F2cnW26l9vpV6+yGOcRAqz6HTu+DQ3FtVIAts2gTdlFZOGpYhvBMXkWEgxPN3Y22UWyZXuDowNLA==',
// crossorigin: 'anonymous'
// }]
}]
],

/**
* Theme configuration, here is the default theme configuration for VuePress.
*
* ref:https://v1.vuepress.vuejs.org/theme/default-theme-config.html
*/
themeConfig: {
theme: defaultTheme({
logo: '/logo.svg',
repo: 'negezor/vk-io',
editLinks: false,
docsDir: '',
editLinkText: '',
lastUpdated: true,
nav: [
contributors: false,
navbar: [
{
text: 'Guide [RU]',
link: '/ru/guide/introduction',
},
{
text: 'Community',
items: [
children: [
{
text: 'Telegram [RU]',
link: 'https://t.me/vkio_ru',
Expand All @@ -75,8 +59,8 @@ module.exports = {
sidebar: {
'/ru/guide/': [
{
title: 'Основы',
collapsable: false,
text: 'Основы',
collapsible: false,
children: [
'/ru/guide/introduction',
'/ru/guide/installation',
Expand All @@ -92,8 +76,8 @@ module.exports = {
]
},
{
title: 'Миграции',
collapsable: false,
text: 'Миграции',
collapsible: false,
children: [
'/ru/guide/migration-to-v4'
]
Expand All @@ -102,15 +86,16 @@ module.exports = {
},
locales: {
'/': {
label: 'English',
selectLanguageName: 'English',
editLinkText: 'Edit',
},
'/ru/': {
label: 'Русский'
selectLanguageName: 'Русский',
editLinkText: 'Редактировать',
lastUpdatedText: 'Последнее обновление'
}
}
},

cache: false,
}),

locales: {
'/': {
Expand All @@ -120,17 +105,13 @@ module.exports = {
},
'/ru/': {
lang: 'ru-RU',
label: 'Русский',
title: 'VK-IO',
description: 'Modern VK API SDK for Node.js'
description: 'Современный VK API SDK для Node.js'
}
},

/**
* Apply plugins,ref:https://v1.vuepress.vuejs.org/zh/plugin/
*/
plugins: [
'@vuepress/plugin-back-to-top',
'@vuepress/plugin-medium-zoom',
backToTopPlugin(),
mediumZoomPlugin()
]
}
});
14 changes: 0 additions & 14 deletions docs/.vuepress/enhanceApp.js

This file was deleted.

8 changes: 0 additions & 8 deletions docs/.vuepress/styles/index.styl

This file was deleted.

2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ features:
details: All basic things are available in convenience abstractions
- title: Typings
details: Trust your code more with typing
footer: Released under the MIT License. Copyright © 2016-2020 Negezor
footer: Released under the MIT License. Copyright © 2016-2022 Negezor
---
2 changes: 1 addition & 1 deletion docs/ru/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ features:
details: Все базовые вещи доступны в удобных абстракциях
- title: Типизация
details: Больше доверяйте своему коду благодаря типизации
footer: Released under the MIT License. Copyright © 2016-2020 Negezor
footer: Released under the MIT License. Copyright © 2016-2022 Negezor
---
15 changes: 11 additions & 4 deletions docs/ru/guide/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
VK-IO - это мощный [Node.js](https://nodejs.org) модуль, который позволяет вам легко взаимодействовать с API ВКонтакте, благодаря упрощённому интерфейсу и своей гибкости, предоставляя уровень абстракции над стандартным API.

### Возможности
- Почти 100% покрытие API
- 100% базируется на Promise
- Быстрая и эффективная
- Многофункциональная
1. **Завершённая.** `100%` покрытие VK API
2. **Простая.** Предсказуемая абстракция VK API. Сопоставление API 1 к 1
```ts
vk.api.users.get({ ... });
```
3. **Надёжная.** Библиотека написана с использованием **TypeScript** и покрыта тестами.
4. **Мощная.** Поддерживает следующие дополнительные функции:
- Поддержка **прокси** через свои [Agent](https://nodejs.org/api/https.html#new-agentoptions);
- Автоматическое **распараллеливание запросов** для обработки большого количества запросов к API;
- Пользовательская [авторизация](./packages/authorization/README.md) (даже с логином и паролем);
- [Экосистема для разработки ботов](#useful-modules-that-may-be-useful-to-you).

### Предыстория
В начале мне нужна была простая и удобная библиотека для работы с API, но каждый раз когда я пробовал новую библиотеку, она зачастую оказывалась неудобной или попросту не обновлялась уже пару лет. Так и появилась на свет `vk-io` которая учитывала все эти неудобства и исправила их в корне.
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"@types/node": "^17.0.36",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"@vuepress/plugin-back-to-top": "^1.9.7",
"@vuepress/plugin-medium-zoom": "^1.9.7",
"@vuepress/plugin-back-to-top": "^2.0.0-beta.46",
"@vuepress/plugin-medium-zoom": "^2.0.0-beta.46",
"eslint": "8.16.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.26.0",
Expand All @@ -24,7 +24,7 @@
"ts-jest": "^28.0.3",
"typedoc": "^0.22.16",
"typescript": "^4.7.2",
"vuepress": "^1.9.7"
"vuepress": "^2.0.0-beta.46"
},
"scripts": {
"prepare": "yarn run rollup:build && yarn run test",
Expand Down
Loading

0 comments on commit 770b6ed

Please sign in to comment.