Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ module.exports = {
files: ['*.js', '*.jsx'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
// may need to add more rules
},
},
Expand Down
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,48 @@ This command installs all depedendencies specified by the [`yarn.lock`](/yarn.lo
$ yarn start
```

This command starts a local development server and open 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.
This 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.

### Other locales

```
$ yarn start --locale en
```

The 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.

### Directory Structure

You may want to read the [Docusaurus v2 documents](https://v2.docusaurus.io/) beforehand.
You may want to read the [Docusaurus v2 documentation](https://docusaurus.io/) beforehand.

```bash
.
├── .circleci
│ # Configuration file for Continuous Integration & Testing
├── .dependabot
│ # Configuration file for auto-bumping dependencies
├── .github
│ # GitHub workflows to run checks on commit / pull request
├── .husky
│ # The pre-commit hook script run by husky; used for linting
├── blog
│ # Markdown files for blog contents
│ # Refer to https://v2.docusaurus.io/docs/blog#adding-posts for help
│ # 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://v2.docusaurus.io/docs/markdown-features for available features
│ # Refer to https://docusaurus.io/docs/markdown-features for available features
├── i18n
│ | # Internationalization support
| └── en
│ | # All data needed for the English translation
│ ├── docusaurus-plugin-content-blog
│ │ # All blog pages translated in English; for best tracking, the directory structure should be the same as /blog/
│ ├── docusaurus-plugin-content-docs
│ │ # All docs pages translated in English; for best tracking, 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
Expand All @@ -77,7 +99,7 @@ You may want to read the [Docusaurus v2 documents](https://v2.docusaurus.io/) be
│ # React codes for actual pages
└── static
│ # All static files goes here
│ # Refer to https://v2.docusaurus.io/docs/static-assets
│ # Refer to https://docusaurus.io/docs/static-assets
└── img
```

Expand Down
4 changes: 2 additions & 2 deletions docs/about-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ license: Creative Commons Attribution 4.0 International License

### 我们的名字

**C 社 << Computerization << 信息化社**
我们的全称是 Computerization,信息化社
**C 社 << Computerization << 世外信息化社**
我们的全称是 Computerization,世外信息化社
不过我们更喜欢被称之为 C 社,一是因为简洁明快,二也是因为与 C 语言同名(笑)

### 我们对 CS 的看法
Expand Down
42 changes: 32 additions & 10 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

const remarkMath = require('remark-math');
const rehypeKatex = require('rehype-katex');
const githubTheme = require('prism-react-renderer/themes/github');
const draculaTheme = require('prism-react-renderer/themes/dracula');

module.exports = {
title: 'Computerization',
Expand All @@ -17,18 +19,34 @@ module.exports = {
favicon: 'img/favicon/favicon.ico',
organizationName: 'Computerization', // Usually your GitHub org/user name.
projectName: 'computerization.github.io', // Usually your repo name.
i18n: {
defaultLocale: 'zh-Hans',
locales: ['zh-Hans', 'en'],
localeConfigs: {
'zh-Hans': {
label: '中文(简体)',
},
en: {
label: 'English',
},
},
},
themeConfig: {
navbar: {
title: 'Computerization',
title: '世外信息化社',
logo: {
alt: 'Computerization Logo',
src: 'img/logo.svg',
srcDark: 'img/logo.svg',
},
items: [
{ to: 'alumni', label: 'Alumni', position: 'left' },
{ to: 'docs/about-us', label: 'Docs', position: 'left' },
{ to: 'blog', label: 'Blog', position: 'left' },
{ to: 'alumni', label: '往届成员', position: 'left' },
{ to: 'docs/about-us', label: '文档', position: 'left' },
{ to: 'blog', label: '博客', position: 'left' },
{
type: 'localeDropdown',
position: 'right',
},
{
href: 'https://github.com/Computerization',
label: 'GitHub',
Expand All @@ -40,16 +58,16 @@ module.exports = {
style: 'dark',
links: [
{
title: 'Docs',
title: '文档',
items: [
{
label: 'Docs',
label: '文档',
to: 'docs/about-us',
},
],
},
{
title: 'Community',
title: '社区',
items: [
{
label: 'GitHub',
Expand All @@ -58,10 +76,10 @@ module.exports = {
],
},
{
title: 'Social',
title: '社交',
items: [
{
label: 'Blog',
label: '博客',
to: 'blog',
},
],
Expand All @@ -71,7 +89,11 @@ module.exports = {
alt: 'Computerization Logo',
src: 'img/logo.svg',
},
copyright: `Copyright © ${new Date().getFullYear()} Computerization. Built with Docusaurus.`,
copyright: `世外信息化社 © ${new Date().getFullYear()} 版权所有. 使用 Docusaurus 搭建.`,
},
prism: {
theme: githubTheme,
darkTheme: draculaTheme,
},
},
stylesheets: [
Expand Down
218 changes: 218 additions & 0 deletions i18n/en/code.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
{
"theme.NotFound.title": {
"message": "Page Not Found",
"description": "The title of the 404 page"
},
"theme.NotFound.p1": {
"message": "We could not find what you were looking for.",
"description": "The first paragraph of the 404 page"
},
"theme.NotFound.p2": {
"message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.",
"description": "The 2nd paragraph of the 404 page"
},
"theme.AnnouncementBar.closeButtonAriaLabel": {
"message": "Close",
"description": "The ARIA label for close button of announcement bar"
},
"theme.blog.paginator.navAriaLabel": {
"message": "Blog list page navigation",
"description": "The ARIA label for the blog pagination"
},
"theme.blog.paginator.newerEntries": {
"message": "Newer Entries",
"description": "The label used to navigate to the newer blog posts page (previous page)"
},
"theme.blog.paginator.olderEntries": {
"message": "Older Entries",
"description": "The label used to navigate to the older blog posts page (next page)"
},
"theme.blog.post.readingTime.plurals": {
"message": "One min read|{readingTime} min read",
"description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.tags.tagsListLabel": {
"message": "Tags:",
"description": "The label alongside a tag list"
},
"theme.blog.post.readMore": {
"message": "Read More",
"description": "The label used in blog post item excerpts to link to full blog posts"
},
"theme.blog.post.paginator.navAriaLabel": {
"message": "Blog post page navigation",
"description": "The ARIA label for the blog posts pagination"
},
"theme.blog.post.paginator.newerPost": {
"message": "Newer Post",
"description": "The blog post button label to navigate to the newer/previous post"
},
"theme.blog.post.paginator.olderPost": {
"message": "Older Post",
"description": "The blog post button label to navigate to the older/next post"
},
"theme.tags.tagsPageTitle": {
"message": "Tags",
"description": "The title of the tag list page"
},
"theme.blog.post.plurals": {
"message": "One post|{count} posts",
"description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.blog.tagTitle": {
"message": "{nPosts} tagged with \"{tagName}\"",
"description": "The title of the page for a blog tag"
},
"theme.tags.tagsPageLink": {
"message": "View All Tags",
"description": "The label of the link targeting the tag list page"
},
"theme.CodeBlock.copyButtonAriaLabel": {
"message": "Copy code to clipboard",
"description": "The ARIA label for copy code blocks button"
},
"theme.CodeBlock.copied": {
"message": "Copied",
"description": "The copied button label on code blocks"
},
"theme.CodeBlock.copy": {
"message": "Copy",
"description": "The copy button label on code blocks"
},
"theme.docs.sidebar.expandButtonTitle": {
"message": "Expand sidebar",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
},
"theme.docs.sidebar.expandButtonAriaLabel": {
"message": "Expand sidebar",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
},
"theme.docs.paginator.navAriaLabel": {
"message": "Docs pages navigation",
"description": "The ARIA label for the docs pagination"
},
"theme.docs.paginator.previous": {
"message": "Previous",
"description": "The label used to navigate to the previous doc"
},
"theme.docs.paginator.next": {
"message": "Next",
"description": "The label used to navigate to the next doc"
},
"theme.docs.sidebar.responsiveCloseButtonLabel": {
"message": "Close menu",
"description": "The ARIA label for close button of mobile doc sidebar"
},
"theme.docs.sidebar.responsiveOpenButtonLabel": {
"message": "Open menu",
"description": "The ARIA label for open button of mobile doc sidebar"
},
"theme.docs.sidebar.collapseButtonTitle": {
"message": "Collapse sidebar",
"description": "The title attribute for collapse button of doc sidebar"
},
"theme.docs.sidebar.collapseButtonAriaLabel": {
"message": "Collapse sidebar",
"description": "The title attribute for collapse button of doc sidebar"
},
"theme.docs.versions.unreleasedVersionLabel": {
"message": "This is unreleased documentation for {siteTitle} {versionLabel} version.",
"description": "The label used to tell the user that he's browsing an unreleased doc version"
},
"theme.docs.versions.unmaintainedVersionLabel": {
"message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.",
"description": "The label used to tell the user that he's browsing an unmaintained doc version"
},
"theme.docs.versions.latestVersionSuggestionLabel": {
"message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).",
"description": "The label userd to tell the user that he's browsing an unmaintained doc version"
},
"theme.docs.versions.latestVersionLinkLabel": {
"message": "latest version",
"description": "The label used for the latest version suggestion link label"
},
"theme.common.editThisPage": {
"message": "Edit this page",
"description": "The link label to edit the current page"
},
"theme.common.headingLinkTitle": {
"message": "Direct link to heading",
"description": "Title for link to heading"
},
"theme.lastUpdated.atDate": {
"message": " on {date}",
"description": "The words used to describe on which date a page has been last updated"
},
"theme.lastUpdated.byUser": {
"message": " by {user}",
"description": "The words used to describe by who the page has been last updated"
},
"theme.lastUpdated.lastUpdatedAtBy": {
"message": "Last updated{atDate}{byUser}",
"description": "The sentence used to display when a page has been last updated, and by who"
},
"theme.common.skipToMainContent": {
"message": "Skip to main content",
"description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
},
"frontpage.button": {
"message": "Read more",
"description": "The button that navigates to the docs"
},
"frontpage.sec1": {
"message": "Our activities",
"description": "The first section title"
},
"frontpage.sec1.item1.title": {
"message": "Web development",
"description": "Title to the first item in the activities section"
},
"frontpage.sec1.item1": {
"message": "At Computerization, learn front-end frameworks including {link1} and {link2}, develop collaboratively on GitHub, and utilize the skills accrued to create your own personal page. Engage in the club's platform building and demonstrate your unique creativity!",
"description": "The first item in the activities section"
},
"frontpage.sec1.item2.title": {
"message": "Algorithm contests",
"description": "Title to the second item in the activities section"
},
"frontpage.sec1.item2": {
"message": "At Computerization, share your coding experience with other contest masters, and probe deeper into data structures and algorithms. Prepare for NOIP China, and join LeetCode or Luogu contests. Improve yourself through trials and tribulations!",
"description": "The second item in the activities section"
},
"frontpage.sec1.item3.title": {
"message": "Explore artificial intelligence",
"description": "Title to the third item in the activities section"
},
"frontpage.sec1.item3": {
"message": "At Computeriztaion, learn the cutting-edge technology, discover the secrets behind artificial intelligence and machine learning, design a neural network yourself, and train it to realize any kind of your craziest dreams!",
"description": "The third item in the activities section"
},
"frontpage.sec1.imgsrc": {
"message": "Image source: ",
"description": "The declaration of image source"
},
"frontpage.sec1.imgsrc.link": {
"message": "Docusaurus official documentation",
"description": "The link name of image source"
},
"frontpage.sec2.title": {
"message": "What's new",
"description": "The second section title"
},
"frontpage.sec2.item1": {
"message": "Our homepage is officially here!",
"description": "The first item in the What's new section"
},
"alumni.title": {
"message": "Our Alumni",
"description": "The title of the alumni page"
},
"alumni.description": {
"message": "If you are an alumnus or an alumna of the Computerization club and would like us to update your listing or link to your homepage, please open an issue or pull request at the {link} repository, or drop us a WeChat message.",
"description": "The description of the alumni page"
},
"alumni.classOf": {
"message": "Class of {classOf}",
"description": "The section label for each class"
}
}
Loading