From 914fb4a0d87c4c10b705e42f3dc32e139bd1ccc2 Mon Sep 17 00:00:00 2001 From: qwqcode Date: Tue, 17 Sep 2024 19:10:53 +0800 Subject: [PATCH] docs: add support for multiple languages --- .prettierignore | 4 +- docs/docs/.vitepress/config/en.ts | 141 ++++++++++++ docs/docs/.vitepress/config/index.ts | 12 + docs/docs/.vitepress/config/shared.ts | 72 ++++++ .../.vitepress/{config.ts => config/zh.ts} | 79 +------ docs/docs/.vitepress/theme/Artalk.vue | 4 +- docs/docs/en/guide/deploy.md | 213 ++++++++++++++++++ docs/docs/en/guide/intro.md | 109 +++++++++ docs/docs/en/index.md | 35 +-- .../assets/images}/artalk-banner.png | Bin .../assets/images}/artalk-go-banner.png | Bin docs/landing/index.html | 13 +- .../src/components/Features/QuickFeature.tsx | 23 +- docs/landing/src/components/Header.tsx | 10 +- docs/landing/src/components/Slogan.tsx | 9 +- docs/landing/src/i18n/en.ts | 8 + docs/landing/src/i18n/zh-CN.ts | 10 +- 17 files changed, 595 insertions(+), 147 deletions(-) create mode 100644 docs/docs/.vitepress/config/en.ts create mode 100644 docs/docs/.vitepress/config/index.ts create mode 100644 docs/docs/.vitepress/config/shared.ts rename docs/docs/.vitepress/{config.ts => config/zh.ts} (71%) create mode 100644 docs/docs/en/guide/deploy.md create mode 100644 docs/docs/en/guide/intro.md rename docs/docs/{ => public/assets/images}/artalk-banner.png (100%) rename docs/docs/{ => public/assets/images}/artalk-go-banner.png (100%) diff --git a/.prettierignore b/.prettierignore index 4994f9895..911c712b0 100644 --- a/.prettierignore +++ b/.prettierignore @@ -12,7 +12,9 @@ pnpm-lock.yaml ui/artalk/src/api/v2.ts docs/swagger/swagger.json docs/swagger/swagger.yaml -docs/docs/** +docs/docs/**/*.md +docs/docs/.vitepress/dist/** +docs/docs/.vitepress/cache/** ui/artalk-sidebar/src/lib/md5.js ui/artalk/src/lib/detect.ts **/dist/** diff --git a/docs/docs/.vitepress/config/en.ts b/docs/docs/.vitepress/config/en.ts new file mode 100644 index 000000000..6d6c569ce --- /dev/null +++ b/docs/docs/.vitepress/config/en.ts @@ -0,0 +1,141 @@ +import { defineConfig } from 'vitepress' + +export const en = defineConfig({ + lang: 'en-US', + description: 'A Self-hosted Comment System.', + + themeConfig: { + sidebar: { + '/en/guide/': [ + { + text: 'Quick Start', + collapsed: false, + items: [ + { text: 'Project Introduction', link: '/en/guide/intro.md' }, + { text: 'Program Deployment', link: '/en/guide/deploy.md' }, + { text: 'Data Migration', link: '/en/guide/transfer.md' }, + ], + }, + { + text: 'Core Guide', + collapsed: false, + items: [ + { text: 'Sidebar', link: '/en/guide/frontend/sidebar.md' }, + { text: 'Email Notification', link: '/en/guide/backend/email.md' }, + { text: 'Multi-channel Notification', link: '/en/guide/backend/admin_notify.md' }, + { text: 'Social Login', link: '/en/guide/frontend/auth.md' }, + { text: 'Comment Moderation', link: '/en/guide/backend/moderator.md' }, + { text: 'Captcha', link: '/en/guide/backend/captcha.md' }, + { text: 'Image Upload', link: '/en/guide/backend/img-upload.md' }, + { text: 'Accounts and Multi-site', link: '/en/guide/backend/multi-site.md' }, + { text: 'Resolve Relative Path', link: '/en/guide/backend/relative-path.md' }, + ], + }, + { + text: 'Advanced Guide', + collapsed: false, + items: [ + { text: 'Emoticons', link: '/en/guide/frontend/emoticons.md' }, + { text: 'Page View Statistics', link: '/en/guide/frontend/pv.md' }, + { text: 'LaTeX', link: '/en/guide/frontend/latex.md' }, + { text: 'Image Lightbox', link: '/en/guide/frontend/lightbox.md' }, + { text: 'Image Lazy Load', link: '/en/guide/frontend/img-lazy-load.md' }, + { text: 'IP Region', link: '/en/guide/frontend/ip-region.md' }, + { text: 'Multi-language', link: '/en/guide/frontend/i18n.md' }, + { text: 'Development Documentation', link: '/en/develop/index.md' }, + ], + }, + { + text: 'Configuration Documentation', + collapsed: false, + items: [ + { text: 'Environment Variables', link: '/en/guide/env.md' }, + { text: 'Configuration File', link: '/en/guide/backend/config.md' }, + { text: 'Interface Configuration', link: '/en/guide/frontend/config.md' }, + ], + }, + { + text: 'Deployment Instructions', + collapsed: true, + items: [ + { text: 'Daemon', link: '/en/guide/backend/daemon.md' }, + { text: 'Reverse Proxy', link: '/en/guide/backend/reverse-proxy.md' }, + { text: 'Build', link: '/en/develop/contributing.md' }, + { text: 'Program Upgrade', link: '/en/guide/backend/update.md' }, + { text: 'Docker', link: '/en/guide/backend/docker.md' }, + ], + }, + { + text: 'More Content', + collapsed: true, + items: [ + { text: 'Security', link: '/en/guide/security.md' }, + { text: 'Additional Reading', link: '/en/guide/extras.md' }, + { text: 'Case Studies', link: '/en/guide/cases.md' }, + { text: 'About Us', link: '/en/guide/about.md' }, + ], + }, + ], + '/en/develop/': [ + { + text: 'Development Documentation', + items: [ + { text: 'Development Instructions', link: '/en/develop/index.md' }, + { text: 'Contribution Guide', link: '/en/develop/contributing.md' }, + { text: 'Import to Blog', link: '/en/develop/import-blog.md' }, + { text: 'Import to Framework', link: '/en/develop/import-framework.md' }, + { text: 'Frontend API', link: '/en/develop/fe-api.md' }, + { text: 'Frontend Event', link: '/en/develop/event.md' }, + { text: 'Plugin Development', link: '/en/develop/plugin.md' }, + { text: 'Compatibility', link: '/en/develop/compatibility.md' }, + { + text: 'HTTP API', + link: 'https://artalk.js.org/http-api.html', + }, + ], + }, + ], + }, + + nav: [ + { + text: 'Introduction', + link: '/en/guide/intro', + }, + { + text: 'Deployment', + link: '/en/guide/deploy', + }, + { + text: 'Configuration', + link: '/en/guide/backend/config', + }, + { + text: 'Migration', + link: '/en/guide/transfer', + }, + { + text: 'Cases', + link: '/en/guide/cases', + }, + { + text: 'Development', + link: '/en/develop/', + }, + { + text: 'Links', + items: [ + { + text: 'Code Repository', + link: 'https://github.com/ArtalkJS/Artalk', + }, + ], + }, + ], + + editLink: { + pattern: 'https://github.com/ArtalkJS/Artalk/edit/master/docs/docs/:path', + text: 'Improve this document', + }, + }, +}) diff --git a/docs/docs/.vitepress/config/index.ts b/docs/docs/.vitepress/config/index.ts new file mode 100644 index 000000000..5168761b1 --- /dev/null +++ b/docs/docs/.vitepress/config/index.ts @@ -0,0 +1,12 @@ +import { defineConfig } from 'vitepress' +import { shared } from './shared' +import { zh } from './zh' +import { en } from './en' + +export default defineConfig({ + ...shared, + locales: { + root: { label: '简体中文', ...zh }, + en: { label: 'English', ...en }, + }, +}) diff --git a/docs/docs/.vitepress/config/shared.ts b/docs/docs/.vitepress/config/shared.ts new file mode 100644 index 000000000..e584788b8 --- /dev/null +++ b/docs/docs/.vitepress/config/shared.ts @@ -0,0 +1,72 @@ +import { defineConfig } from 'vitepress' +import iterator from 'markdown-it-for-inline' +import * as Version from '../../code/ArtalkVersion.json' + +export const shared = defineConfig({ + title: 'Artalk', + + // TODO: Uncomment after move default language to subfolder + // rewrites: { + // 'zh/:rest*': ':rest*', + // }, + + /* prettier-ignore */ + head: [ + ['link', { rel: 'icon', type: 'image/png', href: '/favicon.png' }], + ['meta', { name: 'theme-color', content: '#007bff' }], + ['meta', { property: 'og:type', content: 'website' }], + ['meta', { property: 'og:locale', content: 'en' }], + ['meta', { property: 'og:title', content: 'Artalk - A Self-hosted Comment System'}], + ['meta', { property: 'og:site_name', content: 'Artalk' }], + ['meta', { property: 'og:image', content: 'https://artalk.js.org/assets/images/artalk-banner.png' }], + ['meta', { property: 'og:url', content: 'https://artalk.js.org/' }], + ['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi' }], + ], + + markdown: { + // @link https://github.com/shikijs/shiki + theme: { + light: 'github-light', + dark: 'github-dark', + }, + config: (md) => { + md.use(iterator, 'artalk_version', 'text', function (tokens, idx) { + tokens[idx].content = tokens[idx].content.replace(/:ArtalkVersion:/g, Version.latest) + }) + md.use(iterator, 'artalk_version_link', 'link_open', (tokens, idx) => { + const href = tokens[idx].attrGet('href') + tokens[idx].attrSet('href', href.replace(/:ArtalkVersion:/g, Version.latest)) + }) + }, + }, + + sitemap: { + hostname: 'https://artalk.js.org', + transformItems(items) { + return items.filter((item) => !item.url.includes('migration')) + }, + }, + + lastUpdated: true, + cleanUrls: true, + metaChunk: true, + + themeConfig: { + socialLinks: [{ icon: 'github', link: 'https://github.com/ArtalkJS/Artalk' }], + + search: { + provider: 'algolia', + options: { + appId: '2WNJ32WVTY', + apiKey: '6c6ebc345a87b738264f19095b78c91c', + indexName: 'artalk-js', + }, + }, + }, + + vite: { + server: { + open: '/guide/intro.html', + }, + }, +}) diff --git a/docs/docs/.vitepress/config.ts b/docs/docs/.vitepress/config/zh.ts similarity index 71% rename from docs/docs/.vitepress/config.ts rename to docs/docs/.vitepress/config/zh.ts index 7d5357edc..e229eb4c1 100644 --- a/docs/docs/.vitepress/config.ts +++ b/docs/docs/.vitepress/config/zh.ts @@ -1,61 +1,8 @@ import { defineConfig } from 'vitepress' -import iterator from 'markdown-it-for-inline' -import * as Version from '../code/ArtalkVersion.json' -export default defineConfig({ - title: 'Artalk', - description: '一款简洁的自托管评论系统', +export const zh = defineConfig({ lang: 'zh-CN', - - head: [ - ['link', { rel: 'icon', href: '/favicon.png' }], - [ - 'meta', - { - name: 'viewport', - content: - 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi', - }, - ], - ], - - lastUpdated: true, - - markdown: { - // @link https://github.com/shikijs/shiki - theme: { - light: 'github-light', - dark: 'github-dark', - }, - config: (md) => { - md.use(iterator, 'artalk_version', 'text', function (tokens, idx) { - tokens[idx].content = tokens[idx].content.replace( - /:ArtalkVersion:/g, - Version.latest, - ) - }) - md.use(iterator, 'artalk_version_link', 'link_open', (tokens, idx) => { - const href = tokens[idx].attrGet('href') - tokens[idx].attrSet( - 'href', - href.replace(/:ArtalkVersion:/g, Version.latest), - ) - }) - }, - }, - - locales: { - root: { - label: '简体中文', - lang: 'zh', - link: 'https://artalk.js.org/', - }, - en: { - label: 'English', - lang: 'en', - link: 'https://artalk-js-org.translate.goog/guide/intro?_x_tr_sl=auto&_x_tr_tl=en-US&_x_tr_hl=en-US&_x_tr_pto=wapp', - }, - }, + description: '由 Golang 驱动的自托管评论系统', themeConfig: { sidebar: { @@ -192,31 +139,9 @@ export default defineConfig({ }, ], - socialLinks: [ - { icon: 'github', link: 'https://github.com/ArtalkJS/Artalk' }, - ], - - search: { - provider: 'algolia', - options: { - appId: '2WNJ32WVTY', - apiKey: '6c6ebc345a87b738264f19095b78c91c', - indexName: 'artalk-js', - searchParameters: { - facetFilters: ['lang:zh-CN'], - }, - }, - }, - editLink: { pattern: 'https://github.com/ArtalkJS/Artalk/edit/master/docs/docs/:path', text: '完善文档', }, }, - - vite: { - server: { - open: '/guide/intro.html', - }, - }, }) diff --git a/docs/docs/.vitepress/theme/Artalk.vue b/docs/docs/.vitepress/theme/Artalk.vue index 7ff4a55de..991ccaa54 100644 --- a/docs/docs/.vitepress/theme/Artalk.vue +++ b/docs/docs/.vitepress/theme/Artalk.vue @@ -43,8 +43,8 @@ function initArtalk(conf: any) { Artalk.use(ArtalkKatexPlugin) Artalk.use(ArtalkLightboxPlugin, { lightGallery: { - lib: async () => (await import('lightgallery')).default - } + lib: async () => (await import('lightgallery')).default, + }, }) artalk = Artalk.init({ diff --git a/docs/docs/en/guide/deploy.md b/docs/docs/en/guide/deploy.md new file mode 100644 index 000000000..8abeebb7e --- /dev/null +++ b/docs/docs/en/guide/deploy.md @@ -0,0 +1,213 @@ +# 📦 Program Deployment + +## Docker Deployment + +It is recommended to deploy using Docker. Pre-install the [Docker Engine](https://docs.docker.com/engine/install/) and execute the command to create the container: + +```bash +docker run -d \ + --name artalk \ + -p 8080:23366 \ + -v $(pwd)/data:/data \ + -e "TZ=America/New_York" \ + -e "ATK_LOCALE=en" \ + -e "ATK_SITE_DEFAULT=Artalk Blog" \ + -e "ATK_SITE_URL=https://example.com" \ + artalk/artalk-go +``` + +Execute the command to create an admin account: + +```bash +docker exec -it artalk artalk admin +``` + +Enter `http://artalk.example.com:8080` in your browser to access the Artalk admin login interface. + +Incorporate the embedded front-end JS and CSS resources of the Artalk program into the webpage and initialize Artalk: + + + +```html + + + + + + + +
+ +``` + + +Enter the admin username and email in the comment box, and the "Console" button will appear at the bottom right of the comment box. + +In the console, you can [configure the comment system](./backend/config.md) according to your preferences or [migrate comments to Artalk](./transfer.md). + +🥳 You have successfully completed the Artalk deployment! + +## Standard Deployment + +1. Download the program package from [GitHub Release](https://github.com/ArtalkJS/Artalk/releases) +2. Extract it with `tar -zxvf artalk_version_system_architecture.tar.gz` +3. Run `./artalk server` +4. Configure + + ```js + Artalk.init({ server: 'http://artalk.example.com:23366' }) + ``` + +Advanced operations: + +- [Daemon Process (Systemd, Supervisor)](./backend/daemon.md) +- [Reverse Proxy (Caddy, Nginx, Apache)](./backend/reverse-proxy.md) +- [Self-compile (Build from the latest code)](../develop/contributing.md) + +## Compose Deployment + +**compose.yaml** + +```yaml +version: '3.8' +services: + artalk: + container_name: artalk + image: artalk/artalk-go + restart: unless-stopped + ports: + - 8080:23366 + volumes: + - ./data:/data + environment: + - TZ=America/New_York + - ATK_LOCALE=en + - ATK_SITE_DEFAULT=Artalk Blog + - ATK_SITE_URL=https://your_domain +``` + +Create the container: + +```bash +docker-compose up -d +``` + +::: details Common Compose Commands + +```bash +docker-compose restart # Restart the container +docker-compose stop # Stop the container +docker-compose down # Remove the container +docker-compose pull # Update the image +docker-compose exec artalk bash # Enter the container +``` + +::: + +Refer to the documentation: [Docker](./backend/docker.md) / [Environment Variables](./env.md) + +## Linux Distributions + +**Arch Linux (AUR)**: + +```bash +paru -S artalk +``` + +**NixOS**: + +```bash +nix-env -iA nixpkgs.artalk +``` + +**Termux**: + +```bash +pkg install artalk +``` + +[![Packaging status](https://repology.org/badge/vertical-allrepos/artalk.svg)](https://repology.org/project/artalk/versions) + +## CDN Resources + +::: tip Latest Version of Artalk + +The current latest version number of the Artalk front-end is: **:ArtalkVersion:** + +To upgrade the front-end, simply replace the numeric part of the version number in the URL. +::: + +The back-end program of Artalk integrates front-end JS and CSS files. Please pay attention to version compatibility when using public CDN resources. + +**CDNJS** + +> +> +> + +::: details View More +**SUSTech Mirrors (Domestic)** + +> +> +> + +**UNPKG** + +> +> +> + +**JSDELIVR** + +> +> +> + +::: + +## Node Projects + +Install Artalk: + +```bash +npm install artalk +``` + +Import Artalk: + +```js +import 'artalk/dist/Artalk.css' +import Artalk from 'artalk' + +Artalk.init({ + // ... +}) +``` + +For more references: + +- [Embedding in Blog Documentation](../develop/import-blog.md) +- [Embedding in Framework Documentation](../develop/import-framework.md) +- [Front-end Configuration](./frontend/config.md) +- [Front-end API](../develop/fe-api.md) + +## Data Import + +Import data from other comment systems: [Data Migration](./transfer.md) + +## ArtalkLite + +Consider the lightweight version [ArtalkLite](./frontend/artalk-lite.md): smaller and more streamlined. + +## Development Environment + +Refer to: [Developer Guide](https://github.com/ArtalkJS/Artalk/blob/master/CONTRIBUTING.md) diff --git a/docs/docs/en/guide/intro.md b/docs/docs/en/guide/intro.md new file mode 100644 index 000000000..9d71e7b0e --- /dev/null +++ b/docs/docs/en/guide/intro.md @@ -0,0 +1,109 @@ +# 👋 Hello Friend + +Artalk is a simple yet feature-rich commenting system that you can effortlessly deploy and integrate into any blog, website, or web application. + +![](https://user-images.githubusercontent.com/22412567/141147152-df30a0ff-bf41-42ee-9958-4722206a7a90.png) + +## Key Features + +**Lightweight Design** + +The front end uses TypeScript (Vanilla JS), lightweight and free of redundant dependencies, only ~40KB (gzipped). + +The back end, rewritten in Golang (Artalk v2), is cross-platform, compact, and fully featured, allowing for rapid deployment. + +**“Small but Complete”** + +Artalk's features include but are not limited to: + + +* [Sidebar](https://artalk.js.org/guide/frontend/sidebar.html): Quick management, intuitive browsing +* [Social Login](https://artalk.js.org/guide/frontend/auth.html): Fast login via social accounts +* [Email Notification](https://artalk.js.org/guide/backend/email.html): Various sending methods, email templates +* [Multiple Push Notifications](https://artalk.js.org/guide/backend/admin_notify.html): Various push methods, notification templates +* [In-site Notifications](https://artalk.js.org/guide/frontend/sidebar.html): Red dot markers, mention lists +* [Captcha](https://artalk.js.org/guide/backend/captcha.html): Multiple verification types, frequency limits +* [Comment Moderation](https://artalk.js.org/guide/backend/moderator.html): Content detection, spam filtering +* [Image Upload](https://artalk.js.org/guide/backend/img-upload.html): Custom uploads, image hosting support +* [Markdown](https://artalk.js.org/guide/intro.html): Markdown syntax support +* [Emoticons](https://artalk.js.org/guide/frontend/emoticons.html): OwO compatibility, quick integration +* [Multi-site](https://artalk.js.org/guide/backend/multi-site.html): Site isolation, centralized management +* [Admin](https://artalk.js.org/guide/backend/multi-site.html): Password verification, badge identification +* [Page Management](https://artalk.js.org/guide/frontend/sidebar.html): Quick view, one-click title jump +* [Page Views](https://artalk.js.org/guide/frontend/pv.html): Easily track webpage views +* [Hierarchical Structure](https://artalk.js.org/guide/frontend/config.html#nestmax): Nested pagination lists, infinite scroll +* [Comment Voting](https://artalk.js.org/guide/frontend/config.html#vote): Upvote or downvote comments +* [Comment Sorting](https://artalk.js.org/guide/frontend/config.html#listsort): Multiple sorting options +* [Comment Search](https://artalk.js.org/guide/frontend/sidebar.html): Quick search of comment content +* [Pinned Comments](https://artalk.js.org/guide/frontend/sidebar.html): Pin important messages +* [Author-only View](https://artalk.js.org/guide/frontend/config.html): Display only the author's comments +* [Comment Jump](https://artalk.js.org/guide/intro.html): Quick jump to referenced comments +* [Auto-save](https://artalk.js.org/guide/frontend/config.html): Prevent content loss +* [IP Region](https://artalk.js.org/guide/frontend/ip-region.html): Display user's IP region +* [Data Migration](https://artalk.js.org/guide/transfer.html): Flexible migration, quick backup +* [Image Lightbox](https://artalk.js.org/guide/frontend/lightbox.html): Quick lightbox integration +* [Image Lazy Loading](https://artalk.js.org/guide/frontend/img-lazy-load.html): Delay image loading for a better experience +* [Latex](https://artalk.js.org/guide/frontend/latex.html): Latex formula parsing integration +* [Dark Mode](https://artalk.js.org/guide/frontend/config.html#darkmode): Toggle dark mode +* [Plugins](https://artalk.js.org/develop/plugin.html): Create more possibilities +* [Multi-language](https://artalk.js.org/guide/frontend/i18n.html): Switch languages +* [Command Line](https://artalk.js.org/guide/backend/config.html): Command line management +* [API Documentation](https://artalk.js.org/http-api.html): OpenAPI format documentation +* [Program Upgrade](https://artalk.js.org/guide/backend/update.html): Version checking, one-click upgrade + + +We are not exhaustive; more exciting features await your discovery! + +**“Unlimited Blade Works”** + +Artalk is continually growing; your creativity drives its evolution, and your contributions add value! + +Whether it's a front-end project using Vue, React, Svelte, or a blog system like WordPress, Typecho, Hexo, Artalk can be quickly integrated. With everyone's ingenuity, we believe Artalk can adapt to various business scenarios. + +## User Experience + +We believe elegant design brings excellent user experience, which helps projects go further. + +"Ordinary but not mediocre design" - The design tool Figma, favored by professional UI designers, played a significant role in Artalk's redesign. We pre-designed user-friendly, modern interfaces with Figma, then wrote front-end styles to seamlessly blend them into modern websites. This resulted in a simple and fresh interface. Additionally, we designed user identity badges, comment tile/infinite nesting modes, comment pagination, and ensured compatibility with various screen sizes, offering unlimited content in limited space. + +"Collapse in an instant" - For unoptimized commenting systems, users might need to repeatedly enter personal information, and their painstakingly typed insights could be lost due to unexpected situations. Knowing that an adult's collapse can happen in an instant, Artalk uses browser caching to auto-fill user information and auto-save comment data, allowing users to express their thoughts with minimal effort. + +"Rich site expressions to rekindle comment enthusiasm" - Monotonous emoticons might dampen visitor enthusiasm for commenting. Hence, Artalk comes with a carefully selected humorous emoticon set. Additionally, Artalk supports custom image emoticons. + +"Is what you love your life?" - User experience isn't just about visitors; it's also about site admins. Artalk features user-friendly design for site admins, integrating management tools into the [dashboard](./frontend/sidebar.md#控制中心) in the sidebar. Admin users can easily manage multiple sites, with all data exchanged through standardized APIs and processed asynchronously, reducing data processing blockages and service resource usage. For potential spam, Artalk supports automatic filtering, reducing admin workload and keeping the site clean. + +We hope Artalk not only fulfills the basic functions of a commenting system but also becomes a bridge for **knowledge sharers and learners to exchange ideas**, helping knowledge creators realize their value. + +## Community Philosophy + +“**Simplify Complexity, Remarkable Simplicity**” + +Artalk aims to achieve **rich** functionality while being as **simple** as possible. + +On October 2, 2018, Artalk's [first line of code](https://github.com/ArtalkJS/Artalk/commit/66128e2c8d9a8ac00a8d1498ff0ec035a7727daf) was pushed to GitHub. It wasn't until October 20, 2021, that version v2 was released. Due to a small team and limited developer time, the project's overall progress has been slow. We greatly need the power of the community, whether it's reporting bugs or providing new feature ideas, we eagerly anticipate your contributions. + +The Artalk community is an inclusive and open community. We welcome people of all skill levels to help/participate in project development. If you are a beginner, besides actively learning project-related knowledge, you can also try deploying and using Artalk, finding and confirming its shortcomings during use, and then posting relevant discussions in the project's [Issues](https://github.com/ArtalkJS/Artalk/issues) or [Discussions](https://github.com/ArtalkJS/Artalk/discussions) to help developers better locate issues and make optimizations faster. If you are a skilled developer, you can find all the project source code at [@ArtalkJS](https://github.com/ArtalkJS). Combined with this documentation, we believe it shouldn't be difficult to understand. Whether it's optimizing the front-end and back-end structure, implementing new features, or writing community projects, we look forward to Artalk being invigorated with fresh blood. + +“More action, less talk” - The Artalk community does not welcome meaningless disputes. We hope community members coexist harmoniously and contribute ideas for community development. Before raising a question, you should read "[How to Ask Questions the Smart Way](https://lug.ustc.edu.cn/wiki/doc/smart-questions/)", as this may determine whether you get a useful answer. Before expressing an opinion, you should maintain basic etiquette, such as keeping a calm attitude, using appropriate language, and avoiding abusive language, sarcasm, or disrespecting others' beliefs and positions. + +As advocates and practitioners of open-source spirit, we believe the free software we create should be freely used, studied, modified, and shared. This project's main program is open-sourced under the [MIT](https://github.com/ArtalkJS/Artalk/blob/master/LICENSE) license, and the documentation is under the [CC](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh) license. +::: tip Want to Contribute to the Community? + +- Browse developer resources ([Developer Documentation](../develop/index.md) / [CONTRIBUTING.md](https://github.com/ArtalkJS/Artalk/blob/master/CONTRIBUTING.md)) +- Maintain Artalk backend (code repository [@ArtalkJS/Artalk:/](https://github.com/ArtalkJS/Artalk)) +- Maintain Artalk frontend (code repository [@ArtalkJS/Artalk:/ui](https://github.com/ArtalkJS/Artalk/tree/master/ui)) +- Improve Artalk documentation (code repository [@ArtalkJS/Artalk:/docs](https://github.com/ArtalkJS/Artalk/tree/master/docs)) +- Translate multi-language i18n (see [Multi-language Guide](./frontend/i18n.html)) +- Enhance data migration tools (code repository [@ArtalkJS/Artransfer](https://github.com/ArtalkJS/Artransfer)) +- Share your ideas (leave a comment below / [Discussions](https://github.com/ArtalkJS/Artalk/discussions)) +- Write related community projects (plugins, deployment tutorials, etc.) + +::: + +## In Conclusion + +By now, you should have a basic understanding of Artalk. Whether you choose to use Artalk or not, we greatly appreciate your attention. If Artalk does not yet meet your needs, we hope you can offer sharp suggestions to help it grow. + +Welcome to Artalk, + +Take off! 🛫️ diff --git a/docs/docs/en/index.md b/docs/docs/en/index.md index 1a35f2fd3..d0ed799d5 100644 --- a/docs/docs/en/index.md +++ b/docs/docs/en/index.md @@ -1,32 +1,3 @@ ---- -layout: home - -title: Artalk -titleTemplate: A Self-hosted Comment System - -hero: - name: Artalk - text: A Self-hosted Comment System - tagline: Elevate your online conversations with a comment system that embodies the trifecta of lightness, security, and refinement. - actions: - - theme: brand - text: Get Started - link: /guide/intro - - theme: alt - text: View on GitHub - link: https://github.com/ArtalkJS/Artalk - -features: - - icon: 🍃 - title: Lightweight - details: Lightweight and responsive to every interaction - - icon: 🔒 - title: Safety - details: Everything is under control as the data is completely self-hosted - - icon: 🐳 - title: Turbo - details: Easy to deploy, quick to set up commenting interface - - icon: 🍱 - title: Flexible - details: Use Golang to interpret the excellence of multiple platforms ---- + diff --git a/docs/docs/artalk-banner.png b/docs/docs/public/assets/images/artalk-banner.png similarity index 100% rename from docs/docs/artalk-banner.png rename to docs/docs/public/assets/images/artalk-banner.png diff --git a/docs/docs/artalk-go-banner.png b/docs/docs/public/assets/images/artalk-go-banner.png similarity index 100% rename from docs/docs/artalk-go-banner.png rename to docs/docs/public/assets/images/artalk-go-banner.png diff --git a/docs/landing/index.html b/docs/landing/index.html index a23f8ee4f..b20f6315c 100644 --- a/docs/landing/index.html +++ b/docs/landing/index.html @@ -2,7 +2,7 @@ - + + + + + + + + +
diff --git a/docs/landing/src/components/Features/QuickFeature.tsx b/docs/landing/src/components/Features/QuickFeature.tsx index 8ebf5c19c..2e7cc305f 100644 --- a/docs/landing/src/components/Features/QuickFeature.tsx +++ b/docs/landing/src/components/Features/QuickFeature.tsx @@ -48,21 +48,11 @@ export const QuickFeature: React.FC = () => {
- +
docker pull artalk/artalk-go
{
diff --git a/docs/landing/src/components/Header.tsx b/docs/landing/src/components/Header.tsx index 4cb992925..be64d5237 100644 --- a/docs/landing/src/components/Header.tsx +++ b/docs/landing/src/components/Header.tsx @@ -73,17 +73,13 @@ export const Header: React.FC = ({ darkModeHandler }) => { {!mobileShow &&
Artalk
}
- + {t('docs')} - + {t('changelog')} - + darkModeHandler.toggle()}> diff --git a/docs/landing/src/components/Slogan.tsx b/docs/landing/src/components/Slogan.tsx index a08b842a1..4c3362c24 100644 --- a/docs/landing/src/components/Slogan.tsx +++ b/docs/landing/src/components/Slogan.tsx @@ -77,15 +77,10 @@ export const Slogan: React.FC = () => { System diff --git a/docs/landing/src/i18n/en.ts b/docs/landing/src/i18n/en.ts index fd015cd6a..25a43c19f 100644 --- a/docs/landing/src/i18n/en.ts +++ b/docs/landing/src/i18n/en.ts @@ -1,6 +1,10 @@ export const en = { home_title: 'Artalk - A Self-hosted Comment System', get_artalk: 'Get Artalk', + get_artalk_link: 'https://artalk.js.org/en/guide/intro.html', + nav_docs_link: 'https://artalk.js.org/en/guide/intro.html', + nav_changelog_link: 'https://github.com/ArtalkJS/Artalk/blob/master/CHANGELOG.md', + github_link: 'https://github.com/ArtalkJS/Artalk', docs: 'Docs', changelog: 'Changelog', feature_slight_title: 'SLIGHT', @@ -14,8 +18,12 @@ export const en = { feature_swift_self_compile: 'Planning to compile from source?', deploy_bin: 'BINARY', deploy_bin_sub: 'DEPLOYMENT', + deploy_bin_link: 'https://artalk.js.org/en/guide/deploy.html#standard-deployment', deploy_docker: 'DOCKER', deploy_docker_sub: 'DEPLOYMENT', + deploy_docker_link: 'https://artalk.js.org/en/guide/deploy.html#docker-deployment', + docker_hub_link: 'https://hub.docker.com/r/artalk/artalk-go', + self_compile_guide_link: 'https://github.com/ArtalkJS/Artalk/blob/master/CONTRIBUTING.md', learn_more: 'Learn More', copy: 'Copy', copied: 'Copied!', diff --git a/docs/landing/src/i18n/zh-CN.ts b/docs/landing/src/i18n/zh-CN.ts index 4eee2132e..4591b50e8 100644 --- a/docs/landing/src/i18n/zh-CN.ts +++ b/docs/landing/src/i18n/zh-CN.ts @@ -1,8 +1,12 @@ import { MessageSchema } from '.' export const zhCN: MessageSchema = { - home_title: 'Artalk | 自托管评论系统', + home_title: 'Artalk | 由 Golang 驱动的自托管评论系统', get_artalk: '获取 Artalk', + get_artalk_link: 'https://artalk.js.org/guide/intro.html', + nav_docs_link: 'https://artalk.js.org/guide/intro.html', + nav_changelog_link: 'https://github.com/ArtalkJS/Artalk/blob/master/CHANGELOG.md', + github_link: 'https://github.com/ArtalkJS/Artalk', docs: '文档', changelog: '更新日志', feature_slight_title: '轻量', @@ -14,8 +18,12 @@ export const zhCN: MessageSchema = { feature_swift_self_compile: '打算使用代码自编译?', deploy_bin: '二进制', deploy_bin_sub: '文件部署', + deploy_bin_link: 'https://artalk.js.org/guide/deploy.html#普通方式部署', deploy_docker: 'Docker', deploy_docker_sub: '镜像部署', + deploy_docker_link: 'https://artalk.js.org/guide/deploy.html#docker-部署', + docker_hub_link: 'https://hub.docker.com/r/artalk/artalk-go', + self_compile_guide_link: 'https://artalk.js.org/develop/contributing.html', learn_more: '了解更多', copy: '复制', copied: '已复制!',