克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Website

This website is built using Docusaurus 2 with below command:

npx create-docusaurus@latest myems.io classic

Please ignore above command and start from below command.

Download all the necessary dependencies into the node_modules directory.

cd myems.io
sudo npm i --unsafe-perm=true --allow-root --legacy-peer-deps

Build

Docusaurus is a modern static website generator so we need to build the website into a directory of static contents and put it on a web server so that it can be viewed. To build the website:

sudo npm run build

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Running the development server

To preview your changes as you edit the files, you can run a local development server that will serve your website and reflect the latest changes.

cd myems.io
sudo npm run serve

By default, a browser window will open at http://localhost:3000.

Deployment with Azure Static Web Apps CI/CD

A GitHub Actions workflow is triggered when a push to master branch or a pull request on the master branch is: opened, synchronized, reopened, or closed.

Refer to https://dev.to/azure/11-share-content-with-docusaurus-azure-static-web-apps-30hc

Translate

Use the write-translations CLI command to initialize the JSON translation files for the zh-Hans locale:

sudo npm run write-translations -- --locale zh-Hans

Copy your untranslated Markdown files to the zh-Hans folder:

mkdir -p i18n/zh-Hans/docusaurus-plugin-content-docs/current
cp -r docs/** i18n/zh-Hans/docusaurus-plugin-content-docs/current

mkdir -p i18n/zh-Hans/docusaurus-plugin-content-blog
cp -r blog/** i18n/zh-Hans/docusaurus-plugin-content-blog

mkdir -p i18n/zh-Hans/docusaurus-plugin-content-pages
cp -r src/pages/**.md i18n/zh-Hans/docusaurus-plugin-content-pages
cp -r src/pages/**.mdx i18n/zh-Hans/docusaurus-plugin-content-pages

Add all these files to Git.

Translate the Markdown and JSON files in i18n/zh-Hans and commit the translation.

Repeat

Follow the same process for each locale you need to support.

Refer to https://docusaurus.io/docs/next/i18n/git

MIT License Copyright (c) MyEMS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Source code for website myems.io 展开 收起
JavaScript 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化