Skip to content

Commit 86bff56

Browse files
authored
feat!: vitepress engine (#7)
* feat!: vitepress engine * feat!: custom domain
1 parent 085bfd7 commit 86bff56

31 files changed

+575
-7
lines changed

Diff for: docs/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vitepress/cache
2+
.vitepress/dist

Diff for: docs/.vitepress/config.ts

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { defineConfig } from 'vitepress'
2+
import en from './locales/en'
3+
import ru from './locales/ru'
4+
5+
export default defineConfig({
6+
title: 'Mafl',
7+
base: '/mafl/',
8+
themeConfig: {
9+
search: {
10+
provider: 'local',
11+
},
12+
13+
logo: {
14+
src: '/logotype.svg',
15+
innerWidth: 50,
16+
height: 50,
17+
},
18+
19+
socialLinks: [
20+
{ icon: 'github', link: 'https://github.com/hywax/mafl' },
21+
],
22+
},
23+
24+
locales: {
25+
root: { label: 'English', ...en },
26+
ru: { label: 'Русский', ...ru },
27+
},
28+
})

Diff for: docs/.vitepress/locales/en.ts

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import { defineConfig } from 'vitepress'
2+
import { getVersion } from '../utils'
3+
4+
export default defineConfig({
5+
description: 'Intuitive service for organizing your homepage',
6+
lang: 'en-US',
7+
themeConfig: {
8+
nav: [
9+
{ text: 'Home', link: '/' },
10+
{ text: 'Configuration', link: '/reference/configuration' },
11+
{ text: 'Showcase', link: '/community/showcase' },
12+
{
13+
text: getVersion(),
14+
items: [
15+
{ text: 'Changelog', link: '/other/changelog' },
16+
{ text: 'Contributing', link: '/community/contributing' },
17+
],
18+
},
19+
],
20+
21+
sidebar: [
22+
{
23+
text: 'Guide',
24+
base: '/guide',
25+
items: [
26+
{ text: 'What is Mafl?', link: '/what-is' },
27+
{ text: 'Getting Started', link: '/getting-started' },
28+
{ text: 'Deployment', link: '/deployment' },
29+
],
30+
},
31+
{
32+
text: 'Reference',
33+
base: '/reference',
34+
items: [
35+
{ text: 'Configuration', link: '/configuration' },
36+
],
37+
},
38+
{
39+
text: 'Services',
40+
base: '/services',
41+
items: [
42+
{ text: 'Base', link: '/base' },
43+
],
44+
},
45+
{
46+
text: 'Community',
47+
base: '/community',
48+
collapsed: true,
49+
items: [
50+
{ text: 'Showcase', link: '/showcase' },
51+
{ text: 'Development', link: '/development' },
52+
{ text: 'Contributing', link: '/contributing' },
53+
],
54+
},
55+
{
56+
text: 'Other',
57+
base: '/other',
58+
collapsed: true,
59+
items: [
60+
{ text: 'Changelog', link: '/changelog' },
61+
{ text: 'License', link: '/license' },
62+
],
63+
},
64+
],
65+
},
66+
})

Diff for: docs/.vitepress/locales/ru.ts

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import { defineConfig } from 'vitepress'
2+
import { getVersion } from '../utils'
3+
4+
export default defineConfig({
5+
description: 'Intuitive service for organizing your homepage',
6+
lang: 'ru-RU',
7+
themeConfig: {
8+
nav: [
9+
{ text: 'Home', link: '/ru/' },
10+
{ text: 'Configuration', link: '/ru/reference/configuration' },
11+
{ text: 'Showcase', link: '/ru/community/showcase' },
12+
{
13+
text: getVersion(),
14+
items: [
15+
{ text: 'Changelog', link: '/ru/other/changelog' },
16+
{ text: 'Contributing', link: '/ru/community/contributing' },
17+
],
18+
},
19+
],
20+
21+
sidebar: [
22+
{
23+
text: 'Guide',
24+
base: '/ru/guide',
25+
items: [
26+
{ text: 'What is Mafl?', link: '/what-is' },
27+
{ text: 'Getting Started', link: '/getting-started' },
28+
{ text: 'Deployment', link: '/deployment' },
29+
],
30+
},
31+
{
32+
text: 'Reference',
33+
base: '/ru/reference',
34+
items: [
35+
{ text: 'Configuration', link: '/configuration' },
36+
],
37+
},
38+
{
39+
text: 'Services',
40+
base: '/ru/services',
41+
items: [
42+
{ text: 'Base', link: '/base' },
43+
],
44+
},
45+
{
46+
text: 'Community',
47+
base: '/ru/community',
48+
collapsed: true,
49+
items: [
50+
{ text: 'Showcase', link: '/showcase' },
51+
{ text: 'Development', link: '/development' },
52+
{ text: 'Contributing', link: '/contributing' },
53+
],
54+
},
55+
{
56+
text: 'Other',
57+
base: '/ru/other',
58+
collapsed: true,
59+
items: [
60+
{ text: 'Changelog', link: '/changelog' },
61+
{ text: 'License', link: '/license' },
62+
],
63+
},
64+
],
65+
},
66+
})

Diff for: docs/.vitepress/theme/custom.css

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
:root {
2+
--vp-c-brand-1: #91c198;
3+
--vp-c-brand-2: #7cb484;
4+
--vp-c-brand-3: #609966;
5+
--vp-c-brand-soft: #eaf4ec;
6+
}

Diff for: docs/.vitepress/theme/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
import './custom.css'
3+
4+
export default DefaultTheme

Diff for: docs/.vitepress/utils/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import currentPackage from '../../../package.json'
2+
3+
export function getVersion() {
4+
return currentPackage.version || '0.0.0'
5+
}

Diff for: docs/community/contributing.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Contributing

Diff for: docs/community/development.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Development

Diff for: docs/community/showcase.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Showcase

Diff for: docs/guide/deployment.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Deployment

Diff for: docs/guide/getting-started.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Getting Started

Diff for: docs/guide/what-is.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# What is Mafl?

Diff for: docs/index.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
layout: home
3+
4+
hero:
5+
name: "Mafl"
6+
text: "Documentation"
7+
tagline: Intuitive service for organizing your homepage
8+
actions:
9+
- theme: brand
10+
text: Getting started
11+
link: /guide/getting-started
12+
- theme: alt
13+
text: What is Mafl?
14+
link: /guide/what-is
15+
- theme: alt
16+
text: View on GitHub
17+
link: https://github.com/hywax/mafl
18+
19+
features:
20+
- title: Privacy
21+
icon: 🔐
22+
details: All requests to third-party services occur in backend.
23+
- title: Real-time
24+
icon:
25+
details: Interactive cards with extra information.
26+
- title: Multi-language
27+
icon: 🌎
28+
details: Supports multiple languages.
29+
- title: Themes
30+
icon: 🎨
31+
details: Customize the look to your liking.
32+
- title: Grouping
33+
icon: 🗂
34+
details: Create custom service groups.
35+
- title: Easy setup
36+
icon: 👌
37+
details: A few lines of yaml and your homepage is ready to go.
38+
- title: Fast
39+
icon: 🚀
40+
details: Everything is fast and free of hang-ups.
41+
- title: Docker
42+
icon: 🐳
43+
details: Optimized docker images for popular platforms.
44+
- title: Free
45+
icon:
46+
details: Mafl is completely free and open source.
47+
- title: PWA
48+
icon: 📲
49+
details: Installable application.
50+
---

Diff for: docs/other/changelog.md

Whitespace-only changes.

Diff for: docs/other/license.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# License

Diff for: docs/reference/configuration.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Configuration

Diff for: docs/ru/community/contributing.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Contributing

Diff for: docs/ru/community/development.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Development

Diff for: docs/ru/community/showcase.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Showcase

Diff for: docs/ru/guide/deployment.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Deployment

Diff for: docs/ru/guide/getting-started.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Getting Started

Diff for: docs/ru/guide/what-is.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# What is Mafl?

Diff for: docs/ru/index.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
layout: home
3+
4+
hero:
5+
name: "Mafl"
6+
text: "Documentation"
7+
tagline: Intuitive service for organizing your homepage
8+
actions:
9+
- theme: brand
10+
text: Getting started
11+
link: /ru/guide/getting-started
12+
- theme: alt
13+
text: What is Mafl?
14+
link: /ru/guide/what-is
15+
- theme: alt
16+
text: View on GitHub
17+
link: https://github.com/hywax/mafl
18+
19+
features:
20+
- title: Privacy
21+
icon: 🔐
22+
details: All requests to third-party services occur in backend.
23+
- title: Real-time
24+
icon:
25+
details: Interactive cards with extra information.
26+
- title: Multi-language
27+
icon: 🌎
28+
details: Supports multiple languages.
29+
- title: Themes
30+
icon: 🎨
31+
details: Customize the look to your liking.
32+
- title: Grouping
33+
icon: 🗂
34+
details: Create custom service groups.
35+
- title: Easy setup
36+
icon: 👌
37+
details: A few lines of yaml and your homepage is ready to go.
38+
- title: Fast
39+
icon: 🚀
40+
details: Everything is fast and free of hang-ups.
41+
- title: Docker
42+
icon: 🐳
43+
details: Optimized docker images for popular platforms.
44+
- title: Free
45+
icon:
46+
details: Mafl is completely free and open source.
47+
- title: PWA
48+
icon: 📲
49+
details: Installable application.
50+
---

Diff for: docs/ru/other/changelog.md

Whitespace-only changes.

Diff for: docs/ru/other/license.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# License

Diff for: docs/ru/reference/configuration.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Configuration

Diff for: docs/ru/services/base.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Base

Diff for: docs/services/base.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Base

Diff for: package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
"postinstall": "nuxi prepare",
1313
"lint": "eslint . --fix",
1414
"typecheck": "nuxi typecheck",
15-
"prepare": "husky install"
15+
"prepare": "husky install",
16+
"docs:dev": "vitepress dev docs",
17+
"docs:build": "vitepress build docs",
18+
"docs:preview": "vitepress preview docs"
1619
},
1720
"dependencies": {
1821
"@vueuse/nuxt": "^10.7.0",
@@ -37,6 +40,7 @@
3740
"nuxt": "^3.9.0",
3841
"nuxt-icon": "^0.6.8",
3942
"typescript": "^5.3.3",
43+
"vitepress": "^1.0.0-rc.34",
4044
"vue-tsc": "^1.8.27"
4145
},
4246
"resolutions": {
@@ -45,4 +49,4 @@
4549
"lint-staged": {
4650
"*.ts": "yarn run lint"
4751
}
48-
}
52+
}

0 commit comments

Comments
 (0)