Skip to content

Commit ec067c3

Browse files
Move docs to the main repo (hestiacp#3086)
* Add docs Add TypeScript support * Import version from package.json * Use the same Font Awesome as the web UI * Run prettier Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
1 parent 089a765 commit ec067c3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+10665
-22
lines changed

.eslintignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Minified files
2+
*.min.js
3+
4+
# Vendor/packages
15
.pnp.*
26
.yarn/*
3-
web/js/vendor/
7+
**/node_modules/
8+
**/vendor/
9+
10+
# vitepress
11+
**/.vitepress/dist/

.eslintrc.cjs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
module.exports = {
22
root: true,
3+
parser: '@typescript-eslint/parser',
34
parserOptions: {
5+
sourceType: 'module',
46
ecmaVersion: 'latest',
57
},
6-
extends: ['eslint:recommended', 'plugin:editorconfig/noconflict', 'prettier'],
7-
plugins: ['editorconfig'],
8+
extends: [
9+
'eslint:recommended',
10+
'plugin:@typescript-eslint/recommended',
11+
'plugin:editorconfig/noconflict',
12+
'prettier',
13+
],
14+
plugins: ['editorconfig', '@typescript-eslint'],
815
ignorePatterns: ['*.cjs'],
916
env: {
1017
browser: true,
@@ -16,8 +23,11 @@ module.exports = {
1623
App: 'readonly',
1724
},
1825
rules: {
19-
'no-unused-vars': 'off',
20-
'no-undef': 'off',
26+
// Set those as warnings instead. They should be fixed at some point
27+
'@typescript-eslint/no-unused-vars': 'warn',
28+
'@typescript-eslint/no-empty-function': 'warn',
29+
'@typescript-eslint/no-this-alias': 'warn',
2130
'no-redeclare': 'off',
31+
'no-undef': 'off',
2232
},
2333
};

.gitignore

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,53 @@
1+
# Packages
12
*.tar
23
*.zip
34
*.gzip
45
*.gz
56
*.bz2
67
*.deb
78

8-
.vs
9-
.nova
10-
/.idea/
9+
# Editors
10+
.vs/
11+
.nova/
12+
.idea/
1113
.vscode/*
1214
!.vscode/settings.json
1315
!.vscode/tasks.json
1416
!.vscode/launch.json
1517
!.vscode/extensions.json
1618
!.vscode/*.code-snippets
19+
20+
# macOS
1721
.DS_Store
22+
.AppleDouble
23+
.LSOverride
24+
._*
1825

1926
.env
27+
28+
# Composer
2029
composer.phar
2130
test/vendor/
22-
**/node_modules/
2331
web/src/vendor/filp
2432
web/src/vendor/psr
2533
web/src/vendor/composer/installed.json
26-
npm-debug.log
2734
.phpunit.result.cache
2835

29-
# Yarn (not zero-installs)
30-
.pnp.*
36+
# vitepress build output
37+
**/.vitepress/dist/
38+
39+
# Node
40+
**/node_modules/
41+
npm-debug.log
42+
43+
# Yarn Integrity file
44+
.yarn-integrity
45+
46+
# yarn v2+
3147
.yarn/*
3248
!.yarn/patches
3349
!.yarn/plugins
3450
!.yarn/releases
3551
!.yarn/sdks
3652
!.yarn/versions
53+
.pnp.*

.prettierignore

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
# macOS
12
.DS_Store
3+
.AppleDouble
4+
.LSOverride
5+
._*
26

37
# Minified files
48
*.min.css
@@ -16,10 +20,14 @@ web/templates/
1620
# Vendor/packages
1721
.pnp.*
1822
.yarn/*
19-
vendor/
20-
composer.phar
21-
composer.json
22-
composer.lock
23+
**/node_modules/
24+
**/vendor/
25+
**/composer.phar
26+
**/composer.json
27+
**/composer.lock
28+
29+
# vitepress build output
30+
**/.vitepress/dist/
2331

2432
# Logs
2533
logs

.stylelintignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1+
# Minified files
12
web/css/src/dependencies
23
*.min.css
4+
5+
# Vendor/packages
6+
.pnp.*
7+
.yarn/*
8+
**/node_modules/
9+
**/vendor/
10+
11+
# vitepress
12+
**/.vitepress/dist/

docs/.vitepress/config.ts

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
import { defineConfig, type DefaultTheme } from "vitepress";
2+
import { version } from "../../package.json";
3+
4+
export default defineConfig({
5+
lang: "en-US",
6+
title: "Hestia Control Panel",
7+
description: "Open-source web server control panel.",
8+
9+
lastUpdated: true,
10+
cleanUrls: "with-subfolders",
11+
12+
head: [
13+
["link", { rel: "icon", sizes: "any", href: "/favicon.ico" }],
14+
["link", { rel: "icon", type: "image/svg+xml", sizes: "16x16", href: "/logo.svg" }],
15+
["link", { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" }],
16+
["link", { rel: "manifest", href: "/site.webmanifest" }],
17+
["meta", { name: "theme-color", content: "#b7236a" }],
18+
],
19+
20+
themeConfig: {
21+
logo: "/logo.svg",
22+
23+
nav: nav(),
24+
25+
socialLinks: [
26+
{ icon: "github", link: "https://github.com/hestiacp/hestiacp" },
27+
{ icon: "discord", link: "https://discord.gg/nXRUZch" },
28+
{ icon: "twitter", link: "https://twitter.com/HestiaPanel" },
29+
{ icon: "facebook", link: "https://www.facebook.com/hestiacp" },
30+
],
31+
32+
sidebar: { "/docs/": sidebarDocs() },
33+
34+
outline: [2, 3],
35+
36+
editLink: {
37+
pattern: "https://github.com/hestiacp/hestiacp-docs/edit/main/docs/:path",
38+
text: "Edit this page on GitHub",
39+
},
40+
41+
footer: {
42+
message: "Released under the GPLv3 License.",
43+
copyright: "Copyright © 2019-present Hestia Control Panel",
44+
},
45+
46+
// algolia: {
47+
// appId: "REPLACE_ME",
48+
// apiKey: "REPLACE_ME",
49+
// indexName: "REPLACE_ME",
50+
// },
51+
},
52+
});
53+
54+
function nav(): DefaultTheme.NavItem[] {
55+
return [
56+
{ text: "Features", link: "/features.md" },
57+
{ text: "Docs", link: "/docs/introduction/getting-started.md", activeMatch: "/docs/" },
58+
{ text: "Team", link: "/team.md" },
59+
{ text: "Demo", link: "https://demo.hestiacp.com:8083/" },
60+
{ text: "Forum", link: "https://forum.hestiacp.com/" },
61+
{ text: "Donate", link: "/donate.md" },
62+
{
63+
text: `v${version}`,
64+
items: [
65+
{
66+
text: "Changelog",
67+
link: "https://github.com/hestiacp/hestiacp/blob/main/CHANGELOG.md",
68+
},
69+
{
70+
text: "Contributing",
71+
link: "https://github.com/hestiacp/hestiacp/blob/main/CONTRIBUTING.md",
72+
},
73+
{
74+
text: "Security policy",
75+
link: "https://github.com/hestiacp/hestiacp/blob/main/SECURITY.md",
76+
},
77+
],
78+
},
79+
];
80+
}
81+
82+
function sidebarDocs(): DefaultTheme.SidebarGroup[] {
83+
return [
84+
{
85+
text: "Introduction",
86+
collapsible: true,
87+
items: [
88+
{ text: "Getting started", link: "/docs/introduction/getting-started.md" },
89+
{ text: "Best practices", link: "/docs/introduction/best-practices.md" },
90+
],
91+
},
92+
{
93+
text: "User guide",
94+
collapsible: true,
95+
items: [
96+
{ text: "Account", link: "/docs/user-guide/account.md" },
97+
{ text: "Backups", link: "/docs/user-guide/backups.md" },
98+
{ text: "Cron jobs", link: "/docs/user-guide/cron-jobs.md" },
99+
{ text: "Databases", link: "/docs/user-guide/databases.md" },
100+
{ text: "DNS", link: "/docs/user-guide/dns.md" },
101+
{ text: "File manager", link: "/docs/user-guide/file-manager.md" },
102+
{ text: "Mail domains", link: "/docs/user-guide/mail-domains.md" },
103+
{ text: "Notifications", link: "/docs/user-guide/notifications.md" },
104+
{ text: "Packages", link: "/docs/user-guide/packages.md" },
105+
{ text: "Statistics", link: "/docs/user-guide/statistics.md" },
106+
{ text: "Users", link: "/docs/user-guide/users.md" },
107+
{ text: "Web domains", link: "/docs/user-guide/web-domains.md" },
108+
],
109+
},
110+
{
111+
text: "Server administration",
112+
collapsible: true,
113+
items: [
114+
{ text: "Backup & restore", link: "/docs/server-administration/backup-restore.md" },
115+
{ text: "Configuration", link: "/docs/server-administration/configuration.md" },
116+
{ text: "Customisation", link: "/docs/server-administration/customisation.md" },
117+
{ text: "Databases & phpMyAdmin", link: "/docs/server-administration/databases.md" },
118+
{ text: "DNS clusters & DNSSEC", link: "/docs/server-administration/dns.md" },
119+
{ text: "Email", link: "/docs/server-administration/email.md" },
120+
{ text: "File manager", link: "/docs/server-administration/file-manager.md" },
121+
{ text: "Firewall", link: "/docs/server-administration/firewall.md" },
122+
{ text: "OS upgrades", link: "/docs/server-administration/os-upgrades.md" },
123+
{ text: "Rest API", link: "/docs/server-administration/rest-api.md" },
124+
{ text: "SSL certificates", link: "/docs/server-administration/ssl-certificates.md" },
125+
{ text: "Web templates & caching", link: "/docs/server-administration/web-templates.md" },
126+
{ text: "Troubleshooting", link: "/docs/server-administration/troubleshooting.md" },
127+
],
128+
},
129+
{
130+
text: "Contributing",
131+
collapsible: true,
132+
items: [
133+
{ text: "Development", link: "/docs/contributing/development.md" },
134+
{ text: "Documentation", link: "/docs/contributing/documentation.md" },
135+
{ text: "Quick install app", link: "/docs/contributing/quick-install-app.md" },
136+
{ text: "Testing", link: "/docs/contributing/testing.md" },
137+
{ text: "Translations", link: "/docs/contributing/translations.md" },
138+
],
139+
},
140+
{
141+
text: "Community",
142+
collapsible: true,
143+
items: [
144+
{ text: "Hestia Nginx Cache", link: "/docs/community/hestia-nginx-cache.md" },
145+
{
146+
text: "Ioncube installer for Hestia",
147+
link: "/docs/community/ioncube-hestia-installer.md",
148+
},
149+
{ text: "Install script generator", link: "/docs/community/install-script-generator.md" },
150+
],
151+
},
152+
{
153+
text: "Reference",
154+
collapsible: true,
155+
items: [
156+
{ text: "API", link: "/docs/reference/api.md" },
157+
{ text: "CLI", link: "/docs/reference/cli.md" },
158+
],
159+
},
160+
];
161+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<script lang="ts">
2+
import { FeatureListItem } from "../../../_data/features";
3+
4+
export default {
5+
props: {
6+
items: {
7+
type: Array<FeatureListItem>,
8+
required: true,
9+
},
10+
},
11+
};
12+
</script>
13+
14+
<template>
15+
<ul class="FeatureList">
16+
<li v-for="item in items">
17+
<span v-html="item.text"></span>
18+
<ul v-if="item.items">
19+
<li v-for="nested in item.items">
20+
<span v-html="nested.text"></span>
21+
</li>
22+
</ul>
23+
</li>
24+
</ul>
25+
</template>
26+
27+
<style scoped>
28+
.FeatureList {
29+
margin: 0.55em 0;
30+
padding-left: 1em;
31+
list-style: disc;
32+
line-height: 1.5;
33+
}
34+
35+
.FeatureList ul {
36+
padding-left: 1em;
37+
list-style: disc;
38+
}
39+
40+
.FeatureList li {
41+
margin-top: 0.5em;
42+
}
43+
44+
@media (min-width: 640px) {
45+
.FeatureList {
46+
font-size: 1.15rem;
47+
}
48+
}
49+
</style>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<template>
2+
<div class="FeaturePage">
3+
<slot></slot>
4+
</div>
5+
</template>
6+
7+
<style scoped>
8+
.FeaturePage {
9+
line-height: 1.5;
10+
}
11+
12+
.FeaturePage :deep(.container) {
13+
display: flex;
14+
flex-direction: column;
15+
margin: 0 auto;
16+
max-width: 1152px;
17+
}
18+
19+
.FeaturePage :deep(a) {
20+
font-weight: 500;
21+
color: var(--vp-c-brand);
22+
text-decoration-style: dotted;
23+
transition: color 0.25s;
24+
}
25+
26+
.FeaturePage :deep(a:hover) {
27+
color: var(--vp-c-brand-dark);
28+
}
29+
</style>

0 commit comments

Comments
 (0)