mirror of
https://github.com/imfing/hextra.git
synced 2025-07-01 02:57:24 -04:00
Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
7191e25958 | |||
c630805511 | |||
cb274c8ac5 | |||
fbe1aac123 | |||
ff8f2537ca | |||
728fe21ef1 | |||
fc964f11a6 | |||
09e9f52019 | |||
f5e4283961 | |||
10f1d85ab4 | |||
fd9a87a86a | |||
1f9e7c8b39 | |||
7772313a53 | |||
7f0a35ab48 | |||
35c733b7ee | |||
aad68d8afd |
@ -1183,6 +1183,9 @@ video {
|
||||
.align-text-bottom {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
.align-\[-2\.5px\] {
|
||||
vertical-align: -2.5px;
|
||||
}
|
||||
.font-mono {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
}
|
||||
@ -1698,6 +1701,12 @@ video {
|
||||
margin-top: 0.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
/* This CSS rule targets the first nested unordered (ul) or ordered (ol) list
|
||||
inside the first list item (li) of any parent ul or ol.
|
||||
The rule sets the top margin of the selected list to zero. */
|
||||
.content :where(ul, ol) > li:first-child > :where(ul, ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
margin-top: 0px;
|
||||
}
|
||||
.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
overflow-wrap: break-word;
|
||||
border-radius: 0.375rem;
|
||||
|
@ -57,6 +57,12 @@
|
||||
@apply my-2;
|
||||
}
|
||||
}
|
||||
/* This CSS rule targets the first nested unordered (ul) or ordered (ol) list
|
||||
inside the first list item (li) of any parent ul or ol.
|
||||
The rule sets the top margin of the selected list to zero. */
|
||||
:where(ul, ol) > li:first-child > :where(ul, ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply mt-0;
|
||||
}
|
||||
:where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply border-black border-opacity-[0.04] bg-opacity-[0.03] bg-black break-words rounded-md border py-0.5 px-[.25em] text-[.9em] dark:border-white/10 dark:bg-white/10;
|
||||
}
|
||||
@ -109,5 +115,6 @@ article details > summary {
|
||||
height: 1.2em;
|
||||
width: 1.2em;
|
||||
vertical-align: -4px;
|
||||
padding: 0 0.6em;
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
button.classList.add('copied');
|
||||
setTimeout(function () {
|
||||
button.classList.remove('copied');
|
||||
}, 500);
|
||||
}, 1000);
|
||||
}).catch(function (err) {
|
||||
console.error('Failed to copy text: ', err);
|
||||
});
|
||||
|
@ -9,6 +9,11 @@ github: >
|
||||
<path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path>
|
||||
</svg>
|
||||
|
||||
codeberg: >
|
||||
<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.955.49A12 12 0 0 0 0 12.49a12 12 0 0 0 1.832 6.373L11.838 5.928a.187.14 0 0 1 .324 0l10.006 12.935A12 12 0 0 0 24 12.49a12 12 0 0 0-12-12 12 12 0 0 0-.045 0zm.375 6.467 4.416 16.553a12 12 0 0 0 5.137-4.213z"/>
|
||||
</svg>
|
||||
|
||||
hextra: <svg viewBox="0 0 180 180" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="m 105.50024,22.224647 c -9.59169,-5.537563 -21.40871,-5.537563 -31.000093,0 L 39.054693,42.689119 C 29.463353,48.226675 23.55484,58.460531 23.55484,69.535642 v 40.928918 c 0,11.07542 5.908513,21.3092 15.499853,26.84652 l 35.445453,20.46446 c 9.591313,5.53732 21.408404,5.53732 31.000094,0 l 35.44507,-20.46446 c 9.59131,-5.53732 15.49985,-15.7711 15.49985,-26.84652 V 69.535642 c 0,-11.075111 -5.90854,-21.308967 -15.49985,-26.846523 z M 34.112797,85.737639 c -1.384445,2.397827 -1.384445,5.352099 0,7.749927 l 24.781554,42.922974 c 1.38437,2.39783 3.942853,3.87496 6.711592,3.87496 h 49.563107 c 2.76905,0 5.3273,-1.47713 6.71144,-3.87496 l 24.78194,-42.922974 c 1.38414,-2.397828 1.38414,-5.3521 0,-7.749927 L 121.88049,42.814746 c -1.38414,-2.397828 -3.94239,-3.874964 -6.71144,-3.874964 H 65.605944 c -2.768739,0 -5.327223,1.477059 -6.711592,3.874964 z" style="stroke-width:0.774993" /></svg>
|
||||
|
||||
hugo: <svg viewBox="0 0 370 391" xmlns="http://www.w3.org/2000/svg"><g clip-rule="evenodd" fill-rule="evenodd"><path d="m207.5 22.4 114.4 66.6c13.5 7.9 21.9 22.4 21.9 38v136.4c0 17.3-9.3 33.3-24.5 41.8l-113.5 63.9a49.06 49.06 0 0 1 -48.5-.2l-104.5-60.1c-16.4-9.5-26.6-27-26.6-45.9v-129.5c0-19.1 9.9-36.8 26.1-46.8l102.8-63.5c16-9.9 36.2-10.1 52.4-.7z" fill="#ff4088" stroke="#c9177e" stroke-width="27" /><path d="m105.6 298.2v-207.2h43.4v75.5h71.9v-75.5h43.5v207.2h-43.5v-90.6h-71.9v90.6z" fill="#fff" /></g></svg>
|
||||
|
39
exampleSite/content/docs/advanced/comments.zh-cn.md
Normal file
39
exampleSite/content/docs/advanced/comments.zh-cn.md
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
title: 评论系统
|
||||
linkTitle: Comments
|
||||
---
|
||||
|
||||
Hextra 支持在你的网站中添加评论系统。
|
||||
目前已经支持 [giscus](https://giscus.app/).
|
||||
|
||||
<!--more-->
|
||||
|
||||
## giscus
|
||||
|
||||
[giscus](https://giscus.app/) 是由 [GitHub Discussions](https://docs.github.com/en/discussions)驱动的评论系统。Giscus 免费并且开源。
|
||||
|
||||
如需启用 Giscus, 你需要在配置文件中添加以下内容:
|
||||
|
||||
```yaml {filename="hugo.yaml"}
|
||||
params:
|
||||
comments:
|
||||
enable: false
|
||||
type: giscus
|
||||
|
||||
giscus:
|
||||
repo: <repository>
|
||||
repoId: <repository ID>
|
||||
category: <category>
|
||||
categoryId: <category ID>
|
||||
```
|
||||
|
||||
Giscus 配置可以参考 [giscus.app](https://giscus.app/),还可以在那里找到更多详细信息。
|
||||
|
||||
可以在 front matter 中启用或禁用特定页面的评论:
|
||||
|
||||
```yaml {filename="content/docs/about.md"}
|
||||
---
|
||||
title: About
|
||||
comments: true
|
||||
---
|
||||
```
|
@ -30,10 +30,10 @@ Hextra 在 `hugo.yaml` 中提供了一些自定义选项来配置主题。
|
||||
|
||||
### 代码高亮
|
||||
|
||||
代码高亮风格的详细信息可在 [Chroma Styles Gallery](https://xyproto.github.io/splash/docs/all.html) 中找到。 可以使用以下命令生成样式表:
|
||||
代码高亮风格的详细信息可在 [Chroma Styles Gallery](https://xyproto.github.io/splash/docs/all.html) 中找到。可以使用以下命令生成样式表:
|
||||
|
||||
```bash
|
||||
$ hugo gen chromastyles --style=github
|
||||
```shell
|
||||
hugo gen chromastyles --style=github
|
||||
```
|
||||
|
||||
可将生成的样式添加到自定义 CSS 文件中以覆盖默认代码高亮样式。
|
||||
@ -55,4 +55,4 @@ layouts/partials/custom/head-end.html
|
||||
|
||||
## 进一步定制 Hextra
|
||||
|
||||
没有找到你想修改的东西?在 GitHub 上[创建 Issues](https://github.com/imfing/hextra/issues) 或为 Hextra 贡献你的智慧!
|
||||
没有找到你想修改的内容?在 GitHub 上[创建 Discussion](https://github.com/imfing/hextra/discussions) 或为 Hextra 贡献你的智慧!
|
||||
|
@ -26,23 +26,21 @@ prev: /docs
|
||||
|
||||
[Hugo 模块](https://gohugo.io/hugo-modules/)是管理 Hugo 主题的推荐方式。要使用 Hugo 模块,我们需要安装 [Git](https://git-scm.com/) 和 [Go](https://go.dev/)。
|
||||
|
||||
{{% steps %}}
|
||||
|
||||
### 初始化 Hugo 站点
|
||||
|
||||
```bash
|
||||
$ hugo new site my-site --format=yaml
|
||||
```shell
|
||||
hugo new site my-site --format=yaml
|
||||
```
|
||||
|
||||
### 通过模块配置 Hextra 主题
|
||||
### 通过 Hugo Module 安装
|
||||
|
||||
```shell
|
||||
# 初始化 Hugo 模块
|
||||
$ cd my-site
|
||||
$ hugo mod init github.com/username/my-site
|
||||
cd my-site
|
||||
hugo mod init github.com/username/my-site
|
||||
|
||||
# 添加 Hextra
|
||||
$ hugo mod get github.com/imfing/hextra
|
||||
hugo mod get github.com/imfing/hextra
|
||||
```
|
||||
|
||||
编辑 `hugo.yaml` 以启用 Hextra:
|
||||
@ -53,31 +51,92 @@ module:
|
||||
- path: github.com/imfing/hextra
|
||||
```
|
||||
|
||||
### 通过 Git Submodule 安装
|
||||
|
||||
#### 先决条件
|
||||
|
||||
在我们开始之前,你必须先确保以下软件已经安装:
|
||||
|
||||
- [Hugo (extended version)](https://gohugo.io/installation/)
|
||||
- [Git](https://git-scm.com/)
|
||||
|
||||
#### 步骤
|
||||
|
||||
{{% steps %}}
|
||||
|
||||
### 初始化 Hugo 站点
|
||||
|
||||
```shell
|
||||
hugo new site my-site --format=yaml
|
||||
```
|
||||
|
||||
### 将 Hextra 添加为 Git Submodule
|
||||
|
||||
```shell
|
||||
git submodule add https://github.com/imfing/hextra.git themes/hextra
|
||||
```
|
||||
|
||||
添加以下内容来配置 `hugo.yaml` 以使用 Hextra:
|
||||
|
||||
```yaml
|
||||
theme: hextra
|
||||
```
|
||||
|
||||
### 创建你的第一个内容页
|
||||
|
||||
让我们为主页和文档页面创建一个新的内容页面:
|
||||
|
||||
```shell
|
||||
$ hugo new content/_index.md
|
||||
$ hugo new content/docs/_index.md
|
||||
hugo new content/_index.md
|
||||
hugo new content/docs/_index.md
|
||||
```
|
||||
|
||||
### 在本地预览站点
|
||||
|
||||
```shell
|
||||
$ hugo server --buildDrafts --disableFastRender
|
||||
hugo server --buildDrafts --disableFastRender
|
||||
```
|
||||
|
||||
瞧!你现在可以在 `http://localhost:1313/` 看到你的新站点。
|
||||
|
||||
{{% /steps %}}
|
||||
|
||||
|
||||
|
||||
|
||||
使用 [CI/CD](https://en.wikipedia.org/wiki/CI/CD) 进行部署时,必须确保在运行 `hugo` 命令之前执行以下命令。
|
||||
|
||||
```shell
|
||||
git submodule update --init
|
||||
```
|
||||
|
||||
如果不运行此命令,theme 中将不会存在 Hextra 文件,进而导致构建失败。
|
||||
|
||||
|
||||
{{% details title="如何更新主题?" %}}
|
||||
|
||||
如需把项目中所有的 Hugo Modules 都升级到最新,在终端中运行此命令:
|
||||
|
||||
```shell
|
||||
hugo mod get -u
|
||||
```
|
||||
|
||||
如需把 Hextra 升级到[最新的发行版本](https://github.com/imfing/hextra/releases), 在终端中运行此命令:
|
||||
|
||||
```shell
|
||||
hugo mod get -u github.com/imfing/hextra
|
||||
```
|
||||
|
||||
如果你需要获得更多信息,参见 [Hugo Modules](https://gohugo.io/hugo-modules/use-modules/#update-all-modules).
|
||||
|
||||
{{% /details %}}
|
||||
|
||||
## 接下来
|
||||
|
||||
你可以探索以下部分来添加更多内容:
|
||||
探索这些文档以便添加更多内容:
|
||||
|
||||
{{< cards >}}
|
||||
{{< card link="../guide/organize-files" title="目录结构" icon="document-duplicate" >}}
|
||||
{{< card link="../guide/configuration" title="配置文件指南" icon="adjustments" >}}
|
||||
{{< card link="../guide/organize-files" title="Organize Files" icon="document-duplicate" >}}
|
||||
{{< card link="../guide/configuration" title="Configuration" icon="adjustments" >}}
|
||||
{{< card link="../guide/markdown" title="Markdown" icon="markdown" >}}
|
||||
{{< /cards >}}
|
||||
|
@ -139,17 +139,17 @@ To configure the page edit link, we can set the `params.editURL.base` parameter
|
||||
```yaml {filename="hugo.yaml"}
|
||||
params:
|
||||
editURL:
|
||||
enable: true
|
||||
base: "https://github.com/your-username/your-repo/edit/main"
|
||||
```
|
||||
|
||||
The edit links will be automatically generated for each page based on the provided url as root directory.
|
||||
If you want to set edit link for a specific page, you can set the `params.editURL` parameter in the front matter of the page:
|
||||
If you want to set edit link for a specific page, you can set the `editURL` parameter in the front matter of the page:
|
||||
|
||||
```yaml {filename="content/docs/guide/configuration.md"}
|
||||
---
|
||||
title: Configuration
|
||||
params:
|
||||
editURL: "https://example.com/edit/this/page"
|
||||
editURL: "https://example.com/edit/this/page"
|
||||
---
|
||||
```
|
||||
|
||||
|
@ -38,7 +38,7 @@ menu:
|
||||
icon: github
|
||||
```
|
||||
|
||||
有几种不同类型的菜单项:
|
||||
有几种不同类型的菜单项:
|
||||
|
||||
1. Link to a page in the site with `pageRef`
|
||||
```yaml
|
||||
@ -114,12 +114,126 @@ params:
|
||||
```
|
||||
|
||||
将为每个页面自动生成编辑链接。
|
||||
如需为特定页面设置编辑链接,可以在页面的 `front matter` 中设置 `params.editURL`:
|
||||
如需为特定页面设置编辑链接,可以在页面的 `front matter` 中设置 `editURL`:
|
||||
|
||||
```yaml {filename="content/docs/guide/configuration.md"}
|
||||
---
|
||||
title: Configuration
|
||||
params:
|
||||
editURL: "https://example.com/edit/this/page"
|
||||
editURL: "https://example.com/edit/this/page"
|
||||
---
|
||||
```
|
||||
## Footer
|
||||
|
||||
### 版权声明
|
||||
|
||||
如需修改网站页脚中显示的版权文本,您需要创建一个名为“i18n/en.yaml”的文件。
|
||||
在此文件中,填写新的版权文本,像这样:
|
||||
|
||||
```yaml {filename="i18n/en.yaml"}
|
||||
copyright: "© 2023 YOUR TEXT HERE"
|
||||
```
|
||||
你可以在 GitHub 存储库中找到示例 [`i18n/en.yaml`](https://github.com/imfing/hextra/blob/main/i18n/en.yaml) 文件。另外,你可以在版权文本中使用 Markdown 格式。
|
||||
|
||||
## 其他
|
||||
|
||||
### Favicon
|
||||
|
||||
如需自定义 [favicon](https://en.wikipedia.org/wiki/Favicon),请将图标文件放在 `static` 文件夹下以覆盖 [主题中的默认 favicon](https://github.com/imfing/hextra/tree/main/static):
|
||||
|
||||
{{< filetree/container >}}
|
||||
{{< filetree/folder name="static" >}}
|
||||
{{< filetree/file name="android-chrome-192x192.png" >}}
|
||||
{{< filetree/file name="android-chrome-512x512.png" >}}
|
||||
{{< filetree/file name="apple-touch-icon.png" >}}
|
||||
{{< filetree/file name="favicon-16x16.png" >}}
|
||||
{{< filetree/file name="favicon-32x32.png" >}}
|
||||
{{< filetree/file name="favicon-dark.svg" >}}
|
||||
{{< filetree/file name="favicon.ico" >}}
|
||||
{{< filetree/file name="favicon.svg" >}}
|
||||
{{< filetree/file name="site.webmanifest" >}}
|
||||
{{< /filetree/folder >}}
|
||||
{{< /filetree/container >}}
|
||||
|
||||
在您的项目中包含 `favicon.ico` 和 `favicon.svg` 文件,以确保网站的网站图标正确显示。
|
||||
|
||||
虽然 `favicon.ico` 通常适用于较旧的浏览器,但 `favicon.svg` 受到现代浏览器的支持,所以更现代的做法是添加 `favicon-dark.svg` 以便在黑暗模式下提供较好的体验体验。
|
||||
|
||||
请随意使用 [favicon.io](https://favicon.io/) 或 [favycon](https://github.com/ruisaraiva19/favycon) 等工具来生成这些图标。
|
||||
|
||||
### 颜色主题配置
|
||||
|
||||
使用`theme`设置来配置默认主题模式和切换按钮,允许访问者在浅色或深色模式之间切换。
|
||||
|
||||
```yaml {filename="hugo.yaml"}
|
||||
params:
|
||||
theme:
|
||||
# light | dark | system
|
||||
default: system
|
||||
displayToggle: true
|
||||
```
|
||||
|
||||
`theme.default` 的可选项:
|
||||
|
||||
- `light` - 仅使用浅色模式
|
||||
- `dark` - 仅使用神色模式
|
||||
- `system` - 跟随系统
|
||||
|
||||
`theme.displayToggle` 控制显示用于更改主题的切换按钮。
|
||||
当设置为“true”时,访问者可以在浅色或深色模式之间切换,覆盖默认设置。
|
||||
|
||||
### 页宽
|
||||
|
||||
页面的宽度可以通过配置文件中的`params.page.width`参数来调整:
|
||||
|
||||
```yaml {filename="hugo.yaml"}
|
||||
params:
|
||||
page:
|
||||
# full (100%), wide (90rem), normal (1280px)
|
||||
width: wide
|
||||
```
|
||||
|
||||
有三个可选项:`full`, `wide`, and `normal`. 默认的页宽模式是 `normal`.
|
||||
|
||||
同样的,导航栏和 `footer` 的宽度也可通过 `params.navbar.width` 和 `params.footer.width` 调整。
|
||||
|
||||
### 搜索
|
||||
|
||||
默认情况下启用由 [FlexSearch](https://github.com/nextapps-de/flexsearch) 提供全文搜索。
|
||||
要自定义搜索索引,请在配置文件中设置 `params.search.flexsearch.index` :
|
||||
|
||||
```yaml {filename="hugo.yaml"}
|
||||
params:
|
||||
# Search
|
||||
search:
|
||||
enable: true
|
||||
type: flexsearch
|
||||
|
||||
flexsearch:
|
||||
# index page by: content | summary | heading | title
|
||||
index: content
|
||||
```
|
||||
`flexsearch.index` 的可选项:
|
||||
|
||||
- `content` - 全内容搜索
|
||||
- `summary` - 概述 [Hugo Content Summaries](https://gohugo.io/content-management/summaries/)
|
||||
- `heading` - 一级和二级标题
|
||||
- `title` - 仅搜索标题
|
||||
|
||||
要从搜索索引中排除页面,更改 front matter 中的 `excludeSearch: true`:
|
||||
|
||||
```yaml {filename="content/docs/guide/configuration.md"}
|
||||
---
|
||||
title: Configuration
|
||||
excludeSearch: true
|
||||
---
|
||||
```
|
||||
|
||||
### Google Analytics
|
||||
|
||||
要启用 [Google Analytics](https://marketingplatform.google.com/about/analytics/),设置 `services.googleAnalytics.ID`:
|
||||
|
||||
```yaml {filename="hugo.yaml"}
|
||||
services:
|
||||
googleAnalytics:
|
||||
ID: G-MEASUREMENT_ID
|
||||
```
|
||||
|
@ -12,7 +12,9 @@ Open source projects powered by Hextra.
|
||||
</p>
|
||||
|
||||
{{< cards >}}
|
||||
{{< card link="https://developers.osuny.org" title="Osuny" image="https://raw.githubusercontent.com/noesya/osuny-developers/main/static/images/showcase-hextra/screenshot.png" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
|
||||
{{< card link="https://getporter.org/" title="Porter" image="https://repository-images.githubusercontent.com/155893691/aa249c80-fcf3-11ea-93b0-30079e8d7de4" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
|
||||
{{< card link="https://lutheranconfessions.org/" title="LutheranConfessions" image="https://github.com/imfing/hextra/assets/5097752/ad6625e4-88cd-4cad-b102-5399997d0359" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
|
||||
{{< card link="https://github.com/imfing/hextra-starter-template/" title="Hextra Starter Template" image="https://user-images.githubusercontent.com/5097752/263551418-c403b9a9-a76c-47a6-8466-513d772ef0b7.jpg" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
|
||||
{{< card link="https://developers.clever-cloud.com/" title="Clever Cloud Documentation" image="https://cellar-c2.services.clever-cloud.com/documentation/doc-screenshot.png" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
|
||||
{{< /cards >}}
|
||||
|
@ -12,6 +12,7 @@ layout: wide
|
||||
</p>
|
||||
|
||||
{{< cards >}}
|
||||
{{< card link="https://developers.osuny.org" title="Osuny" image="https://raw.githubusercontent.com/noesya/osuny-developers/main/static/images/showcase-hextra/screenshot.png" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
|
||||
{{< card link="https://getporter.org/" title="Porter" image="https://repository-images.githubusercontent.com/155893691/aa249c80-fcf3-11ea-93b0-30079e8d7de4" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
|
||||
{{< card link="https://lutheranconfessions.org/" title="LutheranConfessions" image="https://github.com/imfing/hextra/assets/5097752/ad6625e4-88cd-4cad-b102-5399997d0359" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
|
||||
{{< card link="https://github.com/imfing/hextra-starter-template" title="Hextra Starter Template" image="https://user-images.githubusercontent.com/5097752/263551418-c403b9a9-a76c-47a6-8466-513d772ef0b7.jpg" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
|
||||
|
@ -73,6 +73,7 @@
|
||||
"active:opacity-50",
|
||||
"active:shadow-gray-200",
|
||||
"active:shadow-sm",
|
||||
"align-[-2.5px]",
|
||||
"align-text-bottom",
|
||||
"appearance-none",
|
||||
"aspect-auto",
|
||||
|
14
i18n/cs.yaml
Normal file
14
i18n/cs.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
backToTop: "Zpět nahoru"
|
||||
changeLanguage: "Změnit jazyk"
|
||||
changeTheme: "Změnit vzhled"
|
||||
copyCode: "Zkopírovat kód"
|
||||
copyright: "© 2023 Hextra Project."
|
||||
dark: "Tmavý"
|
||||
editThisPage: "Upravit tuto stránku na GitHubu →"
|
||||
lastUpdated: "Naposledy změněno"
|
||||
light: "Světlý"
|
||||
noResultsFound: "Nebylo nic nalezeno."
|
||||
onThisPage: "Na této stránce"
|
||||
poweredBy: "Powered by Hextra"
|
||||
readMore: "Přečíst víc →"
|
||||
searchPlaceholder: "Hledat..."
|
14
i18n/de.yaml
Normal file
14
i18n/de.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
backToTop: "Nach oben"
|
||||
changeLanguage: "Sprache ändern"
|
||||
changeTheme: "Darstellung ändern"
|
||||
copyCode: "Code kopieren"
|
||||
copyright: "© 2024 Hextra Project."
|
||||
dark: "Dunkel"
|
||||
editThisPage: "Diese Seite auf Github bearbeiten →"
|
||||
lastUpdated: "Zuletzt aktualisiert am"
|
||||
light: "Hell"
|
||||
noResultsFound: "Keine Ergebnisse gefunden."
|
||||
onThisPage: "Auf dieser Seite"
|
||||
poweredBy: "Unterstützt durch Hextra"
|
||||
readMore: "Mehr lesen →"
|
||||
searchPlaceholder: "Suchen..."
|
@ -39,7 +39,7 @@
|
||||
<span>
|
||||
{{- . | markdownify -}}
|
||||
{{- if strings.Contains . "Hextra" -}}
|
||||
{{- partial "utils/icon.html" (dict "name" "hextra" "attributes" `height=1em class="inline-block ml-1 align-text-bottom"`) -}}
|
||||
{{- partial "utils/icon.html" (dict "name" "hextra" "attributes" `height=1em class="inline-block ml-1 align-[-2.5px]"`) -}}
|
||||
{{- end -}}
|
||||
</span>
|
||||
</a>
|
||||
|
@ -16,6 +16,12 @@
|
||||
{{ end -}}
|
||||
</title>
|
||||
<meta name="description" content="{{ partial "utils/page-description.html" . }}" />
|
||||
|
||||
{{ with .Params.canonical }}
|
||||
<link rel="canonical" href="{{ . }}" itemprop="url" />
|
||||
{{ else }}
|
||||
<link rel="canonical" href="{{ .Permalink }}" itemprop="url" />
|
||||
{{ end }}
|
||||
|
||||
{{ partial "opengraph.html" . }}
|
||||
{{ template "_internal/schema.html" . -}}
|
||||
|
@ -42,7 +42,8 @@
|
||||
|
||||
{{/* Display icon menu item */}}
|
||||
{{- if .Params.icon -}}
|
||||
<a class="p-2 text-current" {{ if $external }}target="_blank" rel="noreferer"{{ end }} href="{{ $link }}" title="{{ or (T .Identifier) .Name | safeHTML }}">
|
||||
{{- $rel := cond (eq .Params.icon "mastodon") "noreferer me" "noreferer" }}
|
||||
<a class="p-2 text-current" {{ if $external }}target="_blank" rel="{{ $rel }}"{{ end }} href="{{ $link }}" title="{{ or (T .Identifier) .Name | safeHTML }}">
|
||||
{{- partial "utils/icon.html" (dict "name" .Params.icon "attributes" "height=24") -}}
|
||||
<span class="sr-only">{{ or (T .Identifier) .Name | safeHTML }}</span>
|
||||
</a>
|
||||
|
@ -26,8 +26,18 @@
|
||||
<div class="{{ $borderClass }} sticky bottom-0 flex flex-col items-start gap-2 pb-8 dark:border-neutral-800 contrast-more:border-t contrast-more:border-neutral-400 contrast-more:shadow-none contrast-more:dark:border-neutral-400">
|
||||
{{- if site.Params.editURL.enable -}}
|
||||
{{- $editURL := site.Params.editURL.base | default "" -}}
|
||||
{{- with .File -}}{{ $editURL = urls.JoinPath $editURL (replace .Path "\\" "/") }}{{- end -}}
|
||||
{{- with .Params.editURL -}}{{ $editURL = . }}{{- end -}}
|
||||
{{- with .Params.editURL -}}
|
||||
{{/* if `editURL` is set in the front matter */}}
|
||||
{{- $editURL = . -}}
|
||||
{{- else -}}
|
||||
{{- with .File -}}
|
||||
{{/* `.FileInfo.Meta.SourceRoot` is a Hugo internal field, e.g. `/path/to/repo/content/en/` */}}
|
||||
{{- $sourceDir := replace (strings.TrimPrefix .FileInfo.Meta.BaseDir .FileInfo.Meta.SourceRoot) "\\" "/" -}}
|
||||
{{- $sourceDir = strings.TrimPrefix "/content" $sourceDir -}}
|
||||
{{- $path := replace .Path "\\" "/" -}}
|
||||
{{- $editURL = urls.JoinPath $editURL $sourceDir $path -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<a class="text-xs font-medium text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100 contrast-more:text-gray-800 contrast-more:dark:text-gray-50" href="{{ $editURL }}" target="_blank" rel="noreferer">{{ $editThisPage }}</a>
|
||||
{{- end -}}
|
||||
{{/* Scroll To Top */}}
|
||||
|
Reference in New Issue
Block a user