Skip to content
Wuhan2020 Community Website
CSS JavaScript Other
Branch: dev
Clone or download
jeremy0519 add translation it-it, pt-br for developers_dev.md (#261)
* add it-it for how-to-join-wuhan2020.md, # 164

* mend

* add it-it for developers_dev.md, fix #250

* add pt-br for developers_dev.md, fix #251

* change 2019-nCov to COVID-19, fix #264
Latest commit 300f50c Feb 18, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.dependabot Add dependabot (#148) Feb 8, 2020
.github update deploy.yml Feb 16, 2020
blog add translation it-it, pt-br for developers_dev.md (#261) Feb 18, 2020
build [ImgBot] Optimize images (#159) Feb 9, 2020
docs add translation it-it, pt-br for developers_dev.md (#261) Feb 18, 2020
i18n add translation it-it, pt-br for developers_dev.md (#261) Feb 18, 2020
images [ImgBot] Optimize images (#197) Feb 10, 2020
langutil Create a simple script to list all the docs (#167) Feb 10, 2020
site_config Removed Old site_config Files (#241) Feb 15, 2020
src Change Some Styles (#246) Feb 16, 2020
utils Add new version page (#10) Feb 1, 2020
.babelrc Add new version page (#10) Feb 1, 2020
.docsite Add new version page (#10) Feb 1, 2020
.editorconfig Add editorconfig (#25) Feb 2, 2020
.eslintrc Beautify the files on the root level (#31) Feb 2, 2020
.gitignore Added sitemap.xml Generator (#234) Feb 15, 2020
.htaccess Add new version page (#10) Feb 1, 2020
.nojekyll Add new version page (#10) Feb 1, 2020
.nvmrc Use node 10 for build/deploy (#242) Feb 15, 2020
404.html Beautify the files on the root level (#31) Feb 2, 2020
CNAME add cname (#51) Feb 3, 2020
CODEOWNERS Fix CODEOWNERS syntax Feb 8, 2020
LICENSE Add LICENSE (#40) Feb 2, 2020
README.md Updated readme.md for new language and sitemap (#244) Feb 15, 2020
docsite.config.yml 增加项目列表页面 (#170) Feb 9, 2020
gulpfile.js Add new version page (#10) Feb 1, 2020
index.html Add google verification file (#259) Feb 17, 2020
package.json Added sitemap.xml Generator (#234) Feb 15, 2020
redirect.ejs Beautify the files on the root level (#31) Feb 2, 2020
robots.txt add robots.txt Feb 16, 2020
sitemap-generator.js Added sitemap.xml Generator (#234) Feb 15, 2020
template.ejs Added Google Verification Metadata (#258) Feb 17, 2020
webpack.config.js Beautify the files on the root level (#31) Feb 2, 2020

README.md

Wuhan2020 Community Official Website

CI wuhan2020.github.io deploy

All website material of https://community.wuhan2020.org.cn

Prerequisite

wuhan2020.github.io is powered by docsite.please read https://docsite.js.org Please make sure your version of docsite is docsite@wuhan2020. Please also make sure your node version is higher than 8.x.

Build instruction

  1. Run npm i docsite@wuhan2020 -g to install docsite for project wuhan2020.
  2. Run npm i in the root directory to install the dependencies.
  3. Run docsite start in the root directory to start a local server, you will see the website in 'http://127.0.0.1:8080'.
  4. Run docsite build to build source code.
  5. Verify your change locally: python -m SimpleHTTPServer 8000, when your python version is 3 use :python3 -m http.server 8000 instead.

If you have higher version of node installed, you may consider nvm to allow different versions of node coexisting on your machine.

  1. Follow the instructions to install nvm
  2. Run nvm install 10 to install node 10.x
  3. Run nvm use 10 to switch the working environment to node 10.x
  4. Run npm i docsite@wuhan2020 -g to install docsite for project wuhan2020.

Make sure npm and docsite are configured in the environmet configuration of os . eg: /etc/profile or .bash_profile of Macos

Then you are all set to run and build the website. Follow the build instruction above for the details.

How To Write Documents

Add a new doc

  1. Add new .md file under docs/en-us or docs/zh-cn. Corresponding to Chinese file and English file , and the Chinese and English file names should be consistent.
  2. Update site_config/docs.js, add a new entry to the blog in either en-us or zh-cn.
  3. Run docsite start locally to verify the blog can be displayed correctly.
  4. Send the pull request containing the .md and doc.js only.

Add a new article for developers

  1. Add new .md file under docs/en-us/developers or docs/zh-cn/developers, the file name should end up with _dev.md. Note that the suffix _dev is necessary.
  2. Update site_config/develop.js, add a new entry in either en-us or zh-cn.
  3. Run docsite start locally to verify the article can be displayed correctly.
  4. Send the pull request containing the *_dev.md and develop.js only.

Add a new project showcase

  1. Open project.js directly and find the appropriate language block, such as "en-us".
  2. Add a project entry under projects.list and please make sure that the entry contains img, title, description and link.
  3. Run docsite start locally to verify the project can be displayed correctly.
  4. Send the pull request containing the project.js only.

Add a new blog

  1. Add new .md file under blog/en-us or blog/zh-cn. Corresponding to Chinese file and English file , and the Chinese and English file names should be consistent.
  2. Run docsite start locally to verify the blog can be displayed correctly.
  3. Send the pull request containing the .md only.
  4. SEO config is required.

notice : Blog documents will be automatically sorted by time, without menu configuration Set 'hidden' to 'true' for documents you don't want to display temporarily`

SEO

the type is :

---
hidden: false
title: title
keywords: keywords1,keywords2
description: some description
author: author name
date: 2018-12-29
---

How to Add a New Language

If you want to add a new language, such as Thai.

  1. Please append the element: { value: 'th-th', text: 'ภาษาไทย' } to the langList variable of site_config/site.js.
  2. Next, make a copy of en-us.js in i18n, and name it th-th.js. Now you can start translating phrases on the page.
  3. Then please add directories named th-th in docsand blog directories. Here you can copy articles from en-us, translate them, and then add them to th-th.

How to Add Sitemap for SEO

sitemap.xml is generated automatically by sitemap-generator.js during the deployment process.

Others

You can’t perform that action at this time.