This website is the homepage of Computerization club, a high school student club in Shanghai World Foreign Language Academy.
It is built using Docusaurus 2, a modern static website generator.
All documents (e.g. .md files inside docs/ and blog/ path) are licensed under Creative Commons Attribution 4.0 International License as in LICENSE-docs.
The rest codes, unless stated otherwise, are licensed under GNU Affero General Public License v3.0.
As for a human-readable explanation (and not a substitute for the license itself) by Creative Commons:
You are free to:
Share β copy and redistribute the material in any medium or format
Adapt β remix, transform, and build upon the material for any purpose, even commercially.
Under the following terms:
Attribution β You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
$ yarnThis command installs all depedendencies specified by the yarn.lock file.
$ yarn startThis command starts a local development server and opens up a browser window. You can preview your changes instantly with the development server as you edit the files. Most changes are reflected live without having to restart the server.
$ yarn start --locale enThe default language for the website is simplified Chinese (zh-Hans). In order to view the English version locally, start the development server with the english locale. Note that each locale is an independent application, so you cannot use the language dropdown to switch between languages in development.
You may want to read the Docusaurus v2 documentation beforehand.
.
βββ .circleci
β # Configuration file for Continuous Integration & Testing
βββ .github
β # GitHub workflows to run checks on commit / pull request
βββ .husky
β # The pre-commit hook script run by husky; used for linting
βββ .yarn
β # The vendored version of yarn (berry)
βββ alumni
β # The alumni data file, used by our own docusaurus-plugin-alumni
βββ blog
β # Markdown files for blog contents
β # Refer to https://docusaurus.io/docs/blog#adding-posts for help
βββ build
β # Generated by `yarn build`; Used for deployment
βββ docs
β # Markdown files for documentation
β # Refer to https://docusaurus.io/docs/markdown-features for available features
βββ i18n
β β # Internationalization support
β βββ en
β β # All data needed for the English translation
β βββ docusaurus-plugin-alumni
β β # The translated alumni data file
β βββ docusaurus-plugin-content-blog
β β # All blog pages translated in English; for maintenance purposes, the directory structure should be the same as /blog/
β βββ docusaurus-plugin-content-docs
β β # All docs pages translated in English; for maintenance purposes, the directory structure should be the same as /docs/
β βββ docusaurus-theme-classic
β # JSON files providing translation to the navbar and footer
βββ node_modules
β # Stores the dependency files installed by `yarn`
β # Required for testing & deploying
βββ plugins
β βββ docusaurus-plugin-alumni
β β # Our custom plugin that renders the alumni data to the /alumni route
β βββ lib
β β # Compiler output after running `yarn build`
β βββ src
β β # Source code of the plugin
β βββ theme
β βββ AlumniPage
β β # The root component (page layout) used at the /alumni route
β βββ AlumniTimeline
β β # The main component to render the alumni timeline
β βββ MemberCard
β β # Each alumni's card
β βββ Members
β β # The series of cards within each "class of"
β βββ icons
β # SVG icons, e.g. LinkedIn, website
βββ src
β βββ css
β β # Global CSS files for theming
β β # (though most of the CSS are written at the component-level)
β βββ pages
β # React codes for actual pages
βββ static
β # All static files goes here
β # Refer to https://docusaurus.io/docs/static-assets
βββ imgTo save bandwidth & make loading faster, images will need to be optimized first. You can refer to Google's PageSpeed Insights: Optimize Images. Alternatively, you can use the following command in Linux with ImageMagick installed.
$ convert in.jpg -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace sRGB out.jpg$ yarn build
This command generates static content into the build directory and can be served using any static contents hosting service.
$ GIT_USER=<Your GitHub username> USE_SSH=1 yarn deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.