5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 06:32:10 +08:00

feat(website): sync documents and add content (#1215)

* feat(website): sync documents and add content

- Add a directory to the website
- Update site navigation menu
- Update site tagline(Emphasis on cross-platform)
- Sync the changelog of the latest version to the website

* docs: remove the `appendix` directory
This commit is contained in:
Misitebao 2022-03-06 13:18:02 +08:00 committed by GitHub
parent 27ab3cf4e7
commit 7d8f2243ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 286 additions and 136 deletions

View File

@ -0,0 +1,4 @@
{
"label": "Appendix",
"position": 70
}

View File

@ -0,0 +1,36 @@
---
sidebar_position: 80
---
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [v2.0.0-beta.33] - 2022-03-05
### Added
- NSIS Installer support for creating installers for Windows applications - Thanks [@stffabi](https://github.com/stffabi) 🎉
- New frontend:dev:watcher command to spin out 3rd party watchers when using wails dev - Thanks [@stffabi](https://github.com/stffabi)🎉
- Remote templates now support version tags - Thanks [@misitebao](https://github.com/misitebao) 🎉
### Fixed
- A number of fixes for ARM Linux providing a huge improvement - Thanks [@ianmjones](https://github.com/ianmjones) 🎉
- Fixed potential Nil reference when discovering the path to `index.html`
- Fixed crash when using `runtime.Log` methods in a production build
- Improvements to internal file handling meaning webworkers will now work on Windows - Thanks [@stffabi](https://github.com/stffabi)🎉
### Changed
- The Webview2 bootstrapper is now run as a normal user and doesn't require admin rights
- The docs have been improved and updated
- Added troubleshooting guide
[unreleased]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.33...HEAD
[v2.0.0-beta.33]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.32...v2.0.0-beta.33

5
website/docs/faq.mdx Normal file
View File

@ -0,0 +1,5 @@
---
sidebar_position: 60
---
# FAQ

View File

@ -2,7 +2,7 @@
sidebar_position: 1
---
# About
# Introduction
## Overview

View File

@ -1,88 +1,89 @@
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/palenight');
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/palenight");
// With JSDoc @type annotations, IDEs can provide config autocompletion
/** @type {import('@docusaurus/types').DocusaurusConfig} */
(module.exports = {
title: 'Wails',
tagline: 'Build applications using Go + HTML + CSS + JS (BETA)',
url: 'https://wails.io',
baseUrl: '/',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'wailsapp', // Usually your GitHub org/user name.
projectName: 'wails', // Usually your repo name.
// i18n
i18n: {
defaultLocale: 'en',
locales: ['en', 'zh-Hans'],
localeConfigs: {
en: {
label: 'English',
direction: 'ltr',
},
"zh-Hans": {
label: '简体中文',
direction: 'ltr',
(
module.exports = {
title: "Wails",
tagline: "Build applications using Go + HTML + CSS + JS (BETA)",
url: "https://wails.io",
baseUrl: "/",
onBrokenLinks: "warn",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
organizationName: "wailsapp", // Usually your GitHub org/user name.
projectName: "wails", // Usually your repo name.
// i18n
i18n: {
defaultLocale: "en",
locales: ["en", "zh-Hans"],
localeConfigs: {
en: {
label: "English",
direction: "ltr",
},
"zh-Hans": {
label: "简体中文",
direction: "ltr",
},
},
},
},
plugins: [
[
'docusaurus-plugin-plausible',
{
domain: 'wails.io',
},
plugins: [
[
"docusaurus-plugin-plausible",
{
domain: "wails.io",
},
],
],
],
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: 'https://github.com/wailsapp/wails/edit/master/website',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/wailsapp/wails/edit/master/website/blog/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
presets: [
[
"@docusaurus/preset-classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl: "https://github.com/wailsapp/wails/edit/master/website",
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
"https://github.com/wailsapp/wails/edit/master/website/blog/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
announcementBar: {
id: 'beta-message',
content: 'Wails v2 is currently in Beta',
backgroundColor: '#b00',
textColor: '#FFF',
id: "beta-message",
content: "Wails v2 is currently in Beta",
backgroundColor: "#b00",
textColor: "#FFF",
isCloseable: false,
},
colorMode: {
respectPrefersColorScheme: true,
defaultMode: 'dark',
defaultMode: "dark",
},
navbar: {
title: 'Wails',
title: "Wails",
logo: {
alt: 'Wails Logo',
src: 'img/wails-logo-horizontal.svg',
srcDark: 'img/wails-logo-horizontal-dark.svg',
alt: "Wails Logo",
src: "img/wails-logo-horizontal.svg",
srcDark: "img/wails-logo-horizontal-dark.svg",
},
items: [
{
type: 'docsVersionDropdown', //version
position: 'left',
type: "docsVersionDropdown", //version
position: "left",
dropdownActiveClassDisabled: true,
dropdownItemsAfter: [
// { to: 'https://v1.wails.app', label: '1.13.1', },
@ -90,68 +91,72 @@ const darkCodeTheme = require('prism-react-renderer/themes/palenight');
],
},
{
to: 'https://github.com/sponsors/leaanthony',
label: 'Sponsor',
position: 'left',
to: "https://github.com/sponsors/leaanthony",
label: "Sponsor",
position: "left",
},
{
type: 'doc',
docId: 'about',
position: 'right',
label: 'About',
type: "doc",
docId: "introduction",
position: "right",
label: "Docs",
},
{to: '/blog', label: 'Blog', position: 'right'},
{type: 'localeDropdown', position: 'right',},
{ to: "/blog", label: "Blog", position: "right" },
{ type: "localeDropdown", position: "right" },
{
href: 'https://github.com/wailsapp/wails',
label: 'GitHub',
position: 'right',
href: "https://github.com/wailsapp/wails",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: 'dark',
style: "dark",
links: [
{
title: 'Docs',
title: "Docs",
items: [
{
label: 'About',
to: '/docs/about',
label: "Introduction",
to: "/docs/introduction",
},
{
label: 'Getting Started',
to: '/docs/gettingstarted/installation',
label: "Getting Started",
to: "/docs/gettingstarted/installation",
},
{
label: "Changelog",
to: "/docs/changelog",
},
],
},
{
title: 'Community',
title: "Community",
items: [
{
label: 'Github',
href: 'https://github.com/wailsapp/wails',
label: "Github",
href: "https://github.com/wailsapp/wails",
},
{
label: 'Twitter',
href: 'https://twitter.com/wailsapp',
label: "Twitter",
href: "https://twitter.com/wailsapp",
},
{
label: 'Slack',
href: 'https://gophers.slack.com/messages/CJ4P9F7MZ/',
label: "Slack",
href: "https://gophers.slack.com/messages/CJ4P9F7MZ/",
},
{
label: 'Slack invite',
href: 'https://invite.slack.golangbridge.org/',
label: "Slack invite",
href: "https://invite.slack.golangbridge.org/",
},
],
},
{
title: 'More',
title: "More",
items: [
{
label: 'Blog',
to: '/blog',
label: "Blog",
to: "/blog",
},
],
},
@ -163,4 +168,5 @@ const darkCodeTheme = require('prism-react-renderer/themes/palenight');
darkTheme: darkCodeTheme,
},
}),
});
}
);

View File

@ -180,7 +180,7 @@
"description": "The title of the tag list page"
},
"homepage.Tagline": {
"message": "Build applications using Go + HTML + CSS + JS"
"message": "Build cross-platform applications using Go + HTML + CSS + JS"
},
"homepage.ButtonText": {
"message": "Get Started"
@ -202,5 +202,21 @@
},
"homepage.Features.Description3": {
"message": "Quickly generate, build and package your projects using the Wails CLI."
},
"theme.ErrorPageContent.title": {
"message": "This page crashed.",
"description": "The title of the fallback page when the page crashed"
},
"theme.ErrorPageContent.tryAgain": {
"message": "Try again",
"description": "The label of the button to try again when the page crashed"
},
"theme.BackToTopButton.buttonAriaLabel": {
"message": "Scroll back to top",
"description": "The ARIA label for the back to top button"
},
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": {
"message": "Toggle the collapsible sidebar category '{label}'",
"description": "The ARIA label to toggle the collapsible sidebar category"
}
}
}

View File

@ -11,4 +11,4 @@
"message": "Recent posts",
"description": "The label for the left sidebar"
}
}
}

View File

@ -30,5 +30,9 @@
"sidebar.tutorialSidebar.category.Showcase": {
"message": "Showcase",
"description": "The label for category Showcase in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Appendix": {
"message": "Appendix",
"description": "The label for category Appendix in sidebar tutorialSidebar"
}
}
}

View File

@ -11,9 +11,9 @@
"message": "More",
"description": "The title of the footer links column with title=More in the footer"
},
"link.item.label.About": {
"message": "About",
"description": "The label of footer link with label=About linking to /docs/about"
"link.item.label.Introduction": {
"message": "Introduction",
"description": "The label of footer link with label=Introduction linking to /docs/introduction"
},
"link.item.label.Github": {
"message": "Github",
@ -38,5 +38,13 @@
"copyright": {
"message": "Copyright © 2021 Lea Anthony. Built with Docusaurus.",
"description": "The footer copyright"
},
"link.item.label.Getting Started": {
"message": "Getting Started",
"description": "The label of footer link with label=Getting Started linking to /docs/gettingstarted/installation"
},
"link.item.label.Changelog": {
"message": "Changelog",
"description": "The label of footer link with label=Changelog linking to /docs/changelog"
}
}
}

View File

@ -3,9 +3,9 @@
"message": "",
"description": "The title in the navbar"
},
"item.label.About": {
"message": "About",
"description": "Navbar item with label About"
"item.label.Docs": {
"message": "Docs",
"description": "Navbar item with label Docs"
},
"item.label.Showcase": {
"message": "Showcase",
@ -23,4 +23,4 @@
"message": "Sponsor ❤",
"description": "Navbar item with label Sponsor"
}
}
}

View File

@ -180,7 +180,7 @@
"description": "The title of the tag list page"
},
"homepage.Tagline": {
"message": "使用 Go + HTML + CSS + JS 构建桌面应用"
"message": "使用 Go + HTML + CSS + JS 构建跨平台桌面应用"
},
"homepage.ButtonText": {
"message": "快速入门"
@ -202,5 +202,21 @@
},
"homepage.Features.Description3": {
"message": "使用Wails CLI快速生成、构建和打包项目。"
},
"theme.ErrorPageContent.title": {
"message": "页面已崩溃。",
"description": "The title of the fallback page when the page crashed"
},
"theme.ErrorPageContent.tryAgain": {
"message": "重试",
"description": "The label of the button to try again when the page crashed"
},
"theme.BackToTopButton.buttonAriaLabel": {
"message": "回到顶部",
"description": "The ARIA label for the back to top button"
},
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": {
"message": "打开/收起侧边栏菜单「{label}」",
"description": "The ARIA label to toggle the collapsible sidebar category"
}
}

View File

@ -11,4 +11,4 @@
"message": "最新发布",
"description": "The label for the left sidebar"
}
}
}

View File

@ -30,5 +30,9 @@
"sidebar.tutorialSidebar.category.Showcase": {
"message": "项目展示",
"description": "The label for category Showcase in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Appendix": {
"message": "附录",
"description": "The label for category Appendix in sidebar tutorialSidebar"
}
}

View File

@ -0,0 +1,4 @@
{
"label": "Appendix",
"position": 70
}

View File

@ -0,0 +1,36 @@
---
sidebar_position: 80
---
# 更新日志
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [v2.0.0-beta.33] - 2022-03-05
### Added
- NSIS Installer support for creating installers for Windows applications - Thanks [@stffabi](https://github.com/stffabi) 🎉
- New frontend:dev:watcher command to spin out 3rd party watchers when using wails dev - Thanks [@stffabi](https://github.com/stffabi)🎉
- Remote templates now support version tags - Thanks [@misitebao](https://github.com/misitebao) 🎉
### Fixed
- A number of fixes for ARM Linux providing a huge improvement - Thanks [@ianmjones](https://github.com/ianmjones) 🎉
- Fixed potential Nil reference when discovering the path to `index.html`
- Fixed crash when using `runtime.Log` methods in a production build
- Improvements to internal file handling meaning webworkers will now work on Windows - Thanks [@stffabi](https://github.com/stffabi)🎉
### Changed
- The Webview2 bootstrapper is now run as a normal user and doesn't require admin rights
- The docs have been improved and updated
- Added troubleshooting guide
[unreleased]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.33...HEAD
[v2.0.0-beta.33]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.32...v2.0.0-beta.33

View File

@ -0,0 +1,5 @@
---
sidebar_position: 60
---
# 常见问题

View File

@ -1,10 +1,10 @@
---
title: 关于
title: 简介
sidebar_position: 1
---
# 关于
# 简介
## 概述

View File

@ -128,6 +128,7 @@ Your system is ready for Wails development!
`wails dev` 用于以 "实时开发" 模式运行您的应用。这意味着:
- 应用程序的`go.mod`将被更新为与 Wails CLI 版本相同的版本
- 应用程序被编译并自动运行
- 一个观察者被启动,如果它检测到您的 go 文件的变化,它将触发您的开发应用程序的重新构建
- 启动一个网络服务器`http://localhost:34115`,通过 http 为您的应用程序(不仅仅是前端)提供服务。这允许您使用您喜欢的浏览器开发扩展

View File

@ -21,20 +21,21 @@ sidebar_position: 5
"debounceMS": 100, // 在检测到资源更改时,开发服务器等待重新加载的时间
"devserverurl": "[用于服务本地资源的开发服务器URL。默认http://localhost:34115]",
"appargs": "[在dev模式下以shell样式传递给应用程序的参数]",
"runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS.
"postBuildHooks": {
"GOOS/GOARCH": "[在构建指定的 GOOS/GOARCH 后将执行的命令:${platform} 替换为'GOOS/GOARCH'${bin} 替换为编译后的二进制文件的路径。'GOOS/GOARCH'钩子在'GOOS/*'和'*/*'钩子之前执行。]",
"GOOS/*": "[在构建指定的 GOOS 后将执行的命令:${platform} 替换为'GOOS/GOARCH'${bin} 替换为编译后的二进制文件的路径。'GOOS/*'钩子在'*/*'钩子之前执行。]",
"*/*": "[每次构建后将执行的命令:${platform} 替换为'GOOS/GOARCH'${bin} 替换为编译后的二进制文件的路径。]"
},
"info": { // 用于填充 manifests 和 version 信息的数据。
"companyName": "[公司名称。 默认: [项目名]]",
"productName": "[产品名称。 默认: [项目名]]",
"productVersion": "[产品的版本。 默认: '1.0.0']",
"copyright": "[产品的版权。 默认: 'Copyright.........']",
"comments": "[该应用程序的简短注释。 默认: 'Built using Wails (https://wails.app)']"
},
"nsisType": "['multiple': 每个架构一个安装程序。 'single': 适用于所有正在构建的架构的单一通用安装程序。 默认: 'multiple']"
"runNonNativeBuildHooks": false, // 定义构建钩子是否应该运行,尽管它们是为主机操作系统以外的操作系统定义的。
"postBuildHooks": {
"GOOS/GOARCH": "[在构建指定的 GOOS/GOARCH 后将执行的命令:${platform} 替换为'GOOS/GOARCH'${bin} 替换为编译后的二进制文件的路径。'GOOS/GOARCH'钩子在'GOOS/*'和'*/*'钩子之前执行。]",
"GOOS/*": "[在构建指定的 GOOS 后将执行的命令:${platform} 替换为'GOOS/GOARCH'${bin} 替换为编译后的二进制文件的路径。'GOOS/*'钩子在'*/*'钩子之前执行。]",
"*/*": "[每次构建后将执行的命令:${platform} 替换为'GOOS/GOARCH'${bin} 替换为编译后的二进制文件的路径。]"
},
"info": {
// 用于填充 manifests 和 version 信息的数据。
"companyName": "[公司名称。 默认: [项目名]]",
"productName": "[产品名称。 默认: [项目名]]",
"productVersion": "[产品的版本。 默认: '1.0.0']",
"copyright": "[产品的版权。 默认: 'Copyright.........']",
"comments": "[该应用程序的简短注释。 默认: 'Built using Wails (https://wails.app)']"
},
"nsisType": "['multiple': 每个架构一个安装程序。 'single': 适用于所有正在构建的架构的单一通用安装程序。 默认: 'multiple']"
}
```

View File

@ -11,9 +11,9 @@
"message": "更多",
"description": "The title of the footer links column with title=More in the footer"
},
"link.item.label.About": {
"message": "关于",
"description": "The label of footer link with label=About linking to /docs/about"
"link.item.label.Introduction": {
"message": "简介",
"description": "The label of footer link with label=Introduction linking to /docs/introduction"
},
"link.item.label.Getting Started": {
"message": "快速入门",
@ -42,5 +42,9 @@
"copyright": {
"message": "Copyright © 2021 Lea Anthony. Built with Docusaurus.",
"description": "The footer copyright"
},
"link.item.label.Changelog": {
"message": "更新日志",
"description": "The label of footer link with label=Changelog linking to /docs/changelog"
}
}
}

View File

@ -3,9 +3,9 @@
"message": "",
"description": "The title in the navbar"
},
"item.label.About": {
"message": "关于",
"description": "Navbar item with label About"
"item.label.Docs": {
"message": "文档",
"description": "Navbar item with label Docs"
},
"item.label.Showcase": {
"message": "作品展示",
@ -23,4 +23,4 @@
"message": "赞助我们 ❤",
"description": "Navbar item with label Sponsor"
}
}
}