Multilingual suport (hcunews/)

This commit is contained in:
yude 2021-05-27 10:31:55 +09:00
parent 2e4456cb91
commit 9ad748affa
Signed by: yude
GPG Key ID: EB0FE5D925C4A968
3 changed files with 24 additions and 2 deletions

17
docs/hcunews/en.md Normal file
View File

@ -0,0 +1,17 @@
This is **unofficial** account and there's no guarantee of accuracy.
# Administrator
Run by [yude](https://yude.jp/profile), a student of Faculty of Information Science, Hiroshima City University, 2nd grade.
## Contact
* E-mail: [admin@yude.jp](mailto:admin@yude.jp)
* Twitter: [@yude_jp](https://twitter.com/yude_jp)
# How it works
Microsoft Power Automate get the RSS feed from Hiroshima City University Website and tweet when a new article is available. \
We are monitoring the following URLs:
* [お知らせ|広島市立大学](https://www.hiroshima-cu.ac.jp/news/)
* [お知らせ(在学生・保護者の方へ)|広島市立大学](https://www.hiroshima-cu.ac.jp/news_student/)
* [在学生・保護者の方へ|広島市立大学](https://www.hiroshima-cu.ac.jp/student/)
# Related links
* [広島市立大学](https://www.hiroshima-cu.ac.jp/)

View File

@ -4,7 +4,8 @@ import { useRouter } from 'next/router'
import React from "react"
import ReactMarkdown from "react-markdown"
import gfm from 'remark-gfm';
import input from '../docs/hcunews.md'
import ja from '../docs/hcunews/ja.md'
import en from '../docs/hcunews/en.md'
export default function Tos(props) {
const router = useRouter()
@ -15,7 +16,11 @@ export default function Tos(props) {
<Layout title={hcunews}>
<div>
<h1>{hcunews}</h1>
<ReactMarkdown plugins={[gfm]} children={input} />
{lang === 'ja' ? (
<ReactMarkdown plugins={[gfm]} children={ja} />
) : (
<ReactMarkdown plugins={[gfm]} children={en} />
)}
</div>
</Layout>
)