├── public └── .keep ├── resources └── .keep ├── .gitignore ├── config ├── production │ ├── params.toml │ └── config.toml ├── preview │ ├── config.zh-cn.toml │ ├── config.toml │ ├── params.toml │ └── params.zh-cn.toml └── _default │ ├── config.zh-cn.toml │ ├── languages.toml │ ├── author.toml │ ├── menu.en.toml │ ├── menu.zh-cn.toml │ ├── highlight.toml │ ├── social.toml │ ├── params.zh-cn.toml │ ├── config.toml │ └── params.toml ├── i18n ├── zh-cn.toml └── en.toml ├── content ├── en │ ├── posts │ │ ├── _index.md │ │ ├── shortcodes │ │ │ ├── _index.md │ │ │ ├── jsrun.md │ │ │ ├── codepen.md │ │ │ ├── youku.md │ │ │ ├── jsfiddle.md │ │ │ ├── bilibili.md │ │ │ ├── tencentvideo.md │ │ │ ├── iqiyi.md │ │ │ ├── neteasemusic.md │ │ │ └── alert.md │ │ ├── math-typesetting.md │ │ ├── rich-content.md │ │ ├── emoji-support.md │ │ ├── placeholder-text.md │ │ └── markdown-syntax.md │ ├── search │ │ └── _index.md │ ├── tags │ │ └── _index.md │ ├── docs │ │ ├── _index.md │ │ └── gas.md │ ├── series │ │ └── _index.md │ ├── hello.md │ ├── categories │ │ └── _index.md │ ├── archives │ │ └── _index.md │ └── about │ │ └── index.md └── zh-cn │ ├── pages │ ├── _index.md │ └── about.md │ ├── posts │ ├── _index.md │ ├── shortcodes │ │ ├── _index.md │ │ ├── jsrun.md │ │ ├── youku.md │ │ ├── codepen.md │ │ ├── bilibili.md │ │ ├── tencentvideo.md │ │ ├── iqiyi.md │ │ ├── jsfiddle.md │ │ ├── neteasemusic.md │ │ └── alert.md │ ├── 20200820-ccf-aca │ │ ├── 1.png │ │ ├── 10.png │ │ ├── 11.png │ │ ├── 12.png │ │ ├── 13.png │ │ ├── 14.png │ │ ├── 15.png │ │ ├── 16.png │ │ ├── 17.png │ │ ├── 18.png │ │ ├── 19.png │ │ ├── 2.png │ │ ├── 20.png │ │ ├── 21.png │ │ ├── 22.png │ │ ├── 23.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ ├── 9.png │ │ └── index.md │ ├── 20210501-loongarch-manual │ │ ├── 1.webp │ │ ├── 2.webp │ │ ├── 3.webp │ │ ├── 4.webp │ │ └── index.md │ ├── 20210508-upstream-community.md │ ├── 20200127-binutils-and-autotools.md │ ├── hugoisforlovers.md │ ├── 20210801-upstream-community.md │ ├── markdown-syntax.md │ ├── 2021q4-upstream-community.md │ ├── 2021116-upstream-community.md │ ├── goisforlovers.md │ └── 3a5000-uefi.md │ ├── search │ └── _index.md │ ├── docs │ ├── _index.md │ ├── migrate-from-jekyll.md │ ├── gas.md │ └── creating-a-new-theme.md │ ├── tags │ └── _index.md │ ├── series │ └── _index.md │ ├── categories │ └── _index.md │ └── archives │ └── _index.md ├── static ├── images │ ├── banner.jpg │ ├── logo.png │ ├── logo2.png │ ├── markdown.png │ ├── shortcode.png │ └── favicons │ │ ├── favicon.ico │ │ └── favicon-32x32.png ├── css │ └── custom.css └── js │ ├── custom.js │ └── jquery.watermark.js ├── layouts ├── docs │ ├── list.html │ └── single.html ├── partials │ ├── hooks │ │ └── sidebar-begin.html │ └── post │ │ └── meta.html └── _default │ └── baseof.html ├── .gitmodules ├── view.sh ├── README.md ├── archetypes ├── default.md └── page.md └── .github └── workflows ├── deploy.yml └── preview.yml /public/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | public 2 | -------------------------------------------------------------------------------- /config/production/params.toml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /i18n/zh-cn.toml: -------------------------------------------------------------------------------- 1 | [manual] 2 | other = "开发者手册" 3 | -------------------------------------------------------------------------------- /i18n/en.toml: -------------------------------------------------------------------------------- 1 | [manual] 2 | other = "Developer's Manual" 3 | -------------------------------------------------------------------------------- /content/en/posts/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Posts" 3 | +++ 4 | -------------------------------------------------------------------------------- /content/zh-cn/pages/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title="页面" 3 | +++ 4 | -------------------------------------------------------------------------------- /content/zh-cn/posts/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "文章" 3 | +++ 4 | -------------------------------------------------------------------------------- /config/preview/config.zh-cn.toml: -------------------------------------------------------------------------------- 1 | title = "LoongArch 开放社区-网站预览" 2 | -------------------------------------------------------------------------------- /config/production/config.toml: -------------------------------------------------------------------------------- 1 | baseURL = "/" 2 | googleAnalytics = "" 3 | -------------------------------------------------------------------------------- /content/en/posts/shortcodes/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Shortcode" 3 | +++ 4 | -------------------------------------------------------------------------------- /content/zh-cn/posts/shortcodes/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Shortcode" 3 | +++ 4 | -------------------------------------------------------------------------------- /config/_default/config.zh-cn.toml: -------------------------------------------------------------------------------- 1 | title = "LoongArch 开放社区" 2 | hasCJKLanguage = true 3 | -------------------------------------------------------------------------------- /content/en/search/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Search" 3 | layout = "search" 4 | +++ 5 | -------------------------------------------------------------------------------- /content/zh-cn/search/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "搜索" 3 | layout = "search" 4 | +++ 5 | -------------------------------------------------------------------------------- /static/images/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/static/images/banner.jpg -------------------------------------------------------------------------------- /static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/static/images/logo.png -------------------------------------------------------------------------------- /static/images/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/static/images/logo2.png -------------------------------------------------------------------------------- /static/images/markdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/static/images/markdown.png -------------------------------------------------------------------------------- /static/images/shortcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/static/images/shortcode.png -------------------------------------------------------------------------------- /static/images/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/static/images/favicons/favicon.ico -------------------------------------------------------------------------------- /static/images/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/static/images/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /config/preview/config.toml: -------------------------------------------------------------------------------- 1 | baseURL = "https://preview.loongarch.dev" 2 | title = "LoongArch Opensource Community - Website Preview" 3 | -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/1.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/10.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/11.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/12.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/13.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/14.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/15.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/16.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/17.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/18.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/19.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/2.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/20.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/21.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/22.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/23.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/3.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/4.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/5.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/6.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/7.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/8.png -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20200820-ccf-aca/9.png -------------------------------------------------------------------------------- /layouts/docs/list.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | {{ partial "list" . }} 4 |
5 | {{ end }} 6 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "themes/hugo-theme-bootstrap"] 2 | path = themes/hugo-theme-bootstrap 3 | url = https://github.com/razonyang/hugo-theme-bootstrap 4 | -------------------------------------------------------------------------------- /content/zh-cn/posts/20210501-loongarch-manual/1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20210501-loongarch-manual/1.webp -------------------------------------------------------------------------------- /content/zh-cn/posts/20210501-loongarch-manual/2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20210501-loongarch-manual/2.webp -------------------------------------------------------------------------------- /content/zh-cn/posts/20210501-loongarch-manual/3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20210501-loongarch-manual/3.webp -------------------------------------------------------------------------------- /content/zh-cn/posts/20210501-loongarch-manual/4.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/website/main/content/zh-cn/posts/20210501-loongarch-manual/4.webp -------------------------------------------------------------------------------- /content/en/tags/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Tags" 3 | [menu.main] 4 | weight = 30 5 | pre = '' 6 | url = "tags" 7 | +++ 8 | -------------------------------------------------------------------------------- /content/zh-cn/docs/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "文档" 3 | [menu.main] 4 | weight = 5 5 | pre = '' 6 | url = "docs/" 7 | +++ 8 | -------------------------------------------------------------------------------- /content/zh-cn/tags/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "标签" 3 | [menu.main] 4 | weight = 30 5 | pre = '' 6 | url = "tags" 7 | +++ 8 | -------------------------------------------------------------------------------- /content/en/docs/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Documents" 3 | [menu.main] 4 | weight = 5 5 | pre = '' 6 | url = "docs/" 7 | +++ 8 | -------------------------------------------------------------------------------- /content/en/series/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Series" 3 | [menu.main] 4 | weight = 40 5 | pre = '' 6 | url = "series" 7 | +++ 8 | -------------------------------------------------------------------------------- /content/zh-cn/series/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "专栏" 3 | [menu.main] 4 | weight = 40 5 | pre = '' 6 | url = "series" 7 | +++ 8 | -------------------------------------------------------------------------------- /content/en/hello.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Hello" 3 | date: 2021-01-02T17:45:41+08:00 4 | draft: false 5 | --- 6 | 7 | 8 | # Page1 9 | 10 | 11 | This is page 1. 12 | 13 | -------------------------------------------------------------------------------- /content/zh-cn/categories/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "分类" 3 | [menu.main] 4 | weight = 20 5 | pre = '' 6 | url = "categories" 7 | +++ 8 | -------------------------------------------------------------------------------- /content/en/categories/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Categories" 3 | [menu.main] 4 | weight = 20 5 | pre = '' 6 | url = "categories" 7 | +++ 8 | -------------------------------------------------------------------------------- /static/css/custom.css: -------------------------------------------------------------------------------- 1 | .banner { 2 | max-height: 200px; 3 | margin-bottom: 30px; 4 | } 5 | 6 | .docs #TableOfContents{ 7 | max-height: 750px; 8 | overflow: auto; 9 | } 10 | -------------------------------------------------------------------------------- /config/preview/params.toml: -------------------------------------------------------------------------------- 1 | # Custom CSS and JS 2 | brand = "Preview" 3 | customJS = ["https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js", "js/jquery.watermark.js", "js/custom.js"] 4 | -------------------------------------------------------------------------------- /config/preview/params.zh-cn.toml: -------------------------------------------------------------------------------- 1 | # Custom CSS and JS 2 | brand = "预览" 3 | customJS = ["https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js", "js/jquery.watermark.js", "js/custom.js"] 4 | -------------------------------------------------------------------------------- /content/zh-cn/archives/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "归档" 3 | layout = "archive" 4 | [menu.main] 5 | weight = 10 6 | pre = '' 7 | url = "archives" 8 | +++ 9 | -------------------------------------------------------------------------------- /content/en/archives/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Archives" 3 | layout = "archive" 4 | [menu.main] 5 | weight = 10 6 | pre = '' 7 | url = "archives" 8 | +++ 9 | -------------------------------------------------------------------------------- /config/_default/languages.toml: -------------------------------------------------------------------------------- 1 | [en] 2 | LanguageName = "English" 3 | Weight = 1 4 | contentDir = "content/en" 5 | 6 | [zh-cn] 7 | LanguageName = "简体中文" 8 | Weight = 2 9 | contentDir = "content/zh-cn" 10 | -------------------------------------------------------------------------------- /config/_default/author.toml: -------------------------------------------------------------------------------- 1 | #name = "Razon Yang" 2 | ## avatar = "images/profile.png" # Avatar image. Default to "images/profile.webp". 3 | #bio = "Gopher, PHPer, Full Stack Engineer." 4 | #company = "Null" 5 | #location = "Earth" 6 | -------------------------------------------------------------------------------- /layouts/partials/hooks/sidebar-begin.html: -------------------------------------------------------------------------------- 1 |
2 |

{{ T "manual" }}

3 | 8 |
9 | -------------------------------------------------------------------------------- /config/_default/menu.en.toml: -------------------------------------------------------------------------------- 1 | [[main]] 2 | name = "About" 3 | identifier = "about" 4 | pre = '' 5 | 6 | [[main]] 7 | parent = "about" 8 | name = "Github" 9 | url = "https://github.com/loongarch64/" 10 | pre = '' 11 | -------------------------------------------------------------------------------- /config/_default/menu.zh-cn.toml: -------------------------------------------------------------------------------- 1 | [[main]] 2 | name = "关于" 3 | identifier = "about" 4 | pre = '' 5 | 6 | [[main]] 7 | parent = "about" 8 | name = "Github" 9 | url = "https://github.com/loongarch64/" 10 | pre = '' 11 | -------------------------------------------------------------------------------- /static/js/custom.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('body').watermark({ 3 | texts : ["Preview Website", "LoongArch", "PREVIEW_COMMITID"], 4 | textColor : "#d2d2d2", 5 | textFont : '14px Sans', 6 | width : 150, 7 | height : 150, 8 | textRotate : -30 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /config/_default/highlight.toml: -------------------------------------------------------------------------------- 1 | [highlight] 2 | anchorLineNos = true 3 | codeFences = true 4 | guessSyntax = false 5 | hl_Lines = "" 6 | lineAnchors = "" 7 | lineNoStart = 1 8 | lineNos = false 9 | lineNumbersInTable = true 10 | noClasses = true 11 | style = "dracula" 12 | tabWidth = 2 13 | -------------------------------------------------------------------------------- /view.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | ver=`hugo version|awk '{print $2}'` 4 | version=${ver#v*} 5 | result=`vercmp $version 0.7` 6 | 7 | if [ $result -gt 0 ]; then 8 | hugo --printI18nWarnings --disableFastRender --ignoreCache server 9 | else 10 | hugo --i18n-warnings --disableFastRender --ignoreCache server 11 | fi 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 网站 2 | 3 | https://loongarch.dev 4 | 5 | ## 新建博客 6 | 7 | hugo new content/zh-cn/posts/XXX.md 8 | 9 | ## 新建文档 10 | 11 | hugo new content/zh-cn/docs/XXX.md -k docs 12 | 13 | ## 新建页面 14 | 15 | hugo new content/zh-cn/pages/XXX.md -k page 16 | 17 | ## 运行 18 | 19 | ./view.sh 20 | 21 | ## 预览 22 | 23 | hugo -e preview server 24 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "{{ replace .Name "-" " " | title }}" 3 | author = "" 4 | description = "" 5 | date = {{ .Date }} 6 | draft = true 7 | comment = true 8 | toc = true 9 | reward = true 10 | categories = [ 11 | "" 12 | ] 13 | tags = [ 14 | "" 15 | ] 16 | series = [ 17 | "" 18 | ] 19 | images = [ 20 | "" 21 | ] 22 | +++ 23 | 24 | 25 | -------------------------------------------------------------------------------- /archetypes/page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | author: "" 4 | date: {{ .Date }} 5 | description: "" 6 | comment: true 7 | draft: true 8 | featured: true 9 | reward: true 10 | toc: true 11 | categories: 12 | tags: 13 | series: 14 | images: 15 | menu: 16 | main: 17 | parent: "about" 18 | pre: '' 19 | --- 20 | 21 | 22 | -------------------------------------------------------------------------------- /content/en/posts/shortcodes/jsrun.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "JSRun Shortcode" 3 | date = "2020-10-22" 4 | description = "A detailed description of JSRun shortcode" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "JSRun" 11 | ] 12 | images = [ 13 | ] 14 | +++ 15 | 16 | A detailed description of JSRun shortcode. 17 | 18 | 19 | ## Usage 20 | 21 | ```markdown 22 | {{}} 23 | ``` 24 | 25 | ## Example 26 | 27 | {{< jsrun "QG6Kp" >}} 28 | 29 | -------------------------------------------------------------------------------- /content/en/posts/shortcodes/codepen.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "CodePen Shortcode" 3 | date = "2020-10-22" 4 | description = "A detailed description of CodePen shortcode" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "CodePen" 11 | ] 12 | images = [ 13 | ] 14 | +++ 15 | 16 | A detailed description of CodePen shortcode. 17 | 18 | 19 | ## Usage 20 | 21 | ```markdown 22 | {{}} 23 | ``` 24 | 25 | ## Example 26 | 27 | {{< codepen "YzWGJNQ" >}} 28 | -------------------------------------------------------------------------------- /content/zh-cn/posts/shortcodes/jsrun.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "JSRun Shortcode" 3 | date = "2020-10-22" 4 | description = "关于 JSRun shortcode 的详细说明" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "JSRun" 11 | ] 12 | series = [ 13 | "帮助" 14 | ] 15 | images = [ 16 | ] 17 | draft = true 18 | +++ 19 | 20 | 关于 JSRun shortcode 的详细说明。 21 | 22 | 23 | ## 使用 24 | 25 | ```markdown 26 | {{}} 27 | ``` 28 | 29 | ## 例子 30 | 31 | {{< jsrun "QG6Kp" >}} 32 | 33 | -------------------------------------------------------------------------------- /content/en/posts/shortcodes/youku.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Youku Video Shortcode" 3 | date = "2020-10-22" 4 | description = "A detailed description of Youku shortcode" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "Youku" 11 | ] 12 | images = [ 13 | ] 14 | +++ 15 | 16 | A detailed description of Youku shortcode. 17 | 18 | 19 | ## Usage 20 | 21 | ```markdown 22 | {{}} 23 | ``` 24 | 25 | ## Example 26 | 27 | {{< youku "XNTQwMTgxMTE2" >}} 28 | -------------------------------------------------------------------------------- /content/zh-cn/posts/shortcodes/youku.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "优酷 Shortcode" 3 | date = "2020-10-22" 4 | description = "关于优酷 shortcode 的详细说明" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "Youku" 11 | ] 12 | series = [ 13 | "帮助" 14 | ] 15 | images = [ 16 | ] 17 | draft = true 18 | +++ 19 | 20 | 关于优酷 shortcode 的详细说明。 21 | 22 | 23 | ## 使用 24 | 25 | ```markdown 26 | {{}} 27 | ``` 28 | 29 | ## 例子 30 | 31 | {{< youku "XNTQwMTgxMTE2" >}} 32 | -------------------------------------------------------------------------------- /content/zh-cn/posts/shortcodes/codepen.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "CodePen Shortcode" 3 | date = "2020-10-22" 4 | description = "关于 CodePen shortcode 的详细说明" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "CodePen" 11 | ] 12 | series = [ 13 | "帮助" 14 | ] 15 | images = [ 16 | ] 17 | draft = true 18 | +++ 19 | 20 | 关于 CodePen shortcode 的详细说明。 21 | 22 | 23 | ## 使用 24 | 25 | ```markdown 26 | {{}} 27 | ``` 28 | 29 | ## 例子 30 | 31 | {{< codepen "YzWGJNQ" >}} 32 | -------------------------------------------------------------------------------- /content/zh-cn/posts/shortcodes/bilibili.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Bilibili Shortcode" 3 | date = "2020-10-22" 4 | description = "关于哔哩哔哩 shortcode 的详细使用说明" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "哔哩哔哩" 11 | ] 12 | series = [ 13 | "帮助" 14 | ] 15 | images = [ 16 | ] 17 | draft = true 18 | +++ 19 | 20 | 关于哔哩哔哩 shortcode 的详细使用说明。 21 | 22 | 23 | ## 使用 24 | 25 | ```toml 26 | {{}} 27 | ``` 28 | 29 | ## 例子 30 | 31 | {{< bilibili "BV11s411c7ZU" >}} 32 | -------------------------------------------------------------------------------- /content/zh-cn/posts/shortcodes/tencentvideo.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "腾讯视频 Shortcode" 3 | date = "2020-10-22" 4 | description = "关于腾讯视频 shortcode 的详细说明" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "腾讯视频" 11 | ] 12 | series = [ 13 | "帮助" 14 | ] 15 | images = [ 16 | ] 17 | draft = true 18 | +++ 19 | 20 | 关于腾讯视频 shortcode 的详细说明。 21 | 22 | 23 | ## 使用 24 | 25 | ```markdown 26 | {{}} 27 | ``` 28 | 29 | ## 例子 30 | 31 | {{< tencentvideo "p0015bl11hy" >}} 32 | -------------------------------------------------------------------------------- /content/en/posts/shortcodes/jsfiddle.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "JSFiddle Shortcode" 3 | date = "2020-10-22" 4 | description = "A detailed description of JSFiddle shortcode" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "JSFiddle" 11 | ] 12 | images = [ 13 | ] 14 | +++ 15 | 16 | A detailed description of JSFiddle shortcode. 17 | 18 | 19 | ## Usage 20 | 21 | ```markdown 22 | {{}} 23 | ``` 24 | 25 | ## Example 26 | 27 | {{< jsfiddle "razonyang/bya1vuxn" >}} 28 | -------------------------------------------------------------------------------- /content/en/posts/shortcodes/bilibili.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Bilibili Video Shortcode" 3 | date = "2020-10-22" 4 | description = "A detailed description of Bilibili video shortcode" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "Bilibili" 11 | ] 12 | images = [ 13 | ] 14 | +++ 15 | 16 | A detailed description of Bilibili video shortcode. 17 | 18 | 19 | ## Usage 20 | 21 | ```toml 22 | {{}} 23 | ``` 24 | 25 | ## Example 26 | 27 | {{< bilibili "BV11s411c7ZU" >}} 28 | -------------------------------------------------------------------------------- /content/zh-cn/posts/shortcodes/iqiyi.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "爱奇艺 Shortcode" 3 | date = "2020-10-22" 4 | description = "关于爱奇艺 shortcode 的详细说明" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "爱奇艺" 11 | ] 12 | series = [ 13 | "帮助" 14 | ] 15 | images = [ 16 | ] 17 | draft = true 18 | +++ 19 | 20 | 关于爱奇艺 shortcode 的详细说明。 21 | 22 | 23 | ## 使用 24 | 25 | ```markdown 26 | {{}} 27 | ``` 28 | 29 | ## 例子 30 | 31 | {{< iqiyi "e2ad67ca24d1e205fb0b87eb243f467d" "567349400" >}} 32 | -------------------------------------------------------------------------------- /content/zh-cn/pages/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "关于本站" 3 | date: 2021-01-02T12:03:50+08:00 4 | description: "关于本站的介绍" 5 | comment: false 6 | draft: false 7 | featured: true 8 | reward: false 9 | menu: 10 | main: 11 | parent: "about" 12 | pre: '' 13 | categories: 14 | tags: 15 | series: 16 | images: 17 | --- 18 | 19 | 20 | 21 | 在2020年CCF全国计算机体系结构学术年会(ACA,Advanced Computer Architecture)上,胡伟武研究员首次提出了LoongArch自主指令集架构,龙芯3A5000 是第一款支持LoongArch指令集的CPU产品。 22 | 23 | 本社区将围绕LoongArch指令集,完善Linux软件生态。 24 | -------------------------------------------------------------------------------- /content/zh-cn/posts/shortcodes/jsfiddle.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "JSFiddle Shortcode" 3 | date = "2020-10-22" 4 | description = "关于 JSFiddle shortcode 的详细说明" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "JSFiddle" 11 | ] 12 | series = [ 13 | "帮助" 14 | ] 15 | images = [ 16 | ] 17 | draft = true 18 | +++ 19 | 20 | 关于 JSFiddle shortcode 的详细说明。 21 | 22 | 23 | ## 使用 24 | 25 | ```markdown 26 | {{}} 27 | ``` 28 | 29 | ## 例子 30 | 31 | {{< jsfiddle "razonyang/bya1vuxn" >}} 32 | -------------------------------------------------------------------------------- /content/en/posts/shortcodes/tencentvideo.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Tencent Video Shortcode" 3 | date = "2020-10-22" 4 | description = "A detailed description of Tencent video shortcode" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "Tencent Video" 11 | ] 12 | images = [ 13 | ] 14 | +++ 15 | 16 | A detailed description of Tencent video shortcode. 17 | 18 | 19 | ## Usage 20 | 21 | ```markdown 22 | {{}} 23 | ``` 24 | 25 | ## Example 26 | 27 | {{< tencentvideo "p0015bl11hy" >}} 28 | -------------------------------------------------------------------------------- /content/en/posts/shortcodes/iqiyi.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "iQIYI Video Shortcode" 3 | date = "2020-10-22" 4 | description = "A detailed description of iQIYI Video shortcode" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "iQIYI" 11 | ] 12 | images = [ 13 | ] 14 | +++ 15 | 16 | A detailed description of iQIYI Video shortcode. 17 | 18 | 19 | ## Usage 20 | 21 | ```markdown 22 | {{}} 23 | ``` 24 | 25 | ## Example 26 | 27 | {{< iqiyi "e2ad67ca24d1e205fb0b87eb243f467d" "567349400" >}} 28 | -------------------------------------------------------------------------------- /config/_default/social.toml: -------------------------------------------------------------------------------- 1 | # vim: ft=conf 2 | #email = "user@domain.tld" 3 | #facebook = "facebookusername" 4 | github = "loongarch64" 5 | #gitlab = "gitlabusername" 6 | #linkedin = "linkedinusername" 7 | #stackoverflow = "stackoverflowuserid" 8 | #twitter = "twitterusername" 9 | #weibo = "weibousername" 10 | #zhihu = "zhihuusername" 11 | #instagram = "instagramusername" 12 | #quora = "quorausername" 13 | #tumblr = "tumblrusername" 14 | #reddit = "redditusername" 15 | #telegram = "telegramusername" 16 | #qq = "qqnumber" 17 | #dockerhub = "dockerhubusername" 18 | #bitbucket = "bitbucketworkspaceid" 19 | -------------------------------------------------------------------------------- /content/zh-cn/posts/shortcodes/neteasemusic.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "网易云音乐 Shortcode" 3 | date = "2020-10-22" 4 | description = "网易云音乐 Shortcode 的详细说明" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "网易云音乐" 11 | ] 12 | series = [ 13 | "帮助" 14 | ] 15 | images = [ 16 | ] 17 | draft = true 18 | +++ 19 | 20 | 关于网易云音乐 Shortcode 的详细使用说明。 21 | 22 | 23 | ## 使用 24 | 25 | ```markdown 26 | {{}} 27 | ``` 28 | 29 | | Parameter | Description | 30 | |---|---| 31 | | `auto` | The `auto` controls whether to autoplay. Boolean and optional, default to `false`. 32 | | `type` | The `type` parameter is optional. Default to `2`. 33 | 34 | ## 例子 35 | 36 | {{< neteasemusic "24953439" false >}} 37 | -------------------------------------------------------------------------------- /content/en/posts/shortcodes/neteasemusic.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Netease Music Shortcode" 3 | date = "2020-10-22" 4 | description = "A detailed description of Netease music shortcode" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "Netease Music" 11 | ] 12 | images = [ 13 | ] 14 | +++ 15 | 16 | A detailed description of Netease music shortcode. 17 | 18 | 19 | ## Usage 20 | 21 | ```markdown 22 | {{}} 23 | ``` 24 | 25 | | Parameter | Description | 26 | |---|---| 27 | | `auto` | The `auto` controls whether to autoplay. Boolean and optional, default to `false`. 28 | | `type` | The `type` parameter is optional. Default to `2`. 29 | 30 | ## Example 31 | 32 | {{< neteasemusic "24953439" false >}} 33 | -------------------------------------------------------------------------------- /layouts/partials/post/meta.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{ .Date.Format (default "Jan 2, 2006" $.Site.Params.dateFormat) }} 4 | 5 | {{- if .Params.Author -}} 6 | 7 | {{ .Params.Author }} 8 | 9 | {{- end -}} 10 | 11 | {{ i18n "reading_time" . }} 12 | 13 | {{- partial "post/translations" . -}} 14 | {{- range $key, $value := .Site.Taxonomies -}} 15 | {{- range ($.GetTerms $key) -}} 16 | #{{ .Name }} 17 | {{- end -}} 18 | {{- end -}} 19 |
20 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: deploy 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - name: Check out main 13 | uses: actions/checkout@v2 14 | with: 15 | fetch-depth: 1 16 | submodules: true 17 | 18 | - name: Setup Hugo 19 | uses: peaceiris/actions-hugo@v2 20 | with: 21 | hugo-version: '0.79.1' 22 | # extended: true 23 | 24 | - name: Build 25 | run: hugo --minify --cleanDestinationDir 26 | 27 | - name: Deploy 28 | uses: peaceiris/actions-gh-pages@v3 29 | with: 30 | github_token: ${{ secrets.GITHUB_TOKEN }} 31 | allow_empty_commit: true 32 | publish_dir: ./public 33 | cname: loongarch.dev 34 | force_orphan: true 35 | -------------------------------------------------------------------------------- /content/en/posts/math-typesetting.md: -------------------------------------------------------------------------------- 1 | --- 2 | author: Hugo Authors 3 | title: Math Typesetting 4 | date: 2019-03-08 5 | description: A brief guide to setup KaTeX 6 | math: true 7 | categories: 8 | tags: 9 | - Math 10 | --- 11 | 12 | Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. 13 | 14 | 15 | This theme supports [KaTeX](https://katex.org/). 16 | 17 | - To enable KaTex globally set the parameter `math` to `true` in a project's configuration 18 | - To enable KaTex on a per page basis include the parameter `math: true` in content files 19 | 20 | **Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) 21 | 22 | ## Examples 23 | 24 | $$ 25 | \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\) 26 | $$ 27 | 28 | $$ 29 | \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } 30 | $$ 31 | -------------------------------------------------------------------------------- /config/_default/params.zh-cn.toml: -------------------------------------------------------------------------------- 1 | dateFormat = "2006-01-02" 2 | description = "一个极快、响应式和功能丰富的 Hugo 博客主题" 3 | [archive] 4 | dateFormat = "01-02" 5 | 6 | [[links]] 7 | name = "龙芯架构参考手册 - 卷一:基础架构" 8 | url = "https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-Vol1-v1.00-CN.pdf" 9 | 10 | [[links]] 11 | name = "龙芯 3A5000/3B5000 处理器寄存器使用手册" 12 | url = "https://github.com/loongson/LoongArch-Documentation/releases/latest/download/Loongson-3A5000-usermanual-v1.02-CN.pdf" 13 | 14 | [[links]] 15 | name = "龙芯 7A1000 桥片用户手册" 16 | url = "https://github.com/loongson/LoongArch-Documentation/releases/latest/download/Loongson-7A1000-usermanual-v2.00-CN.pdf" 17 | 18 | [[links]] 19 | name = "龙芯架构 ELF psABI" 20 | url = "https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-CN.html" 21 | 22 | [[links]] 23 | name = "龙芯架构工具链约定" 24 | url = "https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-CN.html" 25 | -------------------------------------------------------------------------------- /content/zh-cn/posts/20200820-ccf-aca/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "指令系统的自主与兼容" 3 | description = "" 4 | date = 2020-08-20T23:35:23+08:00 5 | draft = false 6 | comment = true 7 | toc = true 8 | reward = true 9 | categories = [ 10 | "" 11 | ] 12 | tags = [ 13 | "新闻" 14 | ] 15 | +++ 16 | 17 | 2020年8月13日上午10:30分,CCF全国计算机体系结构学术年会(ACA,Advanced Computer Architecture)上, 胡伟武研究员作了《指令系统的自主与兼容》报告。 18 | 19 | 20 | 21 | {{< bilibili "BV1BK411T7Za" >}} 22 | 23 | ## 报告主要内容展示 24 | 25 | ![](1.png) 26 | 27 | ![](2.png) 28 | 29 | ![](3.png) 30 | 31 | ![](4.png) 32 | 33 | ![](5.png) 34 | 35 | ![](6.png) 36 | 37 | ![](7.png) 38 | 39 | ![](8.png) 40 | 41 | ![](9.png) 42 | 43 | ![](10.png) 44 | 45 | ![](11.png) 46 | 47 | ![](12.png) 48 | 49 | ![](13.png) 50 | 51 | ![](14.png) 52 | 53 | ![](15.png) 54 | 55 | ![](16.png) 56 | 57 | ![](17.png) 58 | 59 | ![](18.png) 60 | 61 | ![](19.png) 62 | 63 | ![](20.png) 64 | 65 | ![](21.png) 66 | 67 | ![](22.png) 68 | 69 | ![](23.png) 70 | -------------------------------------------------------------------------------- /content/zh-cn/posts/shortcodes/alert.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Alert Shortcode" 3 | date = "2020-10-22" 4 | description = "关于 Alert Shortcode 的详细描述" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "Alert" 11 | ] 12 | series = [ 13 | "帮助" 14 | ] 15 | images = [ 16 | ] 17 | draft = true 18 | +++ 19 | 20 | 本文展示了如果使用 `alert` shortcode。 21 | 22 | 23 | ```markdown 24 | {{}} 25 | ``` 26 | 27 | > The parameter `type` is optional. Default to `info`. 28 | 29 | ## Info 30 | 31 | ```markdown 32 | {{}} 33 | ``` 34 | 35 | {{< alert "Info" >}} 36 | 37 | ## Success 38 | 39 | ```markdown 40 | {{}} 41 | ``` 42 | 43 | {{< alert "Success" success >}} 44 | 45 | ## Warning 46 | 47 | ```markdown 48 | {{}} 49 | ``` 50 | 51 | {{< alert "Warning" warning >}} 52 | 53 | ## Danger 54 | 55 | ```markdown 56 | {{}} 57 | ``` 58 | 59 | {{< alert "Danger" danger >}} 60 | -------------------------------------------------------------------------------- /content/en/posts/shortcodes/alert.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Alert Shortcode" 3 | date = "2020-10-22" 4 | description = "A detailed description of Alert shortcode" 5 | featured = false 6 | categories = [ 7 | "Shortcode" 8 | ] 9 | tags = [ 10 | "Alert" 11 | ] 12 | series = [ 13 | "User Manual" 14 | ] 15 | images = [ 16 | ] 17 | +++ 18 | 19 | This article shows how to use the `alert` shortcode. 20 | 21 | 22 | ```markdown 23 | {{}} 24 | ``` 25 | 26 | > The parameter `type` is optional. Default to `info`. 27 | 28 | ## Info 29 | 30 | ```markdown 31 | {{}} 32 | ``` 33 | 34 | {{< alert "Info" >}} 35 | 36 | ## Success 37 | 38 | ```markdown 39 | {{}} 40 | ``` 41 | 42 | {{< alert "Success" success >}} 43 | 44 | ## Warning 45 | 46 | ```markdown 47 | {{}} 48 | ``` 49 | 50 | {{< alert "Warning" warning >}} 51 | 52 | ## Danger 53 | 54 | ```markdown 55 | {{}} 56 | ``` 57 | 58 | {{< alert "Danger" danger >}} 59 | -------------------------------------------------------------------------------- /config/_default/config.toml: -------------------------------------------------------------------------------- 1 | baseURL = "https://loongarch.dev/" 2 | #baseURL = "/" 3 | title = "LoongArch Opensource community" 4 | theme = "hugo-theme-bootstrap" 5 | copyright = "Copyright © 2016-{year} Community Team. All Rights Reserved." 6 | 7 | # Multilingual mode 8 | defaultContentLanguage = "zh-cn" 9 | defaultContentLanguageInSubdir = true 10 | 11 | # Pagination 12 | paginate = 8 13 | # paginatePath = "page" 14 | 15 | # Disqus 16 | # disqusShortname = "yourdiscussshortname" 17 | 18 | # Google analytics 19 | # googleAnalytics = "UA-123-45" 20 | destination = "./public" 21 | 22 | enableRobotsTXT = true 23 | 24 | enableEmoji = true 25 | 26 | [blackfriday] 27 | hrefTargetBlank = true 28 | 29 | [outputs] 30 | home = ["HTML", "RSS", "JSON"] 31 | 32 | [taxonomies] 33 | category = "categories" 34 | series = "series" 35 | tag = "tags" 36 | 37 | [markup.asciidocext] 38 | backend = 'html5' 39 | extensions = [] 40 | failureLevel = 'fatal' 41 | noHeaderOrFooter = true 42 | preserveTOC = true 43 | safeMode = 'unsafe' 44 | sectionNumbers = false 45 | trace = false 46 | verbose = false 47 | workingFolderCurrent = true 48 | # vim: ft=conf ts=2 sw=2 et 49 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{- block "title" . -}}{{- partial "head/title" . -}}{{- end -}} 7 | {{- partial "head.html" . -}} 8 | {{- block "head-end" . -}}{{- end -}} 9 | {{- partial "hooks/head-end" . -}} 10 | 11 | 12 | {{- partial "header.html" . -}} 13 | {{- partial "hooks/main-begin" . -}} 14 |
15 |
16 | {{- if .Site.Params.banner -}} 17 | 18 | {{- end -}} 19 |
20 |
21 | {{- block "content" . -}}{{- end -}} 22 |
23 |
24 | {{- partial "hooks/main-end" . -}} 25 | {{- partial "footer.html" . -}} 26 | {{- partial "body-end" . -}} 27 | 28 | 29 | -------------------------------------------------------------------------------- /content/en/posts/rich-content.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Rich Content" 4 | date = "2019-03-10" 5 | description = "A brief description of Hugo Shortcodes" 6 | featured = true 7 | categoories = [ 8 | "Shortcode" 9 | ] 10 | tags = [ 11 | "Instagram", 12 | "YouTube", 13 | "Twitter", 14 | "Vimeo", 15 | "Privacy", 16 | ] 17 | images = [ 18 | ] 19 | +++ 20 | 21 | Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds. 22 | 23 | --- 24 | 25 | ## Instagram Simple Shortcode 26 | 27 | ```markdown 28 | {{}} 29 | ``` 30 | 31 |
32 | 33 | --- 34 | 35 | ## YouTube Privacy Enhanced Shortcode 36 | 37 | ```markdown 38 | {{}} 39 | ``` 40 | 41 |
42 | 43 | --- 44 | 45 | ## Twitter Simple Shortcode 46 | 47 | ```markdown 48 | {{}} 49 | ``` 50 | 51 |
52 | 53 | --- 54 | 55 | ## Vimeo Simple Shortcode 56 | 57 | ```markdown 58 | {{}} 59 | ``` 60 | -------------------------------------------------------------------------------- /.github/workflows/preview.yml: -------------------------------------------------------------------------------- 1 | name: website-preview 2 | 3 | on: 4 | pull_request: 5 | branches: [ main ] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - name: Check out main 13 | uses: actions/checkout@v2 14 | with: 15 | fetch-depth: 1 16 | submodules: true 17 | 18 | - name: Setup Hugo 19 | uses: peaceiris/actions-hugo@v2 20 | with: 21 | hugo-version: '0.79.1' 22 | # extended: true 23 | 24 | - name: Build 25 | run: hugo --minify --environment preview --cleanDestinationDir 26 | 27 | - name: Deploy 28 | uses: peaceiris/actions-gh-pages@v3 29 | with: 30 | deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} 31 | external_repository: loongarch64/website-preview 32 | allow_empty_commit: true 33 | publish_dir: ./public 34 | cname: preview.loongarch.dev 35 | #force_orphan: true 36 | 37 | - name: Update status 38 | uses: Sibz/github-status-action@v1 39 | with: 40 | authToken: ${{secrets.GITHUB_TOKEN}} 41 | context: 'website-preview / deploy (update)' 42 | description: 'Deployed, click "Details" to view ->' 43 | state: 'success' 44 | target_url: https://preview.loongarch.dev 45 | sha: ${{github.event.pull_request.head.sha || github.sha}} 46 | 47 | -------------------------------------------------------------------------------- /content/en/about/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "About" 3 | description = "Hugo, the world's fastest framework for building websites" 4 | date = "2019-02-28" 5 | aliases = ["about-us", "about-hugo", "contact"] 6 | author = "Hugo Authors" 7 | reward = false 8 | +++ 9 | 10 | Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows. 11 | 12 | Hugo makes use of a variety of open source projects including: 13 | 14 | * https://github.com/yuin/goldmark 15 | * https://github.com/alecthomas/chroma 16 | * https://github.com/muesli/smartcrop 17 | * https://github.com/spf13/cobra 18 | * https://github.com/spf13/viper 19 | 20 | Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages. 21 | 22 | Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases. 23 | 24 | Websites built with Hugo are extremelly fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. 25 | 26 | Learn more and contribute on [GitHub](https://github.com/gohugoio). 27 | -------------------------------------------------------------------------------- /layouts/docs/single.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 |
4 | {{- partial "breadcrumb" . -}} 5 |
6 |
7 | 24 |
25 |
26 |
27 |

{{ .Title }}

28 | {{- partial "post/meta" . -}} 29 | {{- partial "hooks/content-begin" . -}} 30 | {{- partial "post/share" . -}} 31 |
32 | {{- .Content -}} 33 |
34 | {{- partial "post/copyright" . -}} 35 | {{- partial "post/reward" . -}} 36 | {{- partial "hooks/content-end" . -}} 37 | {{- partial "post/nav" . -}} 38 | {{- partial "post/related-posts" . -}} 39 |
40 | {{- partial "post/comments" . -}} 41 |
42 |
43 | {{ end }} 44 | -------------------------------------------------------------------------------- /content/en/posts/emoji-support.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Emoji Support" 4 | date = "2019-03-05" 5 | description = "Guide to emoji usage in Hugo" 6 | categories = [ 7 | ] 8 | tags = [ 9 | "Emoji", 10 | ] 11 | +++ 12 | 13 | Emoji can be enabled in a Hugo project in a number of ways. 14 | 15 | The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). 16 | 17 | To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. 18 | 19 |

🙈 :see_no_evil: 🙉 :hear_no_evil: 🙊 :speak_no_evil:

20 |
21 | 22 | The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes. 23 | 24 | *** 25 | 26 | **N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. 27 | 28 | {{< highlight html >}} 29 | .emoji { 30 | font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; 31 | } 32 | {{< /highlight >}} 33 | 34 | {{< css.inline >}} 35 | 48 | {{< /css.inline >}} 49 | -------------------------------------------------------------------------------- /content/zh-cn/posts/20210508-upstream-community.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "2021年一季度社区动态" 3 | description = "2021年一季度社区动态" 4 | date = 2021-05-08T12:35:00+08:00 5 | draft = false 6 | comment = true 7 | toc = false 8 | reward = false 9 | categories = [ 10 | "" 11 | ] 12 | tags = [ 13 | "新闻" 14 | ] 15 | +++ 16 | 17 | 2021年一季度,上游社区陆续合并了file、meson、cmake的LoongArch补丁。 18 | 19 | 20 | 21 | ## meson 22 | 23 | Meson(The Meson Build System)是个项目构建系统,语法设计简单、清晰、简洁,用户友好、编译速度快(使用ninja),提供了更多现代特性,如单元测试(unit testing)、代码覆盖率报告(code coverage reporting)、头文件预编译(precompiled headers),交叉编译,众多语言和开发框架支持等,大量的社区项目已采用 meson 来做为构建系统。 24 | 25 | 对LoongArch的支持补丁已[提交](https://github.com/mesonbuild/meson/pull/8300)上游社区,从2月15日发布的 [meson-0.57.0](https://github.com/mesonbuild/meson/releases/tag/0.57.0) 版本开始已经默认支持LoongArch架构。 26 | 27 | ## file 28 | 29 | file 是Linux/Unix 系统中的常用命令,用来识别文件类型,文件编码等信息。 30 | 31 | LoongArch架构的可执行文件,由于不被支持,因此查看文件类型时,会显示为 **unknown arch**。 32 | 33 | ``` 34 | $ file /bin/ls 35 | /bin/ls: ELF 64-bit LSB pie executable, *unknown arch 0x102* version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=6e2d68b5bdd6ac78429a85a13c89b52eba76fb3d, stripped 36 | ``` 37 | 38 | Xiaotian Wu 提交的[补丁](https://github.com/file/file/pull/103),希望可以显示为 **LoongArch**: 39 | 40 | ``` 41 | $ file /bin/ls 42 | /bin/ls: ELF 64-bit LSB pie executable, LoongArch, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=6e2d68b5bdd6ac78429a85a13c89b52eba76fb3d, stripped 43 | 44 | ``` 45 | 46 | 而在 file 维护者参考上游 binutils-gdb 仓库做了一番[id更新](https://github.com/file/file/commit/b22b7780034cf845bbdf4beeab15e69e494a2001) 操作之后,最终显示为 **Loongson Loongarch**: 47 | 48 | ``` 49 | $ file /bin/ls 50 | /bin/ls: ELF 64-bit LSB pie executable, Loongson Loongarch, version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 4.15.0, BuildID[sha1]=6e2d68b5bdd6ac78429a85a13c89b52eba76fb3d, stripped 51 | 52 | ``` 53 | 54 | 3月31日发布的 [file-40](https://github.com/file/file/releases/tag/FILE5_40) 版本已经支持LoongArch架构。 55 | 56 | ## cmake 57 | 58 | CMake是个一个开源的跨平台自动化构建系统,是用来管理软件构建的程序,不依赖于特定编译器,可支持多层目录、多个应用程序与多个库。 59 | 60 | 对LoongArch的支持[补丁](https://gitlab.kitware.com/utils/kwiml/-/merge_requests/4)已[提交](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6032)上游,预计最早将于 [3.20.2](https://gitlab.kitware.com/cmake/cmake/-/milestones/88) 版本中对外发布。 61 | -------------------------------------------------------------------------------- /content/zh-cn/posts/20210501-loongarch-manual/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "LoongArch指令集手册发布" 3 | description = "LoongArch指令集手册发布" 4 | date = 2021-05-01T09:00:00+08:00 5 | draft = false 6 | comment = true 7 | toc = false 8 | reward = false 9 | categories = [ 10 | "" 11 | ] 12 | tags = [ 13 | "新闻" 14 | ] 15 | +++ 16 | 17 | 2021年4月15日,龙芯小范围发布了指令集手册,以收集反馈意见。4月30日,龙芯正式发布了龙芯架构指令集手册V1.00。 18 | 19 | 20 | 21 | 龙芯胡伟武在2020年8月参加CCF全国计算机体系结构学术年会时,曾披露龙芯将放弃MIPS架构,转向完全自主知识产权的LoongArch指令集,并做了[《指令系统的自主与兼容》特邀报告](https://www.bilibili.com/video/BV1BK411T7Za) 来介绍这一全新架构的设计思路。 22 | 23 | 该设计增加了支持生产级应用的向量指令集,并且能够以二进制翻译的方式兼容MIPS/RISC-V/ARM/x86这几种指令集的Linux程序,并且翻译MIPS指令集时损耗非常小。 24 | 25 | 核心态方面:硬件能够支持两级地址翻译,x86→LoongArch,虚地址→物理地址(通过改造内存快表TLB,做到两级虚地址映射以减少映射开销,以及减少指令使用/指令翻译开销,即X86虚地址直接翻译成龙芯物理地址),面积和延迟开销都不大;以及,地址空间、中断处理等方面支持OS跨主板和对升级后的CPU兼容; 26 | 27 | 用户态方面:功能上针对MIPS、X86、ARM、RISC-V的特征,绝大多数指令可以做到1对1或1对2翻译;还包括对X86的EFLAGS支持、RISC-V的原子同步指令支持;以及,ABI方面支持X86/MIPS系统调用兼容,支持MIPS汇编码直接翻译成LoongArch二进制。 28 | 29 | 为了完成这样的设计,龙芯架构定义了2500多条指令,但还预留了一半的一级指令槽,未来可以继续扩展。 30 | 31 | ![](1.webp) 32 | 33 | 34 | 胡伟武在演讲中介绍,在翻译运行X86应用时,开源的QEMU仅能达到5%的性能,而龙芯架构现在超过60%,优化后的目标是80%;翻译安卓ARM应用时,可以流畅运行移动版WPS和美图秀秀等。 35 | 36 | ![](2.webp) 37 | 38 | 龙芯此前使用的是MIPS指令集的授权,该授权允许龙芯自己修改,但不允许转授权,甚至不允许公布指令集手册,否则就将侵权。尽管龙芯已经是MIPS生态中性能最好的,但却仍然受制于人,不能自主引领生态。龙芯曾于2015年发布LoongISA指令集架构,该架构包括MIPS64 Release 2全套指令集和MIPS64 Release 5中的部分指令模块,以及其他一系列龙芯中科自主扩展的指令集。但由于从未公布过指令集手册,导致开发者实际上很难使用这些扩展指令集,这也是龙芯历年来在一系列性能测试中,官方发布的成绩总是不能由外界复现的原因。 39 | 40 | 2021年4月,拥有MIPS指令集的Wave Computing公司投向RISC-V阵营。龙芯也终于开始正式脱离MIPS生态。此次发布的LoongArch指令集是完全自主知识产权的。为此,龙芯公司还委托国内第三方知名知识产权评估机构对龙芯基础架构进行深入细致的知识产权评估。从2020年二季度开始,双方投入上百人月,将LoongArch与ALPHA、ARM、MIPS、POWER、RISC-V、X86等国际上主要指令系统有关资料和几万件专利进行深入对比分析。2021年1月,针对被评估的基础架构版本,该评估机构认为:LoongArch在指令系统设计、指令格式、指令编码、寻址模式等方面进行了自主设计。LoongArch指令系统手册在章节结构、指令说明结构和指令内容表达方面与上述国际上主要指令系统存在明显区别。LoongArch基础架构未发现对上述国际上主要指令系统中国专利的侵权风险。 41 | 42 | ![](3.webp) 43 | 44 | 2021年4月15日,龙芯小范围发布了指令集手册,以收集反馈意见。4月30日,龙芯正式发布了[龙芯架构指令集手册V1.00](http://www.loongson.cn/uploadfile/cpu/LoongArch.pdf)。 45 | 46 | ![](4.webp) 47 | 48 | 龙芯架构采用基础部分加扩展部分的模块化组织形式。一个兼容龙芯架构的CPU,除实现必需的基础部分外,可根据实际需求选择实现各扩展部分。此次对外发布的[《龙芯架构参考手册卷一:基础架构(V1.00)》](http://www.loongson.cn/uploadfile/cpu/LoongArch.pdf)主要介绍龙芯架构中的基础部分。 49 | 50 | 手册引言部分对龙芯架构进行了整体概述,介绍了指令编码格式、汇编助记格式等基本内容。手册的主体部分从非特权指令集和特权指令集两个方面对龙芯架构的基础部分展开描述,其中非特权指令集部分介绍了基础整数指令和基础浮点指令两类指令的应用程序编程模型、各指令的指令格式及其功能描述,特权指令集部分从特权资源整体架构、存储管理、例外与中断以及状态控制寄存器四个方面分别展开介绍。 51 | 52 | 此次与[《龙芯架构参考手册卷一:基础架构(V1.00)》](http://www.loongson.cn/uploadfile/cpu/LoongArch.pdf)同步发布的有[《龙芯架构32位精简版参考手册(V1.00)》](http://www.loongson.cn/uploadfile/cpu/LoongsonArch32.pdf) 。龙芯架构32位精简版是对龙芯架构32位基础部分的进一步简化,必选指令条数仅50余条,易于实现,将面向教学和科研领域开源推广。 53 | -------------------------------------------------------------------------------- /content/zh-cn/posts/20200127-binutils-and-autotools.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "上游优先,迈出第一步" 3 | description = "LoongArch生态建设起步" 4 | date = 2021-01-27T20:35:23+08:00 5 | draft = false 6 | comment = true 7 | toc = false 8 | reward = false 9 | categories = [ 10 | "" 11 | ] 12 | tags = [ 13 | "新闻" 14 | ] 15 | +++ 16 | 17 | 随着龙芯 3A5000 CPU 的研制成功,带来了新的 LoongArch 指令集,虽然这个全新的指令集自主化程度很高, 18 | 但同时也意味着没有任何的社区支持,没有任何软件可以直接支持,想要建设生态,一切需要从头开始, 19 | 这是一项艰巨、繁重而且需要长期坚持和投入的任务。 20 | 21 | 22 | 23 | 所幸,龙芯已经充分认识到了这个问题,从 LoongArch 开始,将坚持 **上游优先(upstream first)** 策略, 24 | 以更加开放的心态,积极参与社区项目,完善软件生态。 25 | 26 | 从社区的一些迹象来看,龙芯已经开始向上游合并补丁了,算是上游优先策略迈出了第一步。 27 | 28 | ## Binutils 29 | 30 | 2020年8月17日,Xu Chenghua 发出了第一封关于LoongArch的[邮件](https://sourceware.org/pipermail/binutils/2020-August/112855.html),要求为龙芯保留 253~256 Machine numbers, 31 | 经过几轮沟通,最终上游将 258 分配给了 LoongArch 架构,并于 2020年12月13日正式合并到主分支。 32 | 33 | https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=4cf2ad720078a9f490dd5b5bc8893a926479196e 34 | 35 | ## GNU Autotools 36 | 37 | GNU Autotools 是POSIX系统中重要的软件构建套件,它支持将自由软件构建和安装到正在运行的系统中。 38 | 39 | 相信玩过 Linux 的人,都知道经典的Linux软件编译三步曲: 40 | 41 | ``` 42 | ./configure 43 | make 44 | make install 45 | ``` 46 | 47 | 在 `./configure` 阶段,Autotools 会扫描宿主机系统(即当前正在运行的计算机)以进行各种测试并完成默认设置。 48 | 49 | 在测试过程中,有一项是系统架构测试,当在陌生的新架构中运行时,`./configure` 将报错并退出,导致无法完成软件编译。 50 | 51 | 其中最关键的2个架构相关文件为:`config.guess` 和 `config.sub`。 52 | 53 | ### config.git 54 | 55 | GNU Autotools 套件中 `config.guess` 和`config.sub`,被独立维护在为 [config.git](https://git.savannah.gnu.org/gitweb/?p=config.git;a=summary) 仓库。 56 | 57 | 其他软件如gnulib、automake将不定期从这里获取,并合入自己的代码树中,最终上游开发者通过GNU Autotools打包后,这2个文件将进入tarballs中被发布。 58 | 59 | Wu Xiaotian 提交了与LA架构相关的补丁,并于2020年12月22日被合并到 **config.git** 主分支。 60 | 61 | https://git.savannah.gnu.org/gitweb/?p=config.git;a=commitdiff;h=c8ddc8472f8efcadafc1ef53ca1d863415fddd5f 62 | 63 | ### gnulib 64 | 65 | gnulib 代码被大多数软件直接集成,如 coreutils、grub 等等,目前也已经从 config.git 拉取了相关补丁。 66 | 67 | https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=6f600ec73085df142211bf8505083dcdd59859bb 68 | 69 | https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=4c30b1b0d2ee72d89069b09f4257c30372c5b5a2 70 | 71 | ### automake 72 | 73 | automake 更新较慢,相信下次拉取 config.git 代码后,也会进入主分支,预计1.18版本将会直接支持LoongArch架构。 74 | 75 | automake 的历史版本,社区已经做了架构支持,并维护在以下分支,有需要的话可通过这里获取: 76 | 77 | 1.16: https://github.com/loongarch64/automake/tree/la64/1.16 78 | 79 | 1.16.1: https://github.com/loongarch64/automake/tree/la64/1.16.1 80 | 81 | 1.16.2: https://github.com/loongarch64/automake/tree/la64/1.16.2 82 | 83 | 1.16.3: https://github.com/loongarch64/automake/tree/la64/1.16.3 84 | 85 | 86 | 虽然目前龙芯对于一些重量级的软件,如kernel、gcc、binutils、glibc、qemu等代码,还没有向上游发起合并, 87 | 但相信随着时间的推移,这些软件在准备就绪之后,也会很快合并到上游。 88 | 89 | 要完善LoongArch生态,一个公司的人手和精力显然有限,希望感兴趣的社区爱好者可以参与,共同来建设LoongArch生态。 90 | -------------------------------------------------------------------------------- /content/zh-cn/posts/hugoisforlovers.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Getting Started with Hugo" 3 | description = "" 4 | tags = [ 5 | "go", 6 | "golang", 7 | "hugo", 8 | "development", 9 | ] 10 | date = "2014-04-02" 11 | categories = [ 12 | "Development", 13 | "golang", 14 | ] 15 | keywords = [ 16 | "Hugo", 17 | "static", 18 | "generator", 19 | ] 20 | draft = true 21 | +++ 22 | 23 | ## Step 1. Install Hugo 24 | 25 | Goto [hugo releases](https://github.com/spf13/hugo/releases) and download the 26 | appropriate version for your os and architecture. 27 | 28 | Save it somewhere specific as we will be using it in the next step. 29 | 30 | More complete instructions are available at [installing hugo](/overview/installing/) 31 | 32 | ## Step 2. Build the Docs 33 | 34 | Hugo has its own example site which happens to also be the documentation site 35 | you are reading right now. 36 | 37 | Follow the following steps: 38 | 39 | 1. Clone the [hugo repository](http://github.com/spf13/hugo) 40 | 2. Go into the repo 41 | 3. Run hugo in server mode and build the docs 42 | 4. Open your browser to http://localhost:1313 43 | 44 | Corresponding pseudo commands: 45 | 46 | git clone https://github.com/spf13/hugo 47 | cd hugo 48 | /path/to/where/you/installed/hugo server --source=./docs 49 | > 29 pages created 50 | > 0 tags index created 51 | > in 27 ms 52 | > Web Server is available at http://localhost:1313 53 | > Press ctrl+c to stop 54 | 55 | Once you've gotten here, follow along the rest of this page on your local build. 56 | 57 | ## Step 3. Change the docs site 58 | 59 | Stop the Hugo process by hitting ctrl+c. 60 | 61 | Now we are going to run hugo again, but this time with hugo in watch mode. 62 | 63 | /path/to/hugo/from/step/1/hugo server --source=./docs --watch 64 | > 29 pages created 65 | > 0 tags index created 66 | > in 27 ms 67 | > Web Server is available at http://localhost:1313 68 | > Watching for changes in /Users/spf13/Code/hugo/docs/content 69 | > Press ctrl+c to stop 70 | 71 | 72 | Open your [favorite editor](http://vim.spf13.com) and change one of the source 73 | content pages. How about changing this very file to *fix the typo*. How about changing this very file to *fix the typo*. 74 | 75 | Content files are found in `docs/content/`. Unless otherwise specified, files 76 | are located at the same relative location as the url, in our case 77 | `docs/content/overview/quickstart.md`. 78 | 79 | Change and save this file.. Notice what happened in your terminal. 80 | 81 | > Change detected, rebuilding site 82 | 83 | > 29 pages created 84 | > 0 tags index created 85 | > in 26 ms 86 | 87 | Refresh the browser and observe that the typo is now fixed. 88 | 89 | Notice how quick that was. Try to refresh the site before it's finished building.. I double dare you. 90 | Having nearly instant feedback enables you to have your creativity flow without waiting for long builds. 91 | 92 | ## Step 4. Have fun 93 | 94 | The best way to learn something is to play with it. 95 | -------------------------------------------------------------------------------- /content/en/posts/placeholder-text.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Placeholder Text" 4 | date = "2019-03-09" 5 | description = "Lorem Ipsum Dolor Si Amet" 6 | tags = [ 7 | "Markdown", 8 | "Text", 9 | ] 10 | +++ 11 | 12 | Lorem est tota propiore conpellat pectoribus de pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum. 13 | 14 | 1. Exierant elisi ambit vivere dedere 15 | 2. Duce pollice 16 | 3. Eris modo 17 | 4. Spargitque ferrea quos palude 18 | 19 | Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis. 20 | 21 | 1. Comas hunc haec pietate fetum procerum dixit 22 | 2. Post torum vates letum Tiresia 23 | 3. Flumen querellas 24 | 4. Arcanaque montibus omnes 25 | 5. Quidem et 26 | 27 | # Vagus elidunt 28 | 29 | 30 | 31 | [The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon) 32 | 33 | ## Mane refeci capiebant unda mulcebat 34 | 35 | Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis. 36 | 37 | Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et. 38 | 39 | Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**. 40 | 41 | {{< css.inline >}} 42 | 45 | {{< /css.inline >}} 46 | -------------------------------------------------------------------------------- /config/_default/params.toml: -------------------------------------------------------------------------------- 1 | mainSections = ["posts", "docs"] # Default to ["posts"]. 2 | 3 | # titleSeparator = "|" # Title separator. Default to "-". 4 | 5 | description = "An extreme fast, responsive and feature-rich blog theme for Hugo" 6 | # image = ["site-feature-image.jpg"] 7 | 8 | logo = "images/logo.png" # Logo image. Default to "images/logo.webp". 9 | brand = "LoongArch" 10 | # menusPosition = "left" # Menus position: right(default), left or center. 11 | 12 | banner = "images/banner.jpg" 13 | palette = "blue" # Default palette. Optional. 14 | # palettes = ["blue", "blue gray", "brown"] # Available palettes. Default to ALL. 15 | 16 | # fullWidth = true # Full width. 17 | 18 | # dateFormat = "Jan 2, 2006" 19 | 20 | # Google Adsense 21 | googleAdsense = "" 22 | 23 | # math = true # Enable math globally. 24 | # toc = false # Disable TOC globally. 25 | breadcrumb = false # Disable breadcrumb 26 | 27 | # poweredBy = false # Whether to show powered by. 28 | 29 | # featuredPostCount = 10 # The number of featured posts shown in sidebar. 30 | # recentPostCount = 10 # The number of recent posts shown in sidebar. 31 | # relatedPostCount = 10 # The number of related posts. 32 | # categoryCount = 10 # The number of categories shown in sidebar. 33 | # tagCount = 10 # The number of tags shown in sidebar. 34 | # seriesCount = 10 # The number of series shown in sidebar. 35 | 36 | # Custom CSS and JS 37 | customCSS = ["css/custom.css"] 38 | customJS = [] 39 | 40 | # tocWordCount = 280 # TOC is displayed only if the post's word count exceeds this value. 41 | tocSticky = true # Whether to make TOC stick to top when scrolling. Default to true. 42 | 43 | [archive] 44 | paginate = 8 # Archive pagination. Default to 100. 45 | # dateFormat = "01-02" # Archive date format. Default to "Jan 2". 46 | 47 | [analytics] 48 | # baidu = "" # Baidu Analytics 49 | 50 | # Site verification 51 | [siteVerification] 52 | google = "" 53 | bing = "" 54 | baidu = "" 55 | baiduUnion = "" # Baidu Union 56 | so = "" 57 | sogou = "" 58 | shenma = "" 59 | 60 | [creativeCommons] 61 | # by = true # Credit must be given to you, the creator. 62 | # nc = true # Only noncommercial use of your work is permitted. 63 | # nd = true # No derivatives or adaptations of your work are permitted. 64 | # sa = true # Adaptations must be shared under the same terms. 65 | 66 | [utterances] 67 | repo = "loongarch64/website" 68 | #issueTerm = "pathname" # pathname, url, title, og:title 69 | #label = "comment" 70 | theme = "github-dark" # github-light, github-dark, preferred-color-scheme, github-dark-orange, icy-dark, dark-blue, photon-dark. 71 | 72 | [search] 73 | paginate = 5 # Pagination. Default to 10. 74 | # resultContentWordCount = 240 # The maximum word count of result content for displaying. 75 | # Fuse.js options. See https://fusejs.io/api/options.html. 76 | [search.fuse] 77 | # ignoreLocation = true 78 | # location = 0 79 | # isCaseSensitive = false 80 | # minMatchCharLength = 1 81 | threshold = 0.1 82 | # distance = 100 83 | # useExtendedSearch = true 84 | 85 | [reward] 86 | alipay = "images/reward/alipay.webp" 87 | wechat = "images/reward/wechat.webp" 88 | 89 | [share] 90 | # addThis = "" # AddThis pubid. 91 | 92 | [fontSize] 93 | # extraSmall = ".8rem" 94 | # small = ".9rem" 95 | # large = "1.1rem" 96 | # extraLarge = "1.2rem" 97 | 98 | [[links]] 99 | name = "LoongArch Reference Manual - Volume 1" 100 | url = "https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html" 101 | 102 | [[links]] 103 | name = "Loongson 3A5000/3B5000 Processor Reference Manual" 104 | url = "https://loongson.github.io/LoongArch-Documentation/Loongson-3A5000-usermanual-EN.html" 105 | 106 | [[links]] 107 | name = "Loongson 7A1000 Bridge User Manual" 108 | url = "https://loongson.github.io/LoongArch-Documentation/Loongson-7A1000-usermanual-EN.html" 109 | 110 | [[links]] 111 | name = "LoongArch ELF psABI" 112 | url = "https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html" 113 | 114 | [[links]] 115 | name = "LoongArch toolchain conventions" 116 | url = "https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html" 117 | -------------------------------------------------------------------------------- /content/zh-cn/posts/20210801-upstream-community.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "2021年二季度社区动态" 3 | description = "2021年二季度社区动态" 4 | date = 2021-08-01T14:35:00+08:00 5 | draft = false 6 | comment = true 7 | toc = true 8 | reward = false 9 | categories = [ 10 | "" 11 | ] 12 | tags = [ 13 | "新闻" 14 | ] 15 | +++ 16 | 17 | 2021年二季度,LoongArch 平台的基础软件、开发语言及系统软件正逐步开放并积极向上游提交中... 18 | 19 | 20 | 21 | ## 基础软件 22 | 23 | ### 内核 24 | 25 | 内核经过代码移植和重新整理,目前最新开发版本 5.14 分别维护在以下地址: 26 | 27 | Github 仓库: https://github.com/loongson/linux/tree/loongarch-next 28 | 29 | kernel.org 仓库: https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git/log/?h=loongarch-next 30 | 31 | 为了让内核早日进入主线,Huacai Chen 从 2021 年 7 月 6 日开始,与上游社区进行了多轮沟通,并积极按社区要求对补丁进行修订,期待上游能早日合并。 32 | 33 | 感兴趣可阅读这里: https://lore.kernel.org/linux-arch/20210706041820.1536502-1-chenhuacai@loongson.cn/ 34 | 35 | ### 工具链 36 | 37 | LoongArch 工具链经过紧张的移植、测试,目前已经升级到最新开发版本: 38 | 39 | gcc: https://github.com/loongson/gcc 40 | 41 | binutils: https://github.com/loongson/binutils-gdb 42 | 43 | glibc: https://github.com/loongson/glibc 44 | 45 | 工具链期待更多的测试和反馈,也欢迎各位社区爱好者能参与完善。 46 | 47 | 预编译好的交叉编译工具链及 rootfs 环境,请参见这里: https://github.com/loongson/build-tools 48 | 49 | ### qemu 50 | 51 | https://github.com/loongson/qemu/pull/1 52 | 53 | qemu 的 user-mode 的代码正在开放 review 中。 54 | 55 | 同学们即便暂时没有 3A5000 机器,LoongArch 汇编也可以学起来了。 56 | 57 | ## 开发语言 58 | 59 | ### Go 60 | 61 | https://go-review.googlesource.com/c/go/+/333909 62 | 63 | WANG Xuerui 提交了预留 [GOARCH=loong64](https://github.com/golang/go/pull/47129) 架构的补丁,上游已经审核通过,预计于 go-1.17 版本中发布。 64 | 65 | 龙芯已将先前移植的 go-1.15.6 源码放出,代码仓库: https://github.com/loongson/go 66 | 67 | ### Java 68 | 69 | Ao Qi 为 OpenJDK 提交了最基础的 LoongArch 架构支持,代码已被合并。 70 | 71 | https://github.com/openjdk/jdk/commit/e92e2fd4e0bc805d8f7d70f632cce0282eb1809b 72 | 73 | ## 系统软件 74 | 75 | **bdwgc** 76 | 77 | Zhang Na 提交了与 LoongArch 架构相关的补丁,并于 2021 年 7 月 14 日被合并到主分支。 78 | 79 | https://github.com/ivmai/bdwgc/commit/c86b7fc0750e518d6f85d4f4e95a87bbc309572b 80 | 81 | **botan** 82 | 83 | Zhang Na 提交了与 LoongArch 架构相关的补丁,并于 2021 年 7 月 12 日被合并到主分支。 84 | 85 | https://github.com/randombit/botan/commit/6eb5a8a8c883025cb204c91fd2c1ccafca357364 86 | 87 | **double-conversion** 88 | 89 | houfangdong 提交了与 LoongArch 架构相关的补丁,并于 2021 年 5 月 19 日被合并到主分支。 90 | 91 | https://github.com/google/double-conversion/commit/32bc443c60c860eb6b4843533a614766d611172e 92 | 93 | **file** 94 | 95 | Wu Xiaotian 提交了与 LoongArch 架构相关的补丁,并于 2021 年 5 月 25 日被合并到主分支。 96 | 97 | https://github.com/file/file/commit/0d47491f8f7134940bbd33b98a77a36dff4879b3 98 | 99 | **gsl** 100 | 101 | Zhang Na 提交了与 LoongArch 架构相关的补丁,并于 2021 年 7 月 9 日被合并到主分支。 102 | 103 | https://github.com/zeromq/gsl/commit/780e07ad647dd4ee55444ba83be71af84c8b9ca7 104 | 105 | **hwinfo** 106 | 107 | jinqingchen 提交了与 LoongArch 架构相关的补丁,并于 2021 年 7 月 2 日被合并到主分支。 108 | 109 | https://github.com/openSUSE/hwinfo/pull/100 110 | 111 | **libaio** 112 | 113 | yehui ren 提交了与 LoongArch 架构相关的补丁,并于 2021 年 7 月 20 日被合并到主分支。 114 | 115 | https://pagure.io/libaio/c/48f4fb7d688e26b05c76e3d0fabdefc6c5f66241?branch=master 116 | 117 | https://pagure.io/libaio/c/97076c8a55064e6f34483d41f6bffff3838f5b61?branch=master 118 | 119 | https://pagure.io/libaio/c/de492eef5edf3b6f61d069f1a723d011228ee567?branch=master 120 | 121 | https://pagure.io/libaio/c/d892696468cb99d7d98b23b78bde942df0992d5a?branch=master 122 | 123 | **libmowgli-2** 124 | 125 | zhangjialing 提交了与 LoongArch 架构相关的补丁,并于 2021 年 6 月 4 日被合并到主分支。 126 | 127 | https://github.com/atheme/libmowgli-2/commit/bd45f33c87e1dd4744300a70bbc91c0d04f87c49 128 | 129 | https://github.com/atheme/libmowgli-2/commit/669ec93899b35e464aed1fb503319377a0961cba 130 | 131 | **linux-rdma** 132 | 133 | wangguofeng 提交了与 LoongArch 架构相关的补丁,并于 2021 年 8 月 2 日被合并到主分支。 134 | 135 | https://github.com/linux-rdma/rdma-core/commit/071c10a24b11b7c54d80917a8d1c146f956f9848 136 | 137 | **matio** 138 | 139 | zhangjialing 提交了与 LoongArch 架构相关的补丁,并于 2021 年 6 月 3 日被合并到主分支。 140 | 141 | https://github.com/tbeu/matio/commit/f93a57597c9df27bbce98b6a9a4e24ebd205eca1 142 | 143 | **systemd** 144 | 145 | WANG Xuerui 提交了与 LoongArch 架构相关的补丁,并于 2021 年 7 月 14 日被合并到主分支。 146 | 147 | https://github.com/systemd/systemd/commit/3cfd5ddd59aa4a7c365bd86fa7755610e8ad7296 148 | 149 | **util-linux** 150 | 151 | WANG Xuerui 提交了与 LoongArch 架构相关的补丁,并于 2021 年 8 月 2 日被合并到主分支。 152 | 153 | https://github.com/karelzak/util-linux/commit/2d29fccaad267d1b003dc0ed2bb9634ff76f3e49 154 | 155 | 156 | 目前还有一些系统软件正在 review 中,详情见 https://github.com/loongarch64 组织。 157 | 158 | 注: 本网站为完全开放社区,欢迎广大爱好者通过给 [website](https://github.com/loongarch64/website) 发起 PR 进行投稿! 159 | -------------------------------------------------------------------------------- /content/en/posts/markdown-syntax.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Markdown Syntax Guide" 4 | date = "2020-11-09" 5 | description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements." 6 | featured = true 7 | categories = [ 8 | ] 9 | tags = [ 10 | "Markdown", 11 | "CSS", 12 | "HTML", 13 | ] 14 | series = [ 15 | "User Manual" 16 | ] 17 | aliases = ["migrate-from-jekyl"] 18 | images = [ 19 | "images/markdown.png" 20 | ] 21 | # toc = false 22 | +++ 23 | 24 | This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. 25 | 26 | 27 | ## Headings 28 | 29 | The following HTML `

`—`

` elements represent six levels of section headings. `

` is the highest section level while `

` is the lowest. 30 | 31 | # H1 32 | ## H2 33 | ### H3 34 | #### H4 35 | ##### H5 36 | ###### H6 37 | 38 | ## Paragraph 39 | 40 | Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. 41 | 42 | Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. 43 | 44 | ## Blockquotes 45 | 46 | The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. 47 | 48 | ### Blockquote without attribution 49 | 50 | > Tiam, ad mint andaepu dandae nostion secatur sequo quae. 51 | > **Note** that you can use *Markdown syntax* within a blockquote. 52 | 53 | ### Blockquote with attribution 54 | 55 | > Don't communicate by sharing memory, share memory by communicating.
56 | > — Rob Pike[^1] 57 | 58 | [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. 59 | 60 | ## Tables 61 | 62 | Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. 63 | 64 | Name | Age 65 | --------|------ 66 | Bob | 27 67 | Alice | 23 68 | 69 | ### Inline Markdown within tables 70 | 71 | | Italics | Bold | Code | 72 | | -------- | -------- | ------ | 73 | | *italics* | **bold** | `code` | 74 | 75 | ## Code Blocks 76 | 77 | ### Code block with backticks 78 | 79 | ```html 80 | 81 | 82 | 83 | 84 | Example HTML5 Document 85 | 86 | 87 |

Test

88 | 89 | 90 | ``` 91 | 92 | ### Code block indented with four spaces 93 | 94 | 95 | 96 | 97 | 98 | Example HTML5 Document 99 | 100 | 101 |

Test

102 | 103 | 104 | 105 | ### Code block with Hugo's internal highlight shortcode 106 | {{< highlight html >}} 107 | 108 | 109 | 110 | 111 | Example HTML5 Document 112 | 113 | 114 |

Test

115 | 116 | 117 | {{< /highlight >}} 118 | 119 | ## List Types 120 | 121 | ### Ordered List 122 | 123 | 1. First item 124 | 2. Second item 125 | 3. Third item 126 | 127 | ### Unordered List 128 | 129 | * List item 130 | * Another item 131 | * And another item 132 | 133 | ### Nested list 134 | 135 | * Fruit 136 | * Apple 137 | * Orange 138 | * Banana 139 | * Dairy 140 | * Milk 141 | * Cheese 142 | 143 | ## Other Elements — abbr, sub, sup, kbd, mark 144 | 145 | GIF is a bitmap image format. 146 | 147 | H2O 148 | 149 | Xn + Yn = Zn 150 | 151 | Press CTRL+ALT+Delete to end the session. 152 | 153 | Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. 154 | -------------------------------------------------------------------------------- /content/zh-cn/posts/markdown-syntax.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Markdown Syntax Guide" 4 | date = "2020-01-09" 5 | description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements." 6 | featured = false 7 | categories = [ 8 | ] 9 | tags = [ 10 | "Markdown", 11 | "CSS", 12 | "HTML", 13 | ] 14 | series = [ 15 | "用户手册" 16 | ] 17 | aliases = ["migrate-from-jekyl"] 18 | images = [ 19 | "images/markdown.png" 20 | ] 21 | # toc = false 22 | +++ 23 | 24 | This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. 25 | 26 | 27 | ## Headings 28 | 29 | The following HTML `

`—`

` elements represent six levels of section headings. `

` is the highest section level while `

` is the lowest. 30 | 31 | # H1 32 | ## H2 33 | ### H3 34 | #### H4 35 | ##### H5 36 | ###### H6 37 | 38 | ## Paragraph 39 | 40 | Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. 41 | 42 | Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. 43 | 44 | ## Blockquotes 45 | 46 | The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. 47 | 48 | ### Blockquote without attribution 49 | 50 | > Tiam, ad mint andaepu dandae nostion secatur sequo quae. 51 | > **Note** that you can use *Markdown syntax* within a blockquote. 52 | 53 | ### Blockquote with attribution 54 | 55 | > Don't communicate by sharing memory, share memory by communicating.
56 | > — Rob Pike[^1] 57 | 58 | [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. 59 | 60 | ## Tables 61 | 62 | Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. 63 | 64 | Name | Age 65 | --------|------ 66 | Bob | 27 67 | Alice | 23 68 | 69 | ### Inline Markdown within tables 70 | 71 | | Italics | Bold | Code | 72 | | -------- | -------- | ------ | 73 | | *italics* | **bold** | `code` | 74 | 75 | ## Code Blocks 76 | 77 | ### Code block with backticks 78 | 79 | ```html 80 | 81 | 82 | 83 | 84 | Example HTML5 Document 85 | 86 | 87 |

Test

88 | 89 | 90 | ``` 91 | 92 | ### Code block indented with four spaces 93 | 94 | 95 | 96 | 97 | 98 | Example HTML5 Document 99 | 100 | 101 |

Test

102 | 103 | 104 | 105 | ### Code block with Hugo's internal highlight shortcode 106 | {{< highlight html >}} 107 | 108 | 109 | 110 | 111 | Example HTML5 Document 112 | 113 | 114 |

Test

115 | 116 | 117 | {{< /highlight >}} 118 | 119 | ## List Types 120 | 121 | ### Ordered List 122 | 123 | 1. First item 124 | 2. Second item 125 | 3. Third item 126 | 127 | ### Unordered List 128 | 129 | * List item 130 | * Another item 131 | * And another item 132 | 133 | ### Nested list 134 | 135 | * Fruit 136 | * Apple 137 | * Orange 138 | * Banana 139 | * Dairy 140 | * Milk 141 | * Cheese 142 | 143 | ## Other Elements — abbr, sub, sup, kbd, mark 144 | 145 | GIF is a bitmap image format. 146 | 147 | H2O 148 | 149 | Xn + Yn = Zn 150 | 151 | Press CTRL+ALT+Delete to end the session. 152 | 153 | Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. 154 | -------------------------------------------------------------------------------- /static/js/jquery.watermark.js: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2017 海角在眼前 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | (function(){ 26 | 27 | var watermark = function(self){ 28 | this.elem = self; 29 | } 30 | 31 | watermark.prototype = { 32 | defaults : { 33 | texts : ['Watermark Text'], 34 | width : 100, 35 | height : 100, 36 | textRotate : -30, 37 | textColor : '#e5e5e5', 38 | textFont : '14px Sans' 39 | }, 40 | options : { 41 | canvas : [] 42 | }, 43 | init : function(options){ 44 | $.extend(this.options, this.defaults, options); 45 | var $body = $('body'), 46 | can1 = this.__createCanvas($body), 47 | can2 = this.__createCanvas($body), 48 | canAll = this.__createCanvas($body), 49 | settings = this.options, 50 | txtlen = settings.texts.length; 51 | 52 | settings.deg = settings.textRotate * Math.PI / 180; 53 | 54 | this.__calcTextSize($body); 55 | var repeatTimes = Math.ceil(screen.width / settings.txts.length / settings.width); 56 | settings.canvasWidth = settings.canvasWidth * repeatTimes; 57 | var extTxts = []; 58 | while(repeatTimes--) extTxts = extTxts.concat(settings.txts); 59 | settings.txts = extTxts; 60 | 61 | var fixH = settings.maxWidth * Math.abs(Math.sin(settings.deg)) + Math.cos(settings.deg) * settings.textHeight; 62 | if(fixH > settings.height) settings.height = fixH; 63 | var ctx1 = this.__setCanvasStyle(can1, settings.canvasWidth, settings.height); 64 | var ctx2 = this.__setCanvasStyle(can2, settings.canvasWidth, settings.height); 65 | var ctx = this.__setCanvasStyle(canAll, settings.canvasWidth, settings.height * 2, true); 66 | 67 | this.__drawText(ctx1, settings.txts); 68 | this.__drawText(ctx2, settings.txts.reverse()); 69 | 70 | //合并canvas 71 | ctx.drawImage(can1, 0, 0, settings.canvasWidth, settings.height); 72 | ctx.drawImage(can2, 0, settings.height, settings.canvasWidth, settings.height); 73 | var dataURL = canAll.toDataURL("image/png"); 74 | $(this.elem).css('backgroundImage', "url("+ dataURL +")"); 75 | //this.__destory(); 76 | }, 77 | __createCanvas : function($container){ 78 | var canvas = document.createElement('canvas'); 79 | $container.append(canvas); 80 | this.options.canvas.push(canvas); 81 | return canvas; 82 | }, 83 | __calcTextSize : function($container){ 84 | var txts = [], 85 | maxWidth = 0, 86 | canvasWidth = 0, 87 | settings = this.options; 88 | $.each(settings.texts, function(i, text){ 89 | var span = $(' '+text+ '') 90 | .appendTo($container); 91 | var tWidth = span[0].offsetWidth, 92 | tHeight = span[0].offsetHeight; 93 | span.remove(); 94 | txts.push({ 95 | txt : text, 96 | width : tWidth, 97 | height : tHeight 98 | }); 99 | maxWidth = Math.max(maxWidth, tWidth); 100 | settings.textHeight = tHeight; 101 | var shadow = Math.cos(settings.deg) * tWidth; 102 | canvasWidth += (settings.width < shadow ? shadow : settings.width) - tHeight * Math.sin(settings.deg); 103 | }); 104 | settings.txts = txts; 105 | settings.maxWidth = maxWidth; 106 | settings.canvasWidth = canvasWidth; 107 | }, 108 | __setCanvasStyle : function(canvas, width, height, notextstyle){ 109 | canvas.width = width; 110 | canvas.height = height; 111 | canvas.style.display='none'; 112 | 113 | var ctx = canvas.getContext('2d'); 114 | if(!notextstyle){ 115 | var deg = this.options.deg, 116 | absSindeg = Math.abs(Math.sin(deg)); 117 | ctx.rotate(deg); 118 | // based on windows's x/y offset 119 | var offset = absSindeg * this.options.height - this.options.textHeight * absSindeg; 120 | var nx = - offset * Math.cos(deg), 121 | ny = - offset * absSindeg; 122 | ctx.translate( nx, ny * absSindeg); 123 | 124 | ctx.font = this.options.textFont; 125 | ctx.fillStyle = this.options.textColor; 126 | ctx.textAlign = 'left'; 127 | ctx.textBaseline = 'Middle'; 128 | } 129 | return ctx; 130 | }, 131 | __drawText: function(ctx, txts){ 132 | var settings = this.options; 133 | $.each(txts, function(i, obj){ 134 | 135 | var wnap = (settings.maxWidth - obj.width) / 2 ; 136 | var x = settings.width * Math.cos(settings.deg) * i, 137 | y = - x * Math.tan(settings.deg) + settings.height; 138 | ctx.fillText(obj.txt, x + wnap, y); 139 | }); 140 | }, 141 | __destory : function(){ 142 | $.each(this.options.canvas, function(i, canvas){ 143 | canvas.remove(); 144 | canvas = null; 145 | }); 146 | } 147 | } 148 | 149 | $.fn.watermark = function(options){ 150 | new watermark(this).init(options); 151 | } 152 | 153 | })(jQuery); 154 | -------------------------------------------------------------------------------- /content/zh-cn/posts/2021q4-upstream-community.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "2021年四季度社区动态" 3 | linktitle = "2021年四季度社区动态" 4 | description = "2021年四季度社区动态" 5 | date = 2022-01-25T14:35:00+08:00 6 | draft = false 7 | comment = true 8 | toc = true 9 | reward = false 10 | categories = [ 11 | "" 12 | ] 13 | tags = [ 14 | "新闻" 15 | ] 16 | +++ 17 | 18 | 2021年四季度,LoongArch 平台开发者手册开放更新中;基础软件、开发语言、系统软件继续稳步推进。 19 | 20 | ## 开发者手册 21 | 22 | [LoongArch Processor SMBIOS Spec](https://loongson.github.io/LoongArch-Documentation/LoongArch-Processor-SMBIOS-Spec-EN.html): 为上游 SMBIOS 规范增加 LoongArch 处理器部分,预计在 V3.6.0 版本将合并到上游。 23 | 24 | 以上手册作为开发者必备的参考资料,同时也是指导工具链实现的规范,目前在社区开放讨论并持续更新中, https://github.com/loongson/LoongArch-Documentation 25 | 26 | ## 基础软件 27 | 28 | ### QEMU 29 | 30 | WANG Xuerui 提交的 LoongArch TCG host 支持补丁上游已合并。 31 | 32 | https://patchew.org/QEMU/20211221054105.178795-1-git@xen0n.name/ 33 | 34 | ## 开发语言 35 | 36 | ### golang 37 | 38 | limeidan 和 liuxiaodong 提交的 golang/net 补丁上游已合并。 39 | 40 | https://github.com/golang/net/commit/d55c255bac037b8052cb2cb906e2a42ef152ff79 41 | 42 | ## 系统软件 43 | 44 | ### beetle-pce-fast-libretro 45 | 46 | fyl 提交的 LoongArch 架构支持补丁上游已合并。 47 | 48 | https://github.com/libretro/beetle-pce-fast-libretro/commit/eb57e0c21f082de9f0ba86f26b3c716a2ed18b14 49 | 50 | ### benchmark 51 | 52 | huajingyun 提交的 LoongArch 架构支持补丁上游已合并。 53 | 54 | https://github.com/google/benchmark/commit/f90215f1cc2c22d32d96e903ea031278681e4adb 55 | 56 | ### chromium 57 | 58 | Zhao Jiazhong 提交的 LoongArch 架构支持补丁上游已合并。 59 | 60 | https://github.com/chromium/chromium/commit/8f1041be06763964d54b6bfac7faa751569b4a48 61 | 62 | ### ffmpeg 63 | 64 | guxiwei、yin shiyou、Hao Chen、Jin Bo 等人提交的 LoongArch 架构支持补丁上游已合并。 65 | 66 | https://github.com/FFmpeg/FFmpeg/commit/024e934480a34ff534020f1617c94a7212f88a0f 67 | https://github.com/FFmpeg/FFmpeg/commit/07f8f78a5fb8b6a28f7b9d79fae6e411a17114ee 68 | https://github.com/FFmpeg/FFmpeg/commit/1ccc45896096b39b9a0d5650618d384df30d15e4 69 | https://github.com/FFmpeg/FFmpeg/commit/2fd914e079645ad08a4068b46c161f4a01b5b996 70 | https://github.com/FFmpeg/FFmpeg/commit/3f294ec8799390af0bfc6916c312e5b1e0035c10 71 | https://github.com/FFmpeg/FFmpeg/commit/555b850bd56c87007c6b7b02dbb1e474e9911dfa 72 | https://github.com/FFmpeg/FFmpeg/commit/5d58355bf1a7bd07b0f08bf1f90f4aba8b89d727 73 | https://github.com/FFmpeg/FFmpeg/commit/5ff58b77bb1f44a2074967cb0e0b7db3b437df10 74 | https://github.com/FFmpeg/FFmpeg/commit/6038a9eb92b2daac907c941dbb245ed43c350501 75 | https://github.com/FFmpeg/FFmpeg/commit/72bcbe216ef3d47498392ed2bada83994cd9fc86 76 | https://github.com/FFmpeg/FFmpeg/commit/8ca7d474c19f856b28fa588e040b23b1a58368ed 77 | https://github.com/FFmpeg/FFmpeg/commit/8ca7d474c19f856b28fa588e040b23b1a58368ed 78 | https://github.com/FFmpeg/FFmpeg/commit/9a840ffa176038d44e0197283590f891b2cf9eeb 79 | https://github.com/FFmpeg/FFmpeg/commit/afcb36b7e54727d533b45303b36fa0d13ce02797 80 | https://github.com/FFmpeg/FFmpeg/commit/cba7c0267dad3963ff52f146012dd99fd5b55c2c 81 | https://github.com/FFmpeg/FFmpeg/commit/df46d7cb49ce301d83c1d20cfc4ef47390d47691 82 | https://github.com/FFmpeg/FFmpeg/commit/fea299f8768adbbddcb5b26a34f622a8606945a6 83 | 84 | ffmpeg 5.0 版本已经增加了 LoongArch 架构,参见 Changelog: 85 | 86 | https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/refs/heads/release/5.0:/Changelog 87 | 88 | ### jnr-constants 89 | 90 | shanjiantao 提交的 LoongArch 架构支持补丁上游已合并。 91 | 92 | https://github.com/jnr/jnr-constants/commit/413ff6e502c86edda2ebae9f8689e2b9c462e743 93 | 94 | jnr-constants 0.10.2 版本已经增加了 LoongArch 架构 95 | 96 | ### libffcall 97 | 98 | https://git.savannah.gnu.org/gitweb/?p=libffcall.git;a=commit;h=600d713cd18f09a698f937ff6c2cead41036e3da 99 | 100 | ### libunwind 101 | 102 | Tiezhu Yang、 Qing Zhang、 Jinyang He、 Youling Tang 等人提交的 LoongArch 架构支持补丁上游已合并。 103 | 104 | https://github.com/libunwind/libunwind/commit/c5f1d12c77dea6a60740730c675fc56b3c52b86a 105 | 106 | ### libyuv 107 | 108 | Hao Chen 提交的 LoongArch 架构支持补丁上游已合并。 109 | 110 | https://github.com/noiseless/libyuv/commit/2f87e9a7135b83656c86b3b23ba582e0dfeb7fbb 111 | https://github.com/noiseless/libyuv/commit/f8e2da48aed24a7b2608172aa5e59421f1f802d4 112 | https://github.com/noiseless/libyuv/commit/dfe046d27255cff06fc4cfe42c6d373fd83bc2aa 113 | https://github.com/noiseless/libyuv/commit/de8ae8c679f5a42fb9f9f65318d6cb95112180d6 114 | https://github.com/noiseless/libyuv/commit/51de1e16f20bb93468d7c538629b40ece8420b71 115 | 116 | ### Nim 117 | 118 | wenghongquan 提交的 LoongArch 架构支持补丁上游已合并。 119 | 120 | https://github.com/nim-lang/Nim/commit/742e9d65ad6b56387dc6bf9a2be1b95c510fd0c4 121 | 122 | ### NodeJS 123 | 124 | Shi Pujin 提交的 LoongArch 架构支持补丁上游已合并。 125 | 126 | https://github.com/nodejs/node/commit/81e88f27b7199bafc9e26bb1def2d06bac2b9fad 127 | 128 | ### NumPy 129 | 130 | NumPy 1.22.0 版本已经支持 LoongArch 架构,参见 Release Notes: 131 | 132 | https://numpy.org/doc/stable/release/1.22.0-notes.html 133 | 134 | ### ode 135 | 136 | zhangna 提交的 LoongArch 架构支持补丁上游已合并。 137 | 138 | https://bitbucket.org/odedevs/ode/commits/04f4c2d33f4abcb2970e8377d1a35e06c6ff3504 139 | 140 | ### OpenBLAS 141 | 142 | gxw 提交的 LoongArch 架构支持补丁上游已合并。 143 | 144 | https://github.com/xianyi/OpenBLAS/commit/af0a69f355a086d70cc08ccda8bde7a48b3133c4 145 | 146 | OpenBLAS 0.3.18 版本已经支持 LoongArch 架构,参见 Release Notes: 147 | 148 | https://github.com/xianyi/OpenBLAS/releases/tag/v0.3.18 149 | 150 | ### OpenH264 151 | 152 | jinboson、Lu Wang 等人提交的 LoongArch 架构支持补丁上游已合并。 153 | 154 | https://github.com/cisco/openh264/commit/a8094d85f5dd5ef112fbcfec2974e18fd0387c0b 155 | 156 | ### patchelf 157 | 158 | zhangwenlong 提交的 LoongArch 架构支持补丁上游已合并。 159 | 160 | https://github.com/NixOS/patchelf/commit/a174cf3006baf31e0e9eaa62bc9adead93af63f7 161 | 162 | ### pwsafe 163 | 164 | Yaling Fang 提交的 LoongArch 架构支持补丁上游已合并。 165 | 166 | https://github.com/pwsafe/pwsafe/commit/faf1545c3c0327fb5e7c84502146014d1550cb50 167 | 168 | ### pyroute2 169 | 170 | zhangwenlong 提交的 LoongArch 架构支持补丁上游已合并。 171 | 172 | https://github.com/svinota/pyroute2/commit/6fdae02ff0666c11e726166e296d67c75782587b 173 | 174 | ### strace 175 | 176 | WANG Xuerui 提交的 LoongArch 架构支持补丁上游已合并。 177 | 178 | https://github.com/strace/strace/commit/2bf68c3b08ba82f4f41035e58149c06d2421cbd6 179 | https://github.com/strace/strace/commit/665f7bb525b2a800257af5d3d83b796e6cd9ddbe 180 | https://github.com/strace/strace/commit/819a2c5ff74e8fd957d36ae1e70cb87f02d2b9b6 181 | 182 | ### stringi 183 | 184 | liuxiang88 提交的 LoongArch 架构支持补丁上游已合并。 185 | 186 | https://github.com/gagolews/stringi/commit/23b92c604c2bb48cc5b6a241e4875182c5889aeb 187 | 188 | ### systemd 189 | 190 | Wu Xiaotian 提交的 LoongArch 架构支持补丁上游已合并。 191 | 192 | https://github.com/systemd/systemd/commit/646b01121a9cf2009768af2dac080940b9803624 193 | https://github.com/systemd/systemd/commit/ff6d286902b4330a07e0d4a141751344257ef0c1 194 | https://github.com/systemd/systemd/commit/eebbd595f0de9505f4df3c3460ab36d46d8262f8 195 | https://github.com/systemd/systemd/commit/89f60c217c3f095db8e530c63fcb761fd64dc2d4 196 | https://github.com/systemd/systemd/commit/0444a6e4be6bdc4d57076609f182497ea79aa7b5 197 | 198 | systemd 250 版本已经初步增加了 LoongArch 架构,参见 Release Notes: 199 | 200 | https://github.com/systemd/systemd/releases/tag/v250 201 | 202 | ### tilibs 203 | 204 | suntie 提交的 LoongArch 架构支持补丁上游已合并。 205 | 206 | https://github.com/debrouxl/tilibs/commit/3447f6e786b377f2eb5c40cc840024098633a9e0 207 | 208 | ### tup 209 | 210 | Yaling Fang 提交的 LoongArch 架构支持补丁上游已合并。 211 | 212 | https://github.com/gittup/tup/commit/324d0cd97b0d78566f19f0b30cb072eddeabd99d 213 | 214 | ### unarr 215 | 216 | liuxiang88 提交的 LoongArch 架构支持补丁上游已合并。 217 | 218 | https://github.com/selmf/unarr/commit/a9c2c6f71ad3ad5f3fd0bfed2b06148b51ed7555 219 | 220 | 注: 本网站为完全开放社区,欢迎广大爱好者通过为 [website](https://github.com/loongarch64/website) 发起 PR 进行投稿! 221 | -------------------------------------------------------------------------------- /content/zh-cn/docs/migrate-from-jekyll.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2014-03-10 3 | linktitle: Migrating from Jekyll 4 | prev: /tutorials/mathjax 5 | draft: true 6 | title: Migrate to Hugo from Jekyll 7 | --- 8 | 9 | ## Move static content to `static` 10 | Jekyll has a rule that any directory not starting with `_` will be copied as-is to the `_site` output. Hugo keeps all static content under `static`. You should therefore move it all there. 11 | With Jekyll, something that looked like 12 | 13 | ▾ / 14 | ▾ images/ 15 | logo.png 16 | 17 | should become 18 | 19 | ▾ / 20 | ▾ static/ 21 | ▾ images/ 22 | logo.png 23 | 24 | Additionally, you'll want any files that should reside at the root (such as `CNAME`) to be moved to `static`. 25 | 26 | ## Create your Hugo configuration file 27 | Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the [Hugo configuration documentation](/overview/configuration/) for details. 28 | 29 | ## Set your configuration publish folder to `_site` 30 | The default is for Jekyll to publish to `_site` and for Hugo to publish to `public`. If, like me, you have [`_site` mapped to a git submodule on the `gh-pages` branch](http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.html), you'll want to do one of two alternatives: 31 | 32 | 1. Change your submodule to point to map `gh-pages` to public instead of `_site` (recommended). 33 | 34 | git submodule deinit _site 35 | git rm _site 36 | git submodule add -b gh-pages git@github.com:your-username/your-repo.git public 37 | 38 | 2. Or, change the Hugo configuration to use `_site` instead of `public`. 39 | 40 | { 41 | .. 42 | "publishdir": "_site", 43 | .. 44 | } 45 | 46 | ## Convert Jekyll templates to Hugo templates 47 | That's the bulk of the work right here. The documentation is your friend. You should refer to [Jekyll's template documentation](http://jekyllrb.com/docs/templates/) if you need to refresh your memory on how you built your blog and [Hugo's template](/layout/templates/) to learn Hugo's way. 48 | 49 | As a single reference data point, converting my templates for [heyitsalex.net](http://heyitsalex.net/) took me no more than a few hours. 50 | 51 | ## Convert Jekyll plugins to Hugo shortcodes 52 | Jekyll has [plugins](http://jekyllrb.com/docs/plugins/); Hugo has [shortcodes](/doc/shortcodes/). It's fairly trivial to do a port. 53 | 54 | ### Implementation 55 | As an example, I was using a custom [`image_tag`](https://github.com/alexandre-normand/alexandre-normand/blob/74bb12036a71334fdb7dba84e073382fc06908ec/_plugins/image_tag.rb) plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing. 56 | 57 | Jekyll's plugin: 58 | 59 | module Jekyll 60 | class ImageTag < Liquid::Tag 61 | @url = nil 62 | @caption = nil 63 | @class = nil 64 | @link = nil 65 | // Patterns 66 | IMAGE_URL_WITH_CLASS_AND_CAPTION = 67 | IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK = /(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)"(.*?)"(\s+)->((https?:\/\/|\/)(\S+))(\s*)/i 68 | IMAGE_URL_WITH_CAPTION = /((https?:\/\/|\/)(\S+))(\s+)"(.*?)"/i 69 | IMAGE_URL_WITH_CLASS = /(\w+)(\s+)((https?:\/\/|\/)(\S+))/i 70 | IMAGE_URL = /((https?:\/\/|\/)(\S+))/i 71 | def initialize(tag_name, markup, tokens) 72 | super 73 | if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK 74 | @class = $1 75 | @url = $3 76 | @caption = $7 77 | @link = $9 78 | elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION 79 | @class = $1 80 | @url = $3 81 | @caption = $7 82 | elsif markup =~ IMAGE_URL_WITH_CAPTION 83 | @url = $1 84 | @caption = $5 85 | elsif markup =~ IMAGE_URL_WITH_CLASS 86 | @class = $1 87 | @url = $3 88 | elsif markup =~ IMAGE_URL 89 | @url = $1 90 | end 91 | end 92 | def render(context) 93 | if @class 94 | source = "
" 95 | else 96 | source = "
" 97 | end 98 | if @link 99 | source += "" 100 | end 101 | source += "" 102 | if @link 103 | source += "" 104 | end 105 | source += "
#{@caption}
" if @caption 106 | source += "
" 107 | source 108 | end 109 | end 110 | end 111 | Liquid::Template.register_tag('image', Jekyll::ImageTag) 112 | 113 | is written as this Hugo shortcode: 114 | 115 | 116 |
117 | {{ with .Get "link"}}{{ end }} 118 | 119 | {{ if .Get "link"}}{{ end }} 120 | {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} 121 |
{{ if isset .Params "title" }} 122 | {{ .Get "title" }}{{ end }} 123 | {{ if or (.Get "caption") (.Get "attr")}}

124 | {{ .Get "caption" }} 125 | {{ with .Get "attrlink"}} {{ end }} 126 | {{ .Get "attr" }} 127 | {{ if .Get "attrlink"}} {{ end }} 128 |

{{ end }} 129 |
130 | {{ end }} 131 |
132 | 133 | 134 | ### Usage 135 | I simply changed: 136 | 137 | {% image full http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg "One of my favorite touristy-type photos. I secretly waited for the good light while we were "having fun" and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." ->http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/ %} 138 | 139 | to this (this example uses a slightly extended version named `fig`, different than the built-in `figure`): 140 | 141 | {{%/* fig class="full" src="http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg" title="One of my favorite touristy-type photos. I secretly waited for the good light while we were having fun and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." link="http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/" */%}} 142 | 143 | As a bonus, the shortcode named parameters are, arguably, more readable. 144 | 145 | ## Finishing touches 146 | ### Fix content 147 | Depending on the amount of customization that was done with each post with Jekyll, this step will require more or less effort. There are no hard and fast rules here except that `hugo server --watch` is your friend. Test your changes and fix errors as needed. 148 | 149 | ### Clean up 150 | You'll want to remove the Jekyll configuration at this point. If you have anything else that isn't used, delete it. 151 | 152 | ## A practical example in a diff 153 | [Hey, it's Alex](http://heyitsalex.net/) was migrated in less than a _father-with-kids day_ from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this [diff](https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610). 154 | -------------------------------------------------------------------------------- /content/zh-cn/posts/2021116-upstream-community.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "2021年三季度社区动态" 3 | linktitle = "2021年三季度社区动态" 4 | description = "2021年三季度社区动态" 5 | date = 2021-11-16T14:35:00+08:00 6 | draft = false 7 | comment = true 8 | toc = true 9 | reward = false 10 | categories = [ 11 | "" 12 | ] 13 | tags = [ 14 | "新闻" 15 | ] 16 | +++ 17 | 18 | 2021年三季度,LoongArch 平台开发者手册开放更新中;基础软件、开发语言、系统软件继续稳步推进;社区发行版数量有所增加。 19 | 20 | ## 开发者手册 21 | 22 | [龙芯架构 ELF psABI](https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-CN.html):该手册介绍了龙芯架构 ELF psABI。 23 | 24 | [龙芯架构工具链约定](https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-CN.html):该手册介绍了龙芯架构工具链的命令行界面和操作系统相关惯例。 25 | 26 | 以上手册作为开发者必备的参考资料,同时也是指导工具链实现的规范,目前在社区开放讨论并持续更新中, https://github.com/loongson/LoongArch-Documentation 27 | 28 | ## 基础软件 29 | 30 | ### EDK2 31 | 32 | 龙芯 UEFI 固件基于 edk2 开发,已经使用在 3A5000/3C5000L 等大量设备中,为了向上游推送代码,目前已经做了一些前期的准备工作。 33 | 34 | 1. DHCPv6 协议增加 LoongArch 架构支持 35 | 36 | 新增了 0x25、0x26、0x27、0x28 等 ID,这些 ID 在 PXE 网络启动时会用到。 37 | 38 | ``` 39 | 0x00 0x25 LoongArch 32-bit UEFI 40 | 0x00 0x26 LoongArch 32-bit UEFI boot from http 41 | 0x00 0x27 LoongArch 64-bit UEFI 42 | 0x00 0x28 LoongArch 64-bit UEFI boot from http 43 | ``` 44 | 45 | 文档地址: https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#processor-architecture 46 | 47 | 2. PE 格式增加 LoongArch 架构支持 48 | 49 | **Machine Types** 50 | 51 | | Constant | Value | Description | 52 | |------------------------------------------|--------------------|------------------------------------------ 53 | | IMAGE\_FILE\_MACHINE\_LOONGARCH32
| 0x6232
| LoongArch 32-bit processor family
| 54 | | IMAGE\_FILE\_MACHINE\_LOONGARCH64
| 0x6264
| LoongArch 64-bit processor family
| 55 | 56 | **Base Relocation Types** 57 | 58 | | Constant | Value | Description | 59 | |------------------------------------------------|---------|--------------------------------------------------------------------------------------------------------------------| 60 | | IMAGE\_REL\_BASED\_LOONGARCH32\_MARK\_LA
| 8
| This relocation is only meaningful when the machine type is LoongArch 32-bit. The base relocation applies to a 32-bit absolute address formed in two consecutive instructions.
| 61 | | IMAGE\_REL\_BASED\_LOONGARCH64\_MARK\_LA
| 8
| This relocation is only meaningful when the machine type is LoongArch 64-bit. The base relocation applies to a 64-bit absolute address formed in four consecutive instructions.
| 62 | 63 | 文档地址: https://docs.microsoft.com/en-us/windows/win32/debug/pe-format 64 | 65 | 提交记录: https://github.com/MicrosoftDocs/win32/commit/491fd3ebca91029bb05d5d1a932c92b7d01731af 66 | 67 | ### Linux 68 | 69 | 内核代码和上游经过多轮沟通,一直在持续完善中,目前开发版本已迁移到 5.16.0-rc1 版本,分别维护在以下地址: 70 | 71 | Github 仓库: https://github.com/loongson/linux/tree/loongarch-next 72 | 73 | kernel.org 仓库: https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git/log/?h=loongarch-next 74 | 75 | ### Binutils 76 | 77 | Liu Zhensong 提交的 LoongArch 补丁已合并上游。 78 | 79 | https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=01a8c731aacbdbed0eb5682d13cc074dc7e25fb3 80 | 81 | https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=e214f8db56f65531b0a5ec296c42339dcaa5af31 82 | 83 | https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=6cc76c40a99bd13d69a311cae5ec891bd1d1dbf2 84 | 85 | https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=e9a0721f8274daeffaedbc3cabc12c52d43a38a7 86 | 87 | https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=4462d7c440247bfcdc464412332bbec13b8aab12 88 | 89 | ### gcc 90 | 91 | https://github.com/loongson/gcc 92 | 93 | 持续完善中 94 | 95 | ### glibc 96 | 97 | https://github.com/loongson/glibc 98 | 99 | 持续完善中 100 | 101 | ### QEMU 102 | 103 | LoongArch TCG host 移植已经全部完成,预计将在 QEMU 7.0 分支开放后合并(WANG Xuerui): 104 | 105 | https://patchew.org/QEMU/20211124183231.1503090-1-git@xen0n.name/ 106 | 107 | LoongArch linux-user 模拟正在 code review 流程中(Gao Song): 108 | 109 | https://patchew.org/QEMU/1637302410-24632-1-git-send-email-gaosong@loongson.cn/ 110 | 111 | LoongArch TCG Dev 初步的 LA 系统模拟支持,在开放 review 中(Yang Xiaojuan): 112 | 113 | https://github.com/loongson/qemu/pull/12 114 | 115 | ## 开发语言 116 | 117 | ### Javascript 118 | 119 | Javascript V8 引擎已经合入 LoongArch 架构支持(loong64)。 120 | 121 | https://chromium.googlesource.com/v8/v8.git [github 镜像](https://github.com/v8/v8) 122 | 123 | ## 系统软件 124 | 125 | **box64** 126 | 127 | Zhao Zhen 提交的 LoongArch 架构支持补丁上游已合并。 128 | 129 | **hardinfo** 130 | 131 | Liu Xiang 提交的 LoongArch 架构支持补丁上游已合并。 132 | 133 | https://github.com/lpereira/hardinfo/commit/56e590d477a6422639235a6afe97f0c9637c459a 134 | 135 | https://github.com/ptitSeb/box64/commit/d75116dab7ca889f21379697b91b942b59588ee1 136 | 137 | **jemalloc** 138 | 139 | Wang Jinlong 提交的 LoongArch 架构支持补丁上游已合并。 140 | 141 | https://github.com/jemalloc/jemalloc/commit/2159615419a90b5473cfd9d3a4cb4700259d8c0b 142 | 143 | **numactl** 144 | 145 | Han Jianjun 提交的 LoongArch 架构支持补丁上游已合并。 146 | 147 | https://github.com/numactl/numactl/commit/a5a429c6bd844308194a334c724e3a3e7f4a5806 148 | 149 | **Numpy** 150 | 151 | Zhang Na 提交的 LoongArch 架构支持补丁上游已合并。 152 | 153 | https://github.com/numpy/numpy/commit/640d68ac8593be4006ea1e63f0354d7b07767541 154 | 155 | https://github.com/numpy/numpy/commit/5f7f37ab49718e13038998673830411342e5ecdd 156 | 157 | **patchelf** 158 | 159 | Zhang Wenlong 提交的 LoongArch 架构支持补丁上游已合并。 160 | 161 | https://github.com/NixOS/patchelf/commit/a174cf3006baf31e0e9eaa62bc9adead93af63f7 162 | 163 | **pty** 164 | 165 | Chen Guoqi 提交的 LoongArch 架构支持补丁上游已合并。 166 | 167 | https://github.com/creack/pty/commit/b135084511330383e4d0adc4504cf407cab59bb0 168 | 169 | **tbox** 170 | 171 | Zhao Zhen 提交的 LoongArch 架构支持补丁上游已合并。 172 | 173 | https://github.com/tboox/tbox/commit/7ca5145d40aa906fdc48b0b0e75e80412241be7e 174 | 175 | **xrdp** 176 | 177 | Liu Xiang 提交的 LoongArch 架构支持补丁上游已合并。 178 | 179 | https://github.com/neutrinolabs/xrdp/commit/c36f92049deb2693ac789cce4db51d833886574b 180 | 181 | **unarr** 182 | 183 | Liu Xiang 提交的 LoongArch 架构支持补丁上游已合并。 184 | 185 | https://github.com/selmf/unarr/commit/6c0bf9731fd80dbe843d2f546f3be92840613ae1 186 | 187 | **syscalls-table** 188 | 189 | WANG Xuerui 提交的 LoongArch 架构支持补丁上游已合并。 190 | 191 | https://github.com/hrw/syscalls-table/commit/599c8a563292e677aaf14a5e51a1039c4a4c108b 192 | 193 | ## 社区发行版 194 | 195 | 随着支持 LoongArch 架构的软件逐步开放和完善,一批社区发行版已经在加速开发中: 196 | 197 | **Archlinux** 198 | 199 | 旧版(Alpha): http://archlinux.oukan.online/alpha/bootstrap/archlinux-bootstrap-alpha-2021.06.11-loongarch64.tar.zst 200 | 201 | 新版:开发中 202 | 203 | **AOSC** 204 | 205 | https://gitlab.summer-ospp.ac.cn/summer2021/210080299/-/blob/main/README.md 206 | 207 | **CLFS** 208 | 209 | https://github.com/sunhaiyong1978/CLFS-for-LoongArch 210 | 211 | **Gentoo** 212 | 213 | 自举已经完成,stage3、LiveCD 确认可以工作。请配合 https://github.com/xen0n/loongson-overlay 使用 214 | 215 | http://loongson-pub-gz.qnbkt.xen0n.name/stage3-loong-systemd-20211205.tar.xz 216 | http://loongson-pub-gz.qnbkt.xen0n.name/stage3-loong-systemd-20211205.tar.xz.CONTENTS.gz 217 | http://loongson-pub-gz.qnbkt.xen0n.name/stage3-loong-systemd-20211205.tar.xz.DIGESTS 218 | 219 | **Loongnix** 220 | 221 | desktop: [http://pkg.loongnix.cn:8080/loongnix/isos/](http://pkg.loongnix.cn:8080/loongnix/isos/) 222 | 223 | server: http://pkg.loongnix.cn/loongnix-server/8.3/isos/loongarch64/ 224 | 225 | **OpenAnolis(龙蜥)** 226 | 227 | https://mirrors.openanolis.cn/anolis/8.4/isos/BETA/loongarch64/ 228 | 229 | **OpenEuler(欧拉)** 230 | 231 | 开发中 232 | 233 | 注: 本网站为完全开放社区,欢迎广大爱好者通过给 [website](https://github.com/loongarch64/website) 发起 PR 进行投稿! 234 | -------------------------------------------------------------------------------- /content/zh-cn/posts/goisforlovers.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "(Hu)go Template Primer" 3 | description = "" 4 | tags = [ 5 | "go", 6 | "golang", 7 | "templates", 8 | "themes", 9 | "development", 10 | ] 11 | date = "2014-04-02" 12 | categories = [ 13 | "Development", 14 | "golang", 15 | ] 16 | keywords = [ 17 | "Hugo", 18 | "static", 19 | "generator", 20 | ] 21 | draft = true 22 | +++ 23 | 24 | Hugo uses the excellent [go][] [html/template][gohtmltemplate] library for 25 | its template engine. It is an extremely lightweight engine that provides a very 26 | small amount of logic. In our experience that it is just the right amount of 27 | logic to be able to create a good static website. If you have used other 28 | template systems from different languages or frameworks you will find a lot of 29 | similarities in go templates. 30 | 31 | This document is a brief primer on using go templates. The [go docs][gohtmltemplate] 32 | provide more details. 33 | 34 | ## Introduction to Go Templates 35 | 36 | Go templates provide an extremely simple template language. It adheres to the 37 | belief that only the most basic of logic belongs in the template or view layer. 38 | One consequence of this simplicity is that go templates parse very quickly. 39 | 40 | A unique characteristic of go templates is they are content aware. Variables and 41 | content will be sanitized depending on the context of where they are used. More 42 | details can be found in the [go docs][gohtmltemplate]. 43 | 44 | ## Basic Syntax 45 | 46 | Go lang templates are html files with the addition of variables and 47 | functions. 48 | 49 | **Go variables and functions are accessible within {{ }}** 50 | 51 | Accessing a predefined variable "foo": 52 | 53 | {{ foo }} 54 | 55 | **Parameters are separated using spaces** 56 | 57 | Calling the add function with input of 1, 2: 58 | 59 | {{ add 1 2 }} 60 | 61 | **Methods and fields are accessed via dot notation** 62 | 63 | Accessing the Page Parameter "bar" 64 | 65 | {{ .Params.bar }} 66 | 67 | **Parentheses can be used to group items together** 68 | 69 | {{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }} 70 | 71 | 72 | ## Variables 73 | 74 | Each go template has a struct (object) made available to it. In hugo each 75 | template is passed either a page or a node struct depending on which type of 76 | page you are rendering. More details are available on the 77 | [variables](/layout/variables) page. 78 | 79 | A variable is accessed by referencing the variable name. 80 | 81 | {{ .Title }} 82 | 83 | Variables can also be defined and referenced. 84 | 85 | {{ $address := "123 Main St."}} 86 | {{ $address }} 87 | 88 | 89 | ## Functions 90 | 91 | Go template ship with a few functions which provide basic functionality. The go 92 | template system also provides a mechanism for applications to extend the 93 | available functions with their own. [Hugo template 94 | functions](/layout/functions) provide some additional functionality we believe 95 | are useful for building websites. Functions are called by using their name 96 | followed by the required parameters separated by spaces. Template 97 | functions cannot be added without recompiling hugo. 98 | 99 | **Example:** 100 | 101 | {{ add 1 2 }} 102 | 103 | ## Includes 104 | 105 | When including another template you will pass to it the data it will be 106 | able to access. To pass along the current context please remember to 107 | include a trailing dot. The templates location will always be starting at 108 | the /layout/ directory within Hugo. 109 | 110 | **Example:** 111 | 112 | {{ template "chrome/header.html" . }} 113 | 114 | 115 | ## Logic 116 | 117 | Go templates provide the most basic iteration and conditional logic. 118 | 119 | ### Iteration 120 | 121 | Just like in go, the go templates make heavy use of range to iterate over 122 | a map, array or slice. The following are different examples of how to use 123 | range. 124 | 125 | **Example 1: Using Context** 126 | 127 | {{ range array }} 128 | {{ . }} 129 | {{ end }} 130 | 131 | **Example 2: Declaring value variable name** 132 | 133 | {{range $element := array}} 134 | {{ $element }} 135 | {{ end }} 136 | 137 | **Example 2: Declaring key and value variable name** 138 | 139 | {{range $index, $element := array}} 140 | {{ $index }} 141 | {{ $element }} 142 | {{ end }} 143 | 144 | ### Conditionals 145 | 146 | If, else, with, or, & and provide the framework for handling conditional 147 | logic in Go Templates. Like range, each statement is closed with `end`. 148 | 149 | 150 | Go Templates treat the following values as false: 151 | 152 | * false 153 | * 0 154 | * any array, slice, map, or string of length zero 155 | 156 | **Example 1: If** 157 | 158 | {{ if isset .Params "title" }}

{{ index .Params "title" }}

{{ end }} 159 | 160 | **Example 2: If -> Else** 161 | 162 | {{ if isset .Params "alt" }} 163 | {{ index .Params "alt" }} 164 | {{else}} 165 | {{ index .Params "caption" }} 166 | {{ end }} 167 | 168 | **Example 3: And & Or** 169 | 170 | {{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}} 171 | 172 | **Example 4: With** 173 | 174 | An alternative way of writing "if" and then referencing the same value 175 | is to use "with" instead. With rebinds the context `.` within its scope, 176 | and skips the block if the variable is absent. 177 | 178 | The first example above could be simplified as: 179 | 180 | {{ with .Params.title }}

{{ . }}

{{ end }} 181 | 182 | **Example 5: If -> Else If** 183 | 184 | {{ if isset .Params "alt" }} 185 | {{ index .Params "alt" }} 186 | {{ else if isset .Params "caption" }} 187 | {{ index .Params "caption" }} 188 | {{ end }} 189 | 190 | ## Pipes 191 | 192 | One of the most powerful components of go templates is the ability to 193 | stack actions one after another. This is done by using pipes. Borrowed 194 | from unix pipes, the concept is simple, each pipeline's output becomes the 195 | input of the following pipe. 196 | 197 | Because of the very simple syntax of go templates, the pipe is essential 198 | to being able to chain together function calls. One limitation of the 199 | pipes is that they only can work with a single value and that value 200 | becomes the last parameter of the next pipeline. 201 | 202 | A few simple examples should help convey how to use the pipe. 203 | 204 | **Example 1 :** 205 | 206 | {{ if eq 1 1 }} Same {{ end }} 207 | 208 | is the same as 209 | 210 | {{ eq 1 1 | if }} Same {{ end }} 211 | 212 | It does look odd to place the if at the end, but it does provide a good 213 | illustration of how to use the pipes. 214 | 215 | **Example 2 :** 216 | 217 | {{ index .Params "disqus_url" | html }} 218 | 219 | Access the page parameter called "disqus_url" and escape the HTML. 220 | 221 | **Example 3 :** 222 | 223 | {{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}} 224 | Stuff Here 225 | {{ end }} 226 | 227 | Could be rewritten as 228 | 229 | {{ isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" | if }} 230 | Stuff Here 231 | {{ end }} 232 | 233 | 234 | ## Context (aka. the dot) 235 | 236 | The most easily overlooked concept to understand about go templates is that {{ . }} 237 | always refers to the current context. In the top level of your template this 238 | will be the data set made available to it. Inside of a iteration it will have 239 | the value of the current item. When inside of a loop the context has changed. . 240 | will no longer refer to the data available to the entire page. If you need to 241 | access this from within the loop you will likely want to set it to a variable 242 | instead of depending on the context. 243 | 244 | **Example:** 245 | 246 | {{ $title := .Site.Title }} 247 | {{ range .Params.tags }} 248 |
  • {{ . }} - {{ $title }}
  • 249 | {{ end }} 250 | 251 | Notice how once we have entered the loop the value of {{ . }} has changed. We 252 | have defined a variable outside of the loop so we have access to it from within 253 | the loop. 254 | 255 | # Hugo Parameters 256 | 257 | Hugo provides the option of passing values to the template language 258 | through the site configuration (for sitewide values), or through the meta 259 | data of each specific piece of content. You can define any values of any 260 | type (supported by your front matter/config format) and use them however 261 | you want to inside of your templates. 262 | 263 | 264 | ## Using Content (page) Parameters 265 | 266 | In each piece of content you can provide variables to be used by the 267 | templates. This happens in the [front matter](/content/front-matter). 268 | 269 | An example of this is used in this documentation site. Most of the pages 270 | benefit from having the table of contents provided. Sometimes the TOC just 271 | doesn't make a lot of sense. We've defined a variable in our front matter 272 | of some pages to turn off the TOC from being displayed. 273 | 274 | Here is the example front matter: 275 | 276 | ``` 277 | --- 278 | title: "Permalinks" 279 | date: "2013-11-18" 280 | aliases: 281 | - "/doc/permalinks/" 282 | groups: ["extras"] 283 | groups_weight: 30 284 | notoc: true 285 | --- 286 | ``` 287 | 288 | Here is the corresponding code inside of the template: 289 | 290 | {{ if not .Params.notoc }} 291 |
    292 | {{ .TableOfContents }} 293 |
    294 | {{ end }} 295 | 296 | 297 | 298 | ## Using Site (config) Parameters 299 | In your top-level configuration file (eg, `config.yaml`) you can define site 300 | parameters, which are values which will be available to you in chrome. 301 | 302 | For instance, you might declare: 303 | 304 | ```yaml 305 | params: 306 | CopyrightHTML: "Copyright © 2013 John Doe. All Rights Reserved." 307 | TwitterUser: "spf13" 308 | SidebarRecentLimit: 5 309 | ``` 310 | 311 | Within a footer layout, you might then declare a `