mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-06-15 04:52:55 -04:00
🎨 Code cleanup
This commit is contained in:
@@ -48,33 +48,33 @@ Congo 针对完整的多语言网站进行了优化,并且主题assets中已
|
||||
|
||||
该主题目前支持以下语言:
|
||||
|
||||
| 语言 | 代码 |
|
||||
| --------------------------------------- | ------- |
|
||||
| :gb: **英语(默认)** | `en` |
|
||||
| :egypt: 阿拉伯语 | `ar` |
|
||||
| :bangladesh: 孟加拉语 | `bn` |
|
||||
| :bulgaria: 保加利亚语 | `bg` |
|
||||
| :cn: 中文 - 简体(中国) | `zh-cn` |
|
||||
| :taiwan: 中文 - 繁体(台湾) | `zh-tw` |
|
||||
| :flag-cz: 捷克语 | `cs` |
|
||||
| :netherlands: 荷兰语 | `nl` |
|
||||
| :finland: 芬兰语 | `fi` |
|
||||
| :fr: 法语 | `fr` |
|
||||
| :de: 德语 | `de` |
|
||||
| :israel: 希伯来语 | `he` |
|
||||
| :hungary: 匈牙利语 | `hu` |
|
||||
| :indonesia: 印尼语 | `id` |
|
||||
| :it: 意大利语 | `it` |
|
||||
| :jp: 日语 | `ja` |
|
||||
| :poland: 波兰语 | `pl` |
|
||||
| :brazil: 葡萄牙语(巴西) | `pt-br` |
|
||||
| :portugal: 葡萄牙语(葡萄牙) | `pt-pt` |
|
||||
| :romania: 罗马尼亚语 | `ro` |
|
||||
| :ru: 俄语 | `ru` |
|
||||
| :slovakia: 斯洛伐克语 | `sk` |
|
||||
| :es: 西班牙语(西班牙) | `es` |
|
||||
| :tr: 土耳其语 | `tr` |
|
||||
| :ukraine: 乌克兰语 | `uk` |
|
||||
| 语言 | 代码 |
|
||||
| ----------------------------- | ------- |
|
||||
| :gb: **英语(默认)** | `en` |
|
||||
| :egypt: 阿拉伯语 | `ar` |
|
||||
| :bangladesh: 孟加拉语 | `bn` |
|
||||
| :bulgaria: 保加利亚语 | `bg` |
|
||||
| :cn: 中文 - 简体(中国) | `zh-cn` |
|
||||
| :taiwan: 中文 - 繁体(台湾) | `zh-tw` |
|
||||
| :flag-cz: 捷克语 | `cs` |
|
||||
| :netherlands: 荷兰语 | `nl` |
|
||||
| :finland: 芬兰语 | `fi` |
|
||||
| :fr: 法语 | `fr` |
|
||||
| :de: 德语 | `de` |
|
||||
| :israel: 希伯来语 | `he` |
|
||||
| :hungary: 匈牙利语 | `hu` |
|
||||
| :indonesia: 印尼语 | `id` |
|
||||
| :it: 意大利语 | `it` |
|
||||
| :jp: 日语 | `ja` |
|
||||
| :poland: 波兰语 | `pl` |
|
||||
| :brazil: 葡萄牙语(巴西) | `pt-br` |
|
||||
| :portugal: 葡萄牙语(葡萄牙) | `pt-pt` |
|
||||
| :romania: 罗马尼亚语 | `ro` |
|
||||
| :ru: 俄语 | `ru` |
|
||||
| :slovakia: 斯洛伐克语 | `sk` |
|
||||
| :es: 西班牙语(西班牙) | `es` |
|
||||
| :tr: 土耳其语 | `tr` |
|
||||
| :ukraine: 乌克兰语 | `uk` |
|
||||
|
||||
默认翻译可以通过在 `i18n/[code].yaml` 中创建自定义文件来覆盖,其中包含翻译字符串。您还可以使用此方法添加新语言。如果您希望与社区分享新的翻译,请[Pull Request](https://github.com/jpanther/congo/pulls)。
|
||||
|
||||
@@ -178,6 +178,7 @@ Congo 提供了大量的配置参数,用于控制主题的功能。下表概
|
||||
|`verification.bing`|_未设置_|由 Bing 提供的要包含在站点元数据中的站点验证字符串。|
|
||||
|`verification.pinterest`|_未设置_|由 Pinterest 提供的要包含在站点元数据中的站点验证字符串。|
|
||||
|`verification.yandex`|_未设置_|由 Yandex 提供的要包含在站点元数据中的站点验证字符串。|
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## 其他配置文件
|
||||
|
||||
|
||||
@@ -48,4 +48,4 @@ Front Matter参数的默认值是从主题的[基础配置]({{< ref "configurati
|
||||
|`showSummary`|`list.showSummary`|是否在列表页上显示文章摘要。|
|
||||
|`summary`|使用 `summaryLength` 自动生成(参见[站点配置]({{< ref "configuration#site-configuration" >}}))|当启用 `showSummary` 时,用作此文章摘要的 Markdown 字符串。|
|
||||
|`xml`|`true`,除非被 `sitemap.excludedKinds` 排除|此文章是否包含在生成的 `/sitemap.xml` 文件中。|
|
||||
<!-- prettier-ignore-end -->
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
@@ -50,4 +50,4 @@ profile布局非常适用于个人网站和博客。它通过提供图像和社
|
||||
|
||||

|
||||
|
||||
此部分中列出的文章来自 `mainSections` 设置,该设置允许使用您网站上使用的所有内容类型。例如,如果您有用于 _posts_ 和 _projects_ 的内容部分,可以将此设置设置为 `["posts", "projects"]`,所有这两个部分中的文章都将用于填充最近的列表。主题期望此设置为数组,因此如果您只使用一个部分来存储所有内容,您应相应地设置为 `["blog"]`。
|
||||
此部分中列出的文章来自 `mainSections` 设置,该设置允许使用您网站上使用的所有内容类型。例如,如果您有用于 _posts_ 和 _projects_ 的内容部分,可以将此设置设置为 `["posts", "projects"]`,所有这两个部分中的文章都将用于填充最近的列表。主题期望此设置为数组,因此如果您只使用一个部分来存储所有内容,您应相应地设置为 `["blog"]`。
|
||||
|
||||
@@ -170,4 +170,4 @@ git submodule update --remote --merge
|
||||
|
||||
2. 解压缩存档,将文件夹重命名为 `congo`,并将其移动到Hugo项目根文件夹内的 `themes/` 目录。您需要覆盖现有目录以替换所有主题文件。
|
||||
|
||||
3. 重新构建您的站点
|
||||
3. 重新构建您的站点
|
||||
|
||||
@@ -42,13 +42,13 @@ To enable Plausible analytics support, simply provide the domain of the website
|
||||
|
||||
### Umami Analytics
|
||||
|
||||
To enable support for Umami Analytics, insert the *tracking code token* provided by Umami into the `site` parameter to monitor the site. You can also insert a `region` parameter to indicate the region of Umami Analytics servers that you want to connect to. The values can be `eu` or `us`. Refer to [getting started section at umami.is](https://umami.is/docs/getting-started) for more details.
|
||||
To enable support for Umami Analytics, insert the _tracking code token_ provided by Umami into the `site` parameter to monitor the site. You can also insert a `region` parameter to indicate the region of Umami Analytics servers that you want to connect to. The values can be `eu` or `us`. Refer to [getting started section at umami.is](https://umami.is/docs/getting-started) for more details.
|
||||
|
||||
```toml
|
||||
# config/_default/params.toml
|
||||
|
||||
[umamiAnalytics]
|
||||
site = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
site = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
region = "eu" # can be either "eu" or "us"
|
||||
```
|
||||
|
||||
|
||||
@@ -16,4 +16,4 @@ Congo 自动在整个主题中替换 Emoji,因此您可以在内容和前置
|
||||
|
||||
**示例:** `see_no_evil` :see_no_evil:, `hear_no_evil` :hear_no_evil:, `speak_no_evil` :speak_no_evil:。
|
||||
|
||||
[Emojipedia](https://emojipedia.org/) 是一个有用的 Emoji 简码参考网站。
|
||||
[Emojipedia](https://emojipedia.org/) 是一个有用的 Emoji 简码参考网站。
|
||||
|
||||
@@ -56,22 +56,22 @@ tags: ["markdown", "css", "html", "sample"]
|
||||
表格不属于核心Markdown规范,但Hugo原生支持它们,无需额外配置。
|
||||
|
||||
| 名前 | 年齢 |
|
||||
| ----- | --- |
|
||||
| Bob | 27 |
|
||||
| Alice | 23 |
|
||||
| ----- | ---- |
|
||||
| Bob | 27 |
|
||||
| Alice | 23 |
|
||||
|
||||
### 表格内的行内Markdown
|
||||
|
||||
| 斜体 | 粗体 | 代码 |
|
||||
| --------- | -------- | ------ |
|
||||
| _斜体_ | **粗体** | `代码` |
|
||||
| 斜体 | 粗体 | 代码 |
|
||||
| ------ | -------- | ------ |
|
||||
| _斜体_ | **粗体** | `代码` |
|
||||
|
||||
## 代码块
|
||||
|
||||
### 使用反引号的代码块
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
@@ -43,4 +43,4 @@ $$
|
||||
|
||||
$$
|
||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||
$$
|
||||
$$
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
>
|
||||
{{- partial "head.html" . -}}
|
||||
<body
|
||||
class="m-auto flex h-screen max-w-7xl flex-col bg-neutral px-6 text-lg leading-7 text-neutral-900 sm:px-14 md:px-24 lg:px-32 dark:bg-neutral-800 dark:text-neutral"
|
||||
class="m-auto flex h-screen max-w-7xl flex-col bg-neutral px-6 text-lg leading-7 text-neutral-900 dark:bg-neutral-800 dark:text-neutral sm:px-14 md:px-24 lg:px-32"
|
||||
>
|
||||
<div id="the-top" class="absolute flex self-center">
|
||||
<a
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
{{- if isset . "region" }}
|
||||
{{- $region = .region }}
|
||||
{{- end }}
|
||||
<script defer
|
||||
src="https://{{ $region }}.umami.is/script.js"
|
||||
data-website-id="{{ .site }}">
|
||||
</script>
|
||||
<script
|
||||
defer
|
||||
src="https://{{ $region }}.umami.is/script.js"
|
||||
data-website-id="{{ .site }}"
|
||||
></script>
|
||||
{{ end }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<ol class="text-sm text-neutral-500 print:hidden dark:text-neutral-400">
|
||||
<ol class="text-sm text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
{{ template "crumb" (dict "p1" . "p2" .) }}
|
||||
</ol>
|
||||
{{ define "crumb" }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<header class="py-6 font-semibold text-neutral-900 print:hidden sm:py-10 dark:text-neutral">
|
||||
<header class="py-6 font-semibold text-neutral-900 dark:text-neutral sm:py-10 print:hidden">
|
||||
<nav class="flex items-start justify-between sm:items-center">
|
||||
{{/* Site logo/title */}}
|
||||
<div class="flex flex-row items-center">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<header class="py-6 font-semibold text-neutral-900 print:hidden sm:py-10 dark:text-neutral">
|
||||
<header class="py-6 font-semibold text-neutral-900 dark:text-neutral sm:py-10 print:hidden">
|
||||
<nav class="flex items-start justify-between sm:items-center">
|
||||
{{/* Site logo/title */}}
|
||||
<div class="z-40 flex flex-row items-center">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<header class="py-6 font-semibold text-neutral-900 print:hidden sm:py-10 dark:text-neutral">
|
||||
<header class="py-6 font-semibold text-neutral-900 dark:text-neutral sm:py-10 print:hidden">
|
||||
<nav class="flex items-start justify-between sm:items-center">
|
||||
{{/* Site logo/title */}}
|
||||
<div class="z-40 flex flex-row items-center">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div
|
||||
id="search-wrapper"
|
||||
class="invisible fixed inset-0 z-50 flex h-screen w-screen cursor-default flex-col bg-neutral-500/50 p-4 backdrop-blur-sm sm:p-6 md:p-[10vh] lg:p-[12vh] dark:bg-neutral-900/50"
|
||||
class="invisible fixed inset-0 z-50 flex h-screen w-screen cursor-default flex-col bg-neutral-500/50 p-4 backdrop-blur-sm dark:bg-neutral-900/50 sm:p-6 md:p-[10vh] lg:p-[12vh]"
|
||||
data-url="{{ "" | absLangURL }}"
|
||||
>
|
||||
<div
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const jsdom = require("jsdom");
|
||||
const fs = require("fs");
|
||||
|
||||
const SVG_FILE_DIR = 'node_modules/@fortawesome/fontawesome-free/svgs/brands';
|
||||
const SVG_FILE_DIR = "node_modules/@fortawesome/fontawesome-free/svgs/brands";
|
||||
const DOC_DIR = "./exampleSite/content/samples/icons";
|
||||
const DEFAULT_TABLE_DELIMITER = "| -------------------- | --------------------------------- |";
|
||||
|
||||
@@ -72,7 +72,10 @@ const add_documentation = async (icon_name) => {
|
||||
*/
|
||||
const process_file = (file_contents, icon_name) => {
|
||||
const [headers, table] = file_contents.split(DEFAULT_TABLE_DELIMITER);
|
||||
const table_rows = table.split("\n").map((x) => x.trim()).filter((row) => row !== "");
|
||||
const table_rows = table
|
||||
.split("\n")
|
||||
.map((x) => x.trim())
|
||||
.filter((row) => row !== "");
|
||||
table_rows.push(create_table_row(icon_name));
|
||||
table_rows.sort();
|
||||
const new_table = table_rows.join("\n");
|
||||
@@ -80,8 +83,8 @@ const process_file = (file_contents, icon_name) => {
|
||||
};
|
||||
|
||||
const create_table_row = (name) => {
|
||||
return `| ${name} | {{< icon ${name} >}} |`
|
||||
}
|
||||
return `| ${name} | {{< icon ${name} >}} |`;
|
||||
};
|
||||
|
||||
const get_md_docs = () => {
|
||||
return fs.readdirSync(DOC_DIR).filter((file) => file.endsWith(".md"));
|
||||
|
||||
Reference in New Issue
Block a user