Skip to content

Commit

Permalink
feat(website): sync documents and add content (#1215)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
misitebao authored Mar 6, 2022
1 parent 27ab3cf commit 7d8f224
Show file tree
Hide file tree
Showing 21 changed files with 286 additions and 136 deletions.
4 changes: 4 additions & 0 deletions website/docs/appendix/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Appendix",
"position": 70
}
36 changes: 36 additions & 0 deletions website/docs/changelog.mdx
Original file line number Diff line number Diff line change
@@ -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 changes: 5 additions & 0 deletions website/docs/faq.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sidebar_position: 60
---

# FAQ
2 changes: 1 addition & 1 deletion website/docs/about.mdx → website/docs/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 1
---

# About
# Introduction

## Overview

Expand Down
200 changes: 103 additions & 97 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,157 +1,162 @@
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',
},
},
},
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',
(
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",
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/wailsapp/wails/edit/master/website/blog/',
"zh-Hans": {
label: "简体中文",
direction: "ltr",
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
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"),
},
}),
],
],
],

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', },
// { to: '/versions', label: 'All versions', }, //Can add custom pages
],
},
{
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",
},
],
},
Expand All @@ -163,4 +168,5 @@ const darkCodeTheme = require('prism-react-renderer/themes/palenight');
darkTheme: darkCodeTheme,
},
}),
});
}
);
20 changes: 18 additions & 2 deletions website/i18n/en/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
"message": "Recent posts",
"description": "The label for the left sidebar"
}
}
}
6 changes: 5 additions & 1 deletion website/i18n/en/docusaurus-plugin-content-docs/current.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Loading

0 comments on commit 7d8f224

Please sign in to comment.