除归档 其他页面基本完工
No files matched your search
@@ -0,0 +1 @@
|
||||
/node_modules
|
||||
@@ -0,0 +1,8 @@
|
||||
/images
|
||||
/static
|
||||
|
||||
.git*
|
||||
*.toml
|
||||
.prettierignore
|
||||
LICENSE
|
||||
yarn.lock
|
||||
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
singleQuote: true,
|
||||
|
||||
// https://github.com/tailwindlabs/prettier-plugin-tailwindcss
|
||||
plugins: ['prettier-plugin-tailwindcss'],
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
*.md
|
||||
assets/main.css
|
||||
@@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
extends: ['stylelint-config-one'],
|
||||
rules: {
|
||||
'function-no-unknown': null,
|
||||
'function-url-quotes': null,
|
||||
'color-function-notation': null,
|
||||
'no-descending-specificity': null,
|
||||
'comment-empty-line-before': null,
|
||||
'comment-whitespace-inside': null,
|
||||
'custom-property-empty-line-before': null,
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 南小北
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,127 @@
|
||||
<div align="center">
|
||||
|
||||
Link in bio to **widgets**,
|
||||
your online **home screen**. ➫ [🔗 kee.so](https://kee.so/)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<h1>Paper <sup><sup><sub>6.25</sub></sup></sup></h1>
|
||||
|
||||
Demo → [hugo-paper.vercel.app](https://hugo-paper.vercel.app/)
|
||||
|
||||
A simple, clean, customizable Hugo theme.
|
||||
|
||||
⚡️ Fast | 👒 Customizable | 🫙 Smooth
|
||||
|
||||
</div>
|
||||
|
||||
## Links
|
||||
|
||||
Product Hunt: [producthunt.com/posts/hugo-paper-6](https://www.producthunt.com/posts/hugo-paper-6)
|
||||
|
||||
Hugo themes: [themes.gohugo.io/hugo-paper](https://themes.gohugo.io/hugo-paper/)
|
||||
|
||||
## Overview
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## Options
|
||||
|
||||
Available options to `config.toml` or `hugo.toml`:
|
||||
|
||||
```toml
|
||||
disqusShortname = 'YOUR_DISQUS_SHORTNAME' # use disqus comments
|
||||
|
||||
[params]
|
||||
# color style
|
||||
color = 'linen' # linen, wheat, gray, light
|
||||
|
||||
# header social icons
|
||||
twitter = 'YOUR_TWITTER_ID' # twitter.com/YOUR_TWITTER_ID
|
||||
github = 'YOUR_GITHUB_ID' # github.com/YOUR_GITHUB_ID
|
||||
instagram = 'YOUR_INSTAGRAM_ID' # instagram.com/YOUR_INSTAGRAM_ID
|
||||
linkedin = 'YOUR_LINKEDIN_ID' # linkedin.com/in/YOUR_LINKEDIN_ID
|
||||
mastodon = 'YOUR_MASTODON_LINK' # e.g. 'https://mastodon.instance/@xxx'
|
||||
threads = '@YOUR_THREADS_ID' # threads.net/@YOUR_THREADS_ID
|
||||
rss = true # show rss icon
|
||||
|
||||
# home page profile
|
||||
avatar = 'GRAVATAR_EMAIL' # gravatar email or image url
|
||||
name = 'YOUR_NAME'
|
||||
bio = 'YOUR_BIO'
|
||||
|
||||
|
||||
# misc
|
||||
disableHLJS = true # disable highlight.js
|
||||
disablePostNavigation = true # disable post navigation
|
||||
monoDarkIcon = true # show monochrome dark mode icon
|
||||
gravatarCdn = 'GRAVATAR_CDN_LINK' # e.g. 'https://cdn.v2ex.com/gravatar/'
|
||||
math = true # enable KaTeX math typesetting globally
|
||||
localKatex = false # use local KaTeX js/css instead of CDN
|
||||
graphCommentId = "YOUR_GRAPH_COMMENT_ID" # use graph comment (disqus alternative)
|
||||
favicon = "favicon.ico" # customize the default favicon
|
||||
appleTouchIcon = "apple-touch-icon.png" # customize the default Apple touch icon
|
||||
|
||||
# giscus
|
||||
[params.giscus]
|
||||
repo = 'YOUR_GISCUS_REPO' # see https://giscus.app for more details
|
||||
repoId = 'YOUR_GISCUS_REPO_ID'
|
||||
category = 'YOUR__GISCUS_CATEGORY'
|
||||
categoryId = 'YOUR_GISCUS_CATEGORY_ID'
|
||||
mapping = 'pathname'
|
||||
theme = 'light'
|
||||
lang = 'zh-CN'
|
||||
```
|
||||
|
||||
Available options to front matter:
|
||||
|
||||
```toml
|
||||
comments = false # disable comments for a specific page
|
||||
math = true # enable KaTeX math typesetting for a specific page
|
||||
```
|
||||
|
||||
## Install
|
||||
|
||||
### As git submodule
|
||||
|
||||
Inside the folder of your Hugo project, run:
|
||||
|
||||
```bash
|
||||
git submodule add https://github.com/nanxiaobei/hugo-paper themes/paper
|
||||
```
|
||||
|
||||
Open `config.toml`(or `hugo.toml`), change `theme` to `"paper"`:
|
||||
|
||||
```toml
|
||||
theme = "paper"
|
||||
```
|
||||
|
||||
For more information, please read the [official guide](https://gohugo.io/getting-started/quick-start/#configure-the-site) of Hugo.
|
||||
|
||||
### As hugo module
|
||||
|
||||
Add paper theme ad dependency of your site:
|
||||
|
||||
```bash
|
||||
hugo mod init github.com/<your_user>/<your_project>
|
||||
```
|
||||
|
||||
Open `config.toml`(or `hugo.toml`), remove the `theme` line (if present), add `module` section to the bottom of the file:
|
||||
|
||||
```toml
|
||||
[module]
|
||||
[[module.imports]]
|
||||
path = "github.com/nanxiaobei/hugo-paper"
|
||||
```
|
||||
|
||||
For more information, please read the [official guide](https://gohugo.io/hugo-modules/use-modules/#use-a-module-for-a-theme) of Hugo.
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](https://github.com/nanxiaobei/hugo-paper/blob/main/LICENSE) (c) [nanxiaobei](https://lee.so/)
|
||||
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* Paper
|
||||
* A simple, clean, flexible Hugo theme
|
||||
* https://github.com/nanxiaobei/hugo-paper
|
||||
* Designed by 南小北 https://lee.so/
|
||||
*/
|
||||
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer base {
|
||||
html,
|
||||
body {
|
||||
@apply h-full;
|
||||
}
|
||||
|
||||
html {
|
||||
--bg: transparent;
|
||||
}
|
||||
|
||||
body {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
background: var(--bg);
|
||||
|
||||
@apply dark:bg-black/90;
|
||||
}
|
||||
}
|
||||
|
||||
@layer components {
|
||||
.btn {
|
||||
@apply rounded-full bg-black px-7 py-4 text-sm text-white no-underline shadow duration-100 active:scale-95 dark:bg-white dark:text-black;
|
||||
}
|
||||
|
||||
.link {
|
||||
@apply duration-200 hover:text-black dark:hover:text-white;
|
||||
}
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
.not-ready * {
|
||||
@apply !transition-none;
|
||||
}
|
||||
|
||||
.prose {
|
||||
@apply break-words;
|
||||
}
|
||||
|
||||
.btn-menu::before,
|
||||
.btn-menu::after {
|
||||
@apply block h-[2px] w-5 bg-black duration-200 content-[''] dark:invert;
|
||||
}
|
||||
|
||||
.nav-wrapper {
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
.open {
|
||||
@apply overflow-hidden;
|
||||
}
|
||||
|
||||
.open .btn-menu::before {
|
||||
@apply w-6 translate-y-[5.5px] rotate-45;
|
||||
}
|
||||
|
||||
.open .btn-menu::after {
|
||||
@apply w-6 -translate-y-[5.5px] -rotate-45;
|
||||
}
|
||||
|
||||
.open .nav-wrapper {
|
||||
@apply top-0;
|
||||
}
|
||||
|
||||
article {
|
||||
@apply text-lg leading-[1.8] text-black dark:text-white;
|
||||
}
|
||||
|
||||
article blockquote {
|
||||
@apply !border-l-[3px] !border-black dark:!border-white;
|
||||
}
|
||||
|
||||
article code {
|
||||
@apply inline-block !text-sm !leading-6;
|
||||
}
|
||||
|
||||
article .highlight {
|
||||
@apply my-8;
|
||||
}
|
||||
|
||||
article .highlight pre {
|
||||
@apply my-0;
|
||||
}
|
||||
|
||||
article .highlight > div {
|
||||
@apply rounded-md bg-[--tw-prose-pre-bg];
|
||||
}
|
||||
|
||||
article .highlight > div table {
|
||||
@apply my-0 table-fixed;
|
||||
}
|
||||
|
||||
article .highlight > div table tr {
|
||||
@apply flex;
|
||||
}
|
||||
|
||||
article .highlight > div table tr td {
|
||||
@apply p-0;
|
||||
}
|
||||
|
||||
article .highlight > div table tr td pre {
|
||||
@apply !bg-transparent;
|
||||
}
|
||||
|
||||
article .highlight > div table tr td:first-of-type pre {
|
||||
@apply pr-[4px];
|
||||
}
|
||||
|
||||
article .highlight > div table tr td:first-of-type pre code span {
|
||||
@apply !mr-0 block min-w-[18px] !p-0 text-right text-white/40;
|
||||
}
|
||||
|
||||
article .highlight > div table tr td:last-of-type {
|
||||
@apply overflow-auto;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/* Place custom css here. */
|
||||
@@ -0,0 +1,30 @@
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
go.mod
|
||||
go.sum
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.test
|
||||
|
||||
/public
|
||||
/themes
|
||||
.DS_Store
|
||||
.hugo_build.lock
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Steve Francia
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,29 @@
|
||||
# hugoBasicExample
|
||||
|
||||
This repository offers an example site for [Hugo](https://gohugo.io/) and also it provides the default content for demos hosted on the [Hugo Themes Showcase](https://themes.gohugo.io/).
|
||||
|
||||
# Using
|
||||
|
||||
1. [Install Hugo](https://gohugo.io/overview/installing/)
|
||||
2. Clone this repository
|
||||
|
||||
```bash
|
||||
git clone https://github.com/gohugoio/hugoBasicExample.git
|
||||
cd hugoBasicExample
|
||||
```
|
||||
|
||||
3. Clone the repository you want to test. If you want to test all Hugo Themes then follow the instructions provided [here](https://github.com/gohugoio/hugoThemes#installing-all-themes)
|
||||
|
||||
4. Run Hugo and select the theme of your choosing
|
||||
|
||||
```bash
|
||||
hugo server -t YOURTHEME
|
||||
```
|
||||
|
||||
5. Under `/content/` this repository contains the following:
|
||||
|
||||
- A section called `/post/` with sample markdown content
|
||||
- A headless bundle called `homepage` that you may want to use for single page applications. You can find instructions about headless bundles over [here](https://gohugo.io/content-management/page-bundles/#headless-bundle)
|
||||
- An `about.md` that is intended to provide the `/about/` page for a theme demo
|
||||
|
||||
6. If you intend to build a theme that does not fit in the content structure provided in this repository, then you are still more than welcome to submit it for review at the [Hugo Themes](https://github.com/gohugoio/hugoThemes/issues) repository
|
||||
@@ -0,0 +1,80 @@
|
||||
baseURL = "https://hugo-paper.vercel.app/"
|
||||
# title = "Hugo Themes"
|
||||
author = "Steve Francia"
|
||||
copyright = "Copyright © 2008–2019, Steve Francia and the lee.so; all rights reserved."
|
||||
paginate = 3
|
||||
languageCode = "en"
|
||||
DefaultContentLanguage = "en"
|
||||
enableInlineShortcodes = true
|
||||
# prevent build failures when using Hugo's Instagram shortcode due to deprecated Instagram API.
|
||||
# See https://github.com/gohugoio/hugo/issues/7228#issuecomment-714490456
|
||||
ignoreErrors = ["error-remote-getjson"]
|
||||
|
||||
# ------------------------------
|
||||
theme = "hugo-paper"
|
||||
title = "Paper"
|
||||
|
||||
[params]
|
||||
color = 'linen'
|
||||
|
||||
twitter = 'nanxiaobei'
|
||||
github = 'nanxiaobei'
|
||||
instagram = 'nan.xiaobei'
|
||||
|
||||
avatar = 'nanxiaobei@gmail.com'
|
||||
name = 'Lee'
|
||||
bio = 'Discover fresh context'
|
||||
# ------------------------------
|
||||
|
||||
# needed to render raw HTML (e.g. <sub>, <sup>, <kbd>, <mark>)
|
||||
[markup]
|
||||
[markup.goldmark]
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
# [markup.highlight]
|
||||
# lineNos = true
|
||||
|
||||
[menu]
|
||||
|
||||
[[menu.main]]
|
||||
identifier = "about"
|
||||
name = "About"
|
||||
url = "/about/"
|
||||
weight = 10
|
||||
[[menu.main]]
|
||||
identifier = "contact"
|
||||
name = "Contact"
|
||||
url = "/contact/"
|
||||
weight = 10
|
||||
|
||||
[taxonomies]
|
||||
category = "categories"
|
||||
tag = "tags"
|
||||
series = "series"
|
||||
|
||||
[privacy]
|
||||
|
||||
[privacy.vimeo]
|
||||
disabled = false
|
||||
simple = true
|
||||
|
||||
[privacy.twitter]
|
||||
disabled = false
|
||||
enableDNT = true
|
||||
simple = true
|
||||
|
||||
[privacy.instagram]
|
||||
disabled = false
|
||||
simple = true
|
||||
|
||||
[privacy.youtube]
|
||||
disabled = false
|
||||
privacyEnhanced = true
|
||||
|
||||
[services]
|
||||
|
||||
[services.instagram]
|
||||
disableInlineCSS = true
|
||||
|
||||
[services.twitter]
|
||||
disableInlineCSS = true
|
||||
@@ -0,0 +1,27 @@
|
||||
timeout = 30000
|
||||
enableInlineShortcodes = true
|
||||
|
||||
[taxonomies]
|
||||
category = "categories"
|
||||
tag = "tags"
|
||||
series = "series"
|
||||
|
||||
[privacy]
|
||||
|
||||
[privacy.vimeo]
|
||||
disabled = false
|
||||
simple = true
|
||||
|
||||
[privacy.twitter]
|
||||
disabled = false
|
||||
enableDNT = true
|
||||
simple = true
|
||||
disableInlineCSS = true
|
||||
|
||||
[privacy.instagram]
|
||||
disabled = false
|
||||
simple = true
|
||||
|
||||
[privacy.youtube]
|
||||
disabled = false
|
||||
privacyEnhanced = true
|
||||
@@ -0,0 +1,3 @@
|
||||
+++
|
||||
author = "lee.so"
|
||||
+++
|
||||
@@ -0,0 +1,25 @@
|
||||
+++
|
||||
title = "About"
|
||||
description = "Hugo, the world's fastest framework for building websites"
|
||||
date = "2019-02-28"
|
||||
aliases = ["about-us", "about-hugo", "contact"]
|
||||
author = "lee.so"
|
||||
+++
|
||||
|
||||
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.
|
||||
|
||||
Hugo makes use of a variety of open source projects including:
|
||||
|
||||
- https://github.com/yuin/goldmark
|
||||
- https://github.com/alecthomas/chroma
|
||||
- https://github.com/muesli/smartcrop
|
||||
- https://github.com/spf13/cobra
|
||||
- https://github.com/spf13/viper
|
||||
|
||||
Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.
|
||||
|
||||
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
|
||||
|
||||
Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
|
||||
|
||||
Learn more and contribute on [GitHub](https://github.com/gohugoio).
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
date: 2019-05-28
|
||||
type: section
|
||||
layout: 'archives'
|
||||
---
|
||||
@@ -0,0 +1,10 @@
|
||||
+++
|
||||
title = "Contact"
|
||||
description = "Hugo, the world's fastest framework for building websites"
|
||||
date = "2019-02-28"
|
||||
aliases = ["about-us", "about-hugo", "contact"]
|
||||
author = "lee.so"
|
||||
+++
|
||||
|
||||
- [github.com/nanxiaobei](https://github.com/nanxiaobei)
|
||||
- [lee.so](https://lee.so)
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: 'Our Difference'
|
||||
button: 'About us'
|
||||
weight: 2
|
||||
---
|
||||
|
||||
Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. Ipsum dolor sit amet, et essent mediocritatem quo.
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
headless: true
|
||||
---
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: 'We Help Business Grow'
|
||||
button: 'Our Work'
|
||||
weight: 1
|
||||
---
|
||||
|
||||
Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. Numquam dolores mel eu, mea docendi omittantur et, mea ea duis erat. Elit melius cu ius. Per ex novum tantas putant, ei his nullam aliquam apeirian. Aeterno quaestio constituto sea an, no eum intellegat assueverit.
|
||||
@@ -0,0 +1,6 @@
|
||||
+++
|
||||
aliases = ["posts", "articles", "blog", "showcase", "docs"]
|
||||
title = "Posts"
|
||||
author = "lee.so"
|
||||
tags = ["index"]
|
||||
+++
|
||||
@@ -0,0 +1,50 @@
|
||||
+++
|
||||
author = "lee.so"
|
||||
title = "Emoji Support"
|
||||
date = "2019-03-05"
|
||||
description = "Guide to emoji usage in Hugo"
|
||||
tags = [
|
||||
"emoji",
|
||||
]
|
||||
+++
|
||||
|
||||
Emoji can be enabled in a Hugo project in a number of ways.
|
||||
|
||||
<!--more-->
|
||||
|
||||
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).
|
||||
|
||||
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.
|
||||
|
||||
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
|
||||
<br>
|
||||
|
||||
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
|
||||
|
||||
---
|
||||
|
||||
**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.
|
||||
|
||||
{{< highlight html >}}
|
||||
.emoji {
|
||||
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
|
||||
}
|
||||
{{< /highlight >}}
|
||||
|
||||
{{< css.inline >}}
|
||||
|
||||
<style>
|
||||
.emojify {
|
||||
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
|
||||
font-size: 2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@media screen and (max-width:650px) {
|
||||
.nowrap {
|
||||
display: block;
|
||||
margin: 25px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
{{< /css.inline >}}
|
||||
@@ -0,0 +1,156 @@
|
||||
+++
|
||||
author = "lee.so"
|
||||
title = "Markdown Syntax Guide"
|
||||
date = "2019-03-11"
|
||||
description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
tags = [
|
||||
"markdown",
|
||||
"css",
|
||||
"html",
|
||||
]
|
||||
categories = [
|
||||
"themes",
|
||||
"syntax",
|
||||
]
|
||||
series = ["Themes Guide"]
|
||||
aliases = ["migrate-from-jekyl"]
|
||||
+++
|
||||
|
||||
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.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Headings
|
||||
|
||||
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
|
||||
|
||||
# H1
|
||||
|
||||
## H2
|
||||
|
||||
### H3
|
||||
|
||||
#### H4
|
||||
|
||||
##### H5
|
||||
|
||||
###### H6
|
||||
|
||||
## Paragraph
|
||||
|
||||
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.
|
||||
|
||||
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
|
||||
|
||||
## Blockquotes
|
||||
|
||||
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.
|
||||
|
||||
#### Blockquote without attribution
|
||||
|
||||
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
||||
> **Note** that you can use _Markdown syntax_ within a blockquote.
|
||||
|
||||
#### Blockquote with attribution
|
||||
|
||||
> Don't communicate by sharing memory, share memory by communicating.<br>
|
||||
> — <cite>Rob Pike[^1]</cite>
|
||||
|
||||
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
||||
|
||||
## Tables
|
||||
|
||||
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
|
||||
|
||||
| Name | Age |
|
||||
| ----- | --- |
|
||||
| Bob | 27 |
|
||||
| Alice | 23 |
|
||||
|
||||
#### Inline Markdown within tables
|
||||
|
||||
| Italics | Bold | Code |
|
||||
| --------- | -------- | ------ |
|
||||
| _italics_ | **bold** | `code` |
|
||||
|
||||
## Code Blocks
|
||||
|
||||
#### Code block with backticks
|
||||
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
#### Code block indented with four spaces
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
#### Code block with Hugo's internal highlight shortcode
|
||||
|
||||
{{< highlight html >}}
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /highlight >}}
|
||||
|
||||
## List Types
|
||||
|
||||
#### Ordered List
|
||||
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
|
||||
#### Unordered List
|
||||
|
||||
- List item
|
||||
- Another item
|
||||
- And another item
|
||||
|
||||
#### Nested list
|
||||
|
||||
- Fruit
|
||||
- Apple
|
||||
- Orange
|
||||
- Banana
|
||||
- Dairy
|
||||
- Milk
|
||||
- Cheese
|
||||
|
||||
## Other Elements — abbr, sub, sup, kbd, mark
|
||||
|
||||
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
||||
|
||||
H<sub>2</sub>O
|
||||
|
||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
author: lee.so
|
||||
title: Math Typesetting
|
||||
date: 2019-03-08
|
||||
description: A brief guide to setup KaTeX
|
||||
math: true
|
||||
---
|
||||
|
||||
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
|
||||
|
||||
<!--more-->
|
||||
|
||||
In this example we will be using [KaTeX](https://katex.org/)
|
||||
|
||||
- Create a partial under `/layouts/partials/math.html`
|
||||
- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally.
|
||||
- Include the partial in your templates like so:
|
||||
|
||||
```bash
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
{{ partial "math.html" . }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
- To enable KaTeX globally set the parameter `math` to `true` in a project's configuration
|
||||
- To enable KaTeX on a per page basis include the parameter `math: true` in content files
|
||||
|
||||
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
|
||||
|
||||
{{< math.inline >}}
|
||||
|
||||
{{</ math.inline >}}
|
||||
|
||||
### Examples
|
||||
|
||||
{{< math.inline >}}
|
||||
|
||||
<p>
|
||||
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
|
||||
</p>
|
||||
|
||||
{{</ math.inline >}}
|
||||
|
||||
Block math:
|
||||
|
||||
$$
|
||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||
$$
|
||||
@@ -0,0 +1,48 @@
|
||||
+++
|
||||
author = "lee.so"
|
||||
title = "Placeholder Text"
|
||||
date = "2019-03-09"
|
||||
description = "Lorem Ipsum Dolor Si Amet"
|
||||
tags = [
|
||||
"markdown",
|
||||
"text",
|
||||
]
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->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.
|
||||
|
||||
1. Exierant elisi ambit vivere dedere
|
||||
2. Duce pollice
|
||||
3. Eris modo
|
||||
4. Spargitque ferrea quos palude
|
||||
|
||||
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.
|
||||
|
||||
1. Comas hunc haec pietate fetum procerum dixit
|
||||
2. Post torum vates letum Tiresia
|
||||
3. Flumen querellas
|
||||
4. Arcanaque montibus omnes
|
||||
5. Quidem et
|
||||
|
||||
# Vagus elidunt
|
||||
|
||||
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
|
||||
|
||||
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
|
||||
|
||||
## Mane refeci capiebant unda mulcebat
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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**.
|
||||
|
||||
{{< css.inline >}}
|
||||
|
||||
<style>
|
||||
.canon { background: white; width: 100%; height: auto; }
|
||||
</style>
|
||||
|
||||
{{< /css.inline >}}
|
||||
@@ -0,0 +1,18 @@
|
||||
+++
|
||||
author = "lee.so"
|
||||
title = "Rich Content"
|
||||
date = "2019-03-10"
|
||||
description = "A brief description of Hugo Shortcodes"
|
||||
tags = [
|
||||
"shortcodes",
|
||||
"privacy",
|
||||
]
|
||||
+++
|
||||
|
||||
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-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.
|
||||
|
||||
## <!--more-->
|
||||
|
||||
## YouTube Privacy Enhanced Shortcode
|
||||
|
||||
{{< youtube ZJthWmvUzzc >}}
|
||||
@@ -0,0 +1,3 @@
|
||||
module hugo-paper
|
||||
|
||||
go 1.11
|
||||
@@ -0,0 +1,4 @@
|
||||
# Only used for build theme demo site on vercel.com
|
||||
[module]
|
||||
[[module.imports]]
|
||||
path = "github.com/nanxiaobei/hugo-paper"
|
||||
@@ -0,0 +1,3 @@
|
||||
module github.com/nanxiaobei/hugo-paper
|
||||
|
||||
go 1.20
|
||||
@@ -0,0 +1,19 @@
|
||||
- id: prev_page
|
||||
translation: 'الصفحة السابقة'
|
||||
|
||||
- id: next_page
|
||||
translation: 'الصفحة التالية'
|
||||
|
||||
- id: read_time
|
||||
translation:
|
||||
one: 'دقيقة واحده'
|
||||
other: 'دقیقه {{ .Count }}'
|
||||
|
||||
- id: toc
|
||||
translation: 'فهرس المحتوي'
|
||||
|
||||
- id: translations
|
||||
translation: 'ترجمات اخري'
|
||||
|
||||
- id: home
|
||||
translation: 'الصفحة الرئيسية'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'Папярэдняя'
|
||||
|
||||
- id: next_page
|
||||
translation: 'Наступная'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'পূর্ববর্তী পাতা'
|
||||
|
||||
- id: next_page
|
||||
translation: 'পরবর্তী পাতা'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'Vorherige Seite'
|
||||
|
||||
- id: next_page
|
||||
translation: 'Nächste Seite'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'Prev Page'
|
||||
|
||||
- id: next_page
|
||||
translation: 'Next Page'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'Página siguiente'
|
||||
|
||||
- id: next_page
|
||||
translation: 'Página anterior'
|
||||
@@ -0,0 +1,13 @@
|
||||
- id: prev_page
|
||||
translation: 'صفحه قبل'
|
||||
|
||||
- id: next_page
|
||||
translation: 'صفحه بعد'
|
||||
|
||||
- id: read_time
|
||||
translation:
|
||||
one: 'یک دقیقه'
|
||||
other: 'دقیقه {{ .Count }}'
|
||||
|
||||
- id: home
|
||||
translation: 'صفحه اصلی'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'Page précédente'
|
||||
|
||||
- id: next_page
|
||||
translation: 'Page suivante'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'לעמוד הקודם'
|
||||
|
||||
- id: next_page
|
||||
translation: 'לעמוד הבא'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'Sebelumnya'
|
||||
|
||||
- id: next_page
|
||||
translation: 'Selanjutnya'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'Pagina Precedente'
|
||||
|
||||
- id: next_page
|
||||
translation: 'Pagina Successiva'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: '前のページ'
|
||||
|
||||
- id: next_page
|
||||
translation: '次のページ'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: '이전 페이지'
|
||||
|
||||
- id: next_page
|
||||
translation: '다음 페이지'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'Pagina precedenta'
|
||||
|
||||
- id: next_page
|
||||
translation: 'Pagina seguenta'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'Poprzednia strona'
|
||||
|
||||
- id: next_page
|
||||
translation: 'Następna strona'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'Página Anterior'
|
||||
|
||||
- id: next_page
|
||||
translation: 'Página Seguinte'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'Сюда'
|
||||
|
||||
- id: next_page
|
||||
translation: 'Туда'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: 'Ukurasa Uliotangulia'
|
||||
|
||||
- id: next_page
|
||||
translation: 'Ukurasa Unaofuata'
|
||||
@@ -0,0 +1,5 @@
|
||||
- id: prev_page
|
||||
translation: '上一页'
|
||||
|
||||
- id: next_page
|
||||
translation: '下一页'
|
||||
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 341 KiB |
|
After Width: | Height: | Size: 319 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 341 KiB |
@@ -0,0 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<h1
|
||||
class="absolute inset-x-8 bottom-20 top-0 flex items-center justify-center text-9xl"
|
||||
>
|
||||
404
|
||||
</h1>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,53 @@
|
||||
<!doctype html>
|
||||
|
||||
{{ $.Scratch.Delete "bg_color" }}<!---->
|
||||
{{ $.Scratch.Delete "social_list" }}<!---->
|
||||
{{ $.Scratch.Delete "avatar_url" }}<!---->
|
||||
|
||||
<!-- bg_color -->
|
||||
{{ $color_map := dict "linen" "#faf8f1" "wheat" "#f8f5d7" "gray" "#fbfbfb"
|
||||
"light" "#fff" }}<!---->
|
||||
{{ $.Scratch.Set "bg_color" (index $color_map (site.Params.color | default
|
||||
(print "linen"))) }}<!---->
|
||||
{{ $bg_color := $.Scratch.Get "bg_color" }}<!---->
|
||||
|
||||
<!-- social_list -->
|
||||
{{ $social_params := slice "twitter" "github" "instagram" "linkedin" "mastodon"
|
||||
"threads" "rss" }}<!---->
|
||||
{{ range $social_params }}<!---->
|
||||
{{ if isset site.Params . }}<!---->
|
||||
{{ $.Scratch.Add "social_list" (slice .) }}<!---->
|
||||
{{ end }}<!---->
|
||||
{{ end }}<!---->
|
||||
|
||||
<!-- avatar_url -->
|
||||
{{ if site.Params.avatar }}<!---->
|
||||
{{ if in site.Params.avatar "http" }}<!---->
|
||||
{{ $.Scratch.Set "avatar_url" site.Params.avatar }}<!---->
|
||||
{{ else }}<!---->
|
||||
{{ $official_cdn := "https://www.gravatar.com/avatar/" }}<!---->
|
||||
{{ $cdn := (site.Params.gravatarCdn | default $official_cdn) }}<!---->
|
||||
{{ $md5 := (md5 site.Params.avatar) }}<!---->
|
||||
{{ $avatar_url := print $cdn $md5 "?s=160&d=identicon" }}<!---->
|
||||
{{ $.Scratch.Set "avatar_url" $avatar_url }}<!---->
|
||||
{{ end }}<!---->
|
||||
{{ end }}<!---->
|
||||
|
||||
<html
|
||||
class="not-ready lg:text-base"
|
||||
style="--bg: {{ $bg_color }}"
|
||||
lang="{{ or site.LanguageCode site.Language.Lang }}"
|
||||
>
|
||||
{{ partial "head.html" . }}
|
||||
<body class="text-black duration-200 ease-out dark:text-white">
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
<main
|
||||
class="prose prose-neutral relative mx-auto min-h-[calc(100%-9rem)] max-w-3xl px-8 pb-16 pt-12 dark:prose-invert"
|
||||
>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,78 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<!-- Tag Title -->
|
||||
{{ if and .Title (eq .Type "tags") }}
|
||||
<h1 class="mb-16">#{{ .Title }}</h1>
|
||||
{{ end }}
|
||||
|
||||
<!-- $pages -->
|
||||
{{ $pages := union .RegularPages .Sections }}<!---->
|
||||
{{ if .IsHome }}<!---->
|
||||
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}<!---->
|
||||
{{ end }}
|
||||
|
||||
<!-- Articles -->
|
||||
{{ $paginator := .Paginate $pages }} {{ range $index, $page := $paginator.Pages
|
||||
}}<!---->
|
||||
|
||||
<!-- avatar -->
|
||||
{{ if and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) }}<!---->
|
||||
|
||||
{{ $avatar_url := $.Scratch.Get "avatar_url" }}<!---->
|
||||
{{ if or $avatar_url site.Params.name }}
|
||||
<div class="-mt-2 mb-16 flex items-center">
|
||||
{{ if $avatar_url }}
|
||||
<div
|
||||
class="mr-5 shrink-0 rounded-full border-[0.5px] border-black/10 bg-white/50 p-3 shadow dark:bg-white/[15%]"
|
||||
>
|
||||
<img
|
||||
class="my-0 aspect-square w-16 rounded-full !bg-black/5 hover:animate-spin dark:!bg-black/80"
|
||||
src="{{ $avatar_url }}"
|
||||
alt="{{ site.Params.name | default site.Title }}"
|
||||
/>
|
||||
</div>
|
||||
{{ end }}<!---->
|
||||
{{ if site.Params.name }}
|
||||
<div>
|
||||
<h1 class="mb-2 mt-3 text-[1.6rem] font-bold">{{ site.Params.name }}</h1>
|
||||
<div class="break-words">
|
||||
{{ site.Params.bio | default (print `A personal blog by `
|
||||
site.Params.name) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}<!---->
|
||||
|
||||
{{ end }}
|
||||
|
||||
<section class="relative my-10 first-of-type:mt-0 last-of-type:mb-0">
|
||||
{{ if gt .Weight 0 }}
|
||||
<span
|
||||
class="mb-2 ml-px inline-block text-[0.8rem] font-medium uppercase tracking-wider text-[#ff3b2d] opacity-70"
|
||||
>Featured</span
|
||||
>
|
||||
{{ end }}
|
||||
<h2 class="!my-0 pb-1 font-bold !leading-none">{{ .Title }}</h2>
|
||||
<time class="text-sm antialiased opacity-60"
|
||||
>{{ .Date | time.Format ":date_medium" }}</time
|
||||
>
|
||||
<a class="absolute inset-0 text-[0]" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
<!-- Main Nav -->
|
||||
{{ if gt $paginator.TotalPages 1 }}
|
||||
<nav class="mt-16 flex">
|
||||
{{ if $paginator.HasPrev }}
|
||||
<a class="btn" href="{{ $paginator.Prev.URL }}">← {{ i18n "prev_page" }}</a>
|
||||
{{ end }}<!---->
|
||||
{{ if $paginator.HasNext }}
|
||||
<a class="btn ml-auto" href="{{ $paginator.Next.URL }}"
|
||||
>{{ i18n "next_page" }} →</a
|
||||
>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}<!---->
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,130 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<article>
|
||||
<header class="mb-16">
|
||||
<h1 class="!my-0 pb-2.5">{{ .Title }}</h1>
|
||||
|
||||
{{ if ne .Type "page" }}
|
||||
<div class="text-sm antialiased opacity-60">
|
||||
{{ if .Date }}
|
||||
<time>{{ .Date | time.Format ":date_medium" }}</time>
|
||||
{{ end }}<!---->
|
||||
{{ $single_author := or .Params.Author site.Author.name }}
|
||||
<!---->
|
||||
{{ if $single_author }}
|
||||
<span class="mx-1">·</span>
|
||||
<span>{{ $single_author }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</header>
|
||||
|
||||
<section>{{ .Content }}</section>
|
||||
|
||||
<!-- Post Tags -->
|
||||
{{ if .Params.tags }}
|
||||
<footer class="mt-12 flex flex-wrap">
|
||||
{{ range .Params.tags }} {{ $href := print (absURL "tags/") (urlize .) }}
|
||||
<a
|
||||
class="mb-1.5 mr-1.5 rounded-lg bg-black/[3%] px-5 py-1.5 no-underline dark:bg-white/[8%]"
|
||||
href="{{ $href }}"
|
||||
>{{ . }}</a
|
||||
>
|
||||
{{ end }}
|
||||
</footer>
|
||||
{{ end }}
|
||||
|
||||
<!-- Post Nav -->
|
||||
{{ if not site.Params.disablePostNavigation }}<!---->
|
||||
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}<!---->
|
||||
{{ if and (gt (len $pages) 1) (in $pages . ) }}
|
||||
<nav class="mt-24 flex rounded-lg bg-black/[3%] text-lg dark:bg-white/[8%]">
|
||||
{{ with $pages.Next . }}
|
||||
<a
|
||||
class="flex w-1/2 items-center rounded-l-md p-6 pr-3 font-semibold no-underline hover:bg-black/[2%] dark:hover:bg-white/[3%]"
|
||||
href="{{ .Permalink }}"
|
||||
><span class="mr-1.5">←</span><span>{{ .Name }}</span></a
|
||||
>
|
||||
{{ end }}<!---->
|
||||
{{ with $pages.Prev . }}
|
||||
<a
|
||||
class="ml-auto flex w-1/2 items-center justify-end rounded-r-md p-6 pl-3 font-semibold no-underline hover:bg-black/[2%] dark:hover:bg-white/[3%]"
|
||||
href="{{ .Permalink }}"
|
||||
><span>{{ .Name }}</span><span class="ml-1.5">→</span></a
|
||||
>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}<!---->
|
||||
{{ end }}
|
||||
|
||||
<!-- Disqus -->
|
||||
{{ if and site.DisqusShortname (not (eq .Params.comments false)) }}
|
||||
<div class="mt-24" id="disqus_thread"></div>
|
||||
<script>
|
||||
const disqusShortname = '{{ site.DisqusShortname }}';
|
||||
const script = document.createElement('script');
|
||||
script.src = 'https://' + disqusShortname + '.disqus.com/embed.js';
|
||||
script.setAttribute('data-timestamp', +new Date());
|
||||
document.head.appendChild(script);
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
<!-- GraphComment -->
|
||||
{{ if and site.Params.graphCommentId (not (eq .Params.comments false)) }}
|
||||
<div class="mt-24" id="graphcomment"></div>
|
||||
<script type="text/javascript">
|
||||
var __semio__params = {
|
||||
graphcommentId: '{{ site.Params.graphCommentId }}',
|
||||
behaviour: {
|
||||
// uid: "...",
|
||||
},
|
||||
// configure your variables here
|
||||
};
|
||||
|
||||
function __semio__onload() {
|
||||
__semio__gc_graphlogin(__semio__params);
|
||||
}
|
||||
|
||||
(function () {
|
||||
var gc = document.createElement('script');
|
||||
gc.type = 'text/javascript';
|
||||
gc.async = true;
|
||||
gc.onload = __semio__onload;
|
||||
gc.defer = true;
|
||||
gc.src =
|
||||
'https://integration.graphcomment.com/gc_graphlogin.js?' + Date.now();
|
||||
(
|
||||
document.getElementsByTagName('head')[0] ||
|
||||
document.getElementsByTagName('body')[0]
|
||||
).appendChild(gc);
|
||||
})();
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
<!-- mermaid -->
|
||||
{{- partial "mermaid.html" . -}}
|
||||
|
||||
<!-- giscus comment -->
|
||||
{{ if and site.Params.giscus.repo (not (eq .Params.comments false)) }}
|
||||
<div class="giscus mt-24"></div>
|
||||
<script
|
||||
src="https://giscus.app/client.js"
|
||||
data-repo="{{ site.Params.giscus.repo }}"
|
||||
data-repo-id="{{ site.Params.giscus.repoId }}"
|
||||
data-category="{{ site.Params.giscus.category }}"
|
||||
data-category-id="{{ site.Params.giscus.categoryId }}"
|
||||
data-mapping="{{ site.Params.giscus.mapping | default (print `pathname`) }}"
|
||||
data-strict="{{ site.Params.giscus.strict | default (print `1`) }}"
|
||||
data-reactions-enabled="{{ site.Params.giscus.reactionsEnabled | default (print `0`) }}"
|
||||
data-emit-metadata="{{ site.Params.giscus.emitMetadata | default (print `0`) }}"
|
||||
data-input-position="{{ site.Params.giscus.inputPosition | default (print `top`) }}"
|
||||
data-theme="{{ site.Params.giscus.theme | default (print `light`) }}"
|
||||
data-lang="{{ site.Params.giscus.lang | default (print `en`) }}"
|
||||
data-loading="{{ site.Params.giscus.loading | default (print `lazy`) }}"
|
||||
crossorigin="anonymous"
|
||||
async
|
||||
></script>
|
||||
{{ end }}
|
||||
</article>
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,18 @@
|
||||
<footer
|
||||
class="opaco mx-auto flex h-[4.5rem] max-w-3xl items-center px-8 text-[0.9em] opacity-60"
|
||||
>
|
||||
<div class="mr-auto">
|
||||
© {{ now.Year }}
|
||||
<a class="link" href="{{ `` | absURL }}">{{ site.Title }}</a>
|
||||
</div>
|
||||
<a class="link mx-6" href="https://gohugo.io/" rel="noopener" target="_blank"
|
||||
>Powered by Hugo️️</a
|
||||
>️
|
||||
<a
|
||||
class="link"
|
||||
href="https://github.com/nanxiaobei/hugo-paper"
|
||||
rel="noopener"
|
||||
target="_blank"
|
||||
>✎ Paper</a
|
||||
>
|
||||
</footer>
|
||||
@@ -0,0 +1,106 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
||||
/>
|
||||
|
||||
<!-- Title -->
|
||||
<title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ site.Title }}</title>
|
||||
|
||||
<!-- Meta -->
|
||||
<meta name="theme-color" />
|
||||
|
||||
<!-- Author -->
|
||||
{{ $site_author := or site.Author.name site.Params.name site.Title }}
|
||||
<!---->
|
||||
{{ if eq .Kind "page" }}
|
||||
<meta name="description" content="{{ .Summary }}" />
|
||||
<meta name="author" content="{{ or .Params.author $site_author }}" />
|
||||
{{ else }}
|
||||
<!---->
|
||||
<meta
|
||||
name="description"
|
||||
content="{{ site.Params.description | default (print `A personal blog`) }}"
|
||||
/>
|
||||
<meta name="author" content="{{ $site_author }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- CSS & JS -->
|
||||
{{ $main := resources.Get "main.css" }}
|
||||
<!---->
|
||||
{{ $custom := resources.Get "custom.css" }}
|
||||
<!---->
|
||||
{{ $css := slice $main $custom | resources.Concat "main.css" | minify }}
|
||||
<link rel="preload stylesheet" as="style" href="{{ $css.Permalink }}" />
|
||||
|
||||
<!-- Dark Icon -->
|
||||
{{ $dark_icon := "theme.png" }}
|
||||
<!---->
|
||||
{{ if site.Params.monoDarkIcon }}{{ $dark_icon = "theme.svg" }}{{ end }}
|
||||
<!---->
|
||||
<link rel="preload" as="image" href="{{ $dark_icon | absURL }}" />
|
||||
|
||||
<!-- Avatar -->
|
||||
{{ $avatar_url := $.Scratch.Get "avatar_url" }}
|
||||
<!---->
|
||||
{{ if $avatar_url }}
|
||||
<link rel="preload" as="image" href="{{ $avatar_url }}" />
|
||||
{{ end }}
|
||||
<!---->
|
||||
|
||||
<!-- Social List -->
|
||||
{{ range $.Scratch.Get "social_list" }}
|
||||
<link rel="preload" as="image" href="{{ printf `%s.svg` . | absURL }}" />
|
||||
{{ end }}
|
||||
<!---->
|
||||
|
||||
<!-- Highlight JS -->
|
||||
{{ if and .IsPage (not site.Params.disableHLJS) }}
|
||||
<script
|
||||
defer
|
||||
src="{{ `highlight.min.js` | absURL }}"
|
||||
onload="hljs.initHighlightingOnLoad();"
|
||||
></script>
|
||||
{{ end }}
|
||||
|
||||
<!-- Math -->
|
||||
{{ if or .Params.math site.Params.math }}
|
||||
<!---->
|
||||
{{ partial "math.html" . }}
|
||||
<!---->
|
||||
{{ end }}
|
||||
<!---->
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="{{ site.Params.favicon | default `favicon.ico` | absURL }}" />
|
||||
<link rel="apple-touch-icon" href="{{ site.Params.appleTouchIcon | default `apple-touch-icon.png` | absURL }}" />
|
||||
|
||||
<!-- Generator -->
|
||||
{{ hugo.Generator }}
|
||||
|
||||
<!-- Production -->
|
||||
{{ if or hugo.IsProduction (eq site.Params.env "production") }}
|
||||
<!---->
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
<!---->
|
||||
{{ template "_internal/schema.html" . }}
|
||||
<!---->
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
<!---->
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
<!-- RSS -->
|
||||
{{ range .AlternativeOutputFormats }}
|
||||
<link
|
||||
rel="{{ .Rel }}"
|
||||
type="{{ .MediaType.Type }}"
|
||||
href="{{ .Permalink }}"
|
||||
title="{{ site.Title }}"
|
||||
/>
|
||||
{{ end }}
|
||||
<!-- Canonical -->
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
{{ end }}
|
||||
<!---->
|
||||
</head>
|
||||
@@ -0,0 +1,100 @@
|
||||
<header class="mx-auto flex h-[4.5rem] max-w-3xl px-8 lg:justify-center">
|
||||
<div class="relative z-50 mr-auto flex items-center">
|
||||
<a
|
||||
class="-translate-x-[1px] -translate-y-[1px] text-2xl font-semibold"
|
||||
href="{{ `` | absURL }}"
|
||||
>{{ site.Title }}</a
|
||||
>
|
||||
<div
|
||||
class="btn-dark text-[0] ml-4 h-6 w-6 shrink-0 cursor-pointer {{ if site.Params.monoDarkIcon }}[background:url(./theme.svg)_left_center/cover_no-repeat] dark:invert{{ else }}[background:url(./theme.png)_left_center/_auto_theme('spacing.6')_no-repeat] [transition:_background-position_0.4s_steps(5)]{{ end }} dark:[background-position:right]"
|
||||
role="button"
|
||||
aria-label="Dark"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="btn-menu relative z-50 -mr-8 flex h-[4.5rem] w-[5rem] shrink-0 cursor-pointer flex-col items-center justify-center gap-2.5 lg:hidden"
|
||||
role="button"
|
||||
aria-label="Menu"
|
||||
></div>
|
||||
|
||||
{{ $bg_color := $.Scratch.Get "bg_color" }}<!---->
|
||||
|
||||
<script>
|
||||
// base
|
||||
const htmlClass = document.documentElement.classList;
|
||||
setTimeout(() => {
|
||||
htmlClass.remove('not-ready');
|
||||
}, 10);
|
||||
|
||||
// mobile menu
|
||||
const btnMenu = document.querySelector('.btn-menu');
|
||||
btnMenu.addEventListener('click', () => {
|
||||
htmlClass.toggle('open');
|
||||
});
|
||||
|
||||
// dark theme
|
||||
const metaTheme = document.querySelector('meta[name="theme-color"]');
|
||||
const lightBg = '{{ $bg_color }}'.replace(/"/g, '');
|
||||
const setDark = (isDark) => {
|
||||
metaTheme.setAttribute('content', isDark ? '#000' : lightBg);
|
||||
htmlClass[isDark ? 'add' : 'remove']('dark');
|
||||
localStorage.setItem('dark', isDark);
|
||||
};
|
||||
|
||||
// init
|
||||
const darkScheme = window.matchMedia('(prefers-color-scheme: dark)');
|
||||
if (htmlClass.contains('dark')) {
|
||||
setDark(true);
|
||||
} else {
|
||||
const darkVal = localStorage.getItem('dark');
|
||||
setDark(darkVal ? darkVal === 'true' : darkScheme.matches);
|
||||
}
|
||||
|
||||
// listen system
|
||||
darkScheme.addEventListener('change', (event) => {
|
||||
setDark(event.matches);
|
||||
});
|
||||
|
||||
// manual switch
|
||||
const btnDark = document.querySelector('.btn-dark');
|
||||
btnDark.addEventListener('click', () => {
|
||||
setDark(localStorage.getItem('dark') !== 'true');
|
||||
});
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="nav-wrapper fixed inset-x-0 top-full z-40 flex h-full select-none flex-col justify-center pb-16 duration-200 dark:bg-black lg:static lg:h-auto lg:flex-row lg:!bg-transparent lg:pb-0 lg:transition-none"
|
||||
>
|
||||
{{ $url := .RelPermalink }}<!---->
|
||||
{{ with site.Menus.main }}
|
||||
<nav class="lg:ml-12 lg:flex lg:flex-row lg:items-center lg:space-x-6">
|
||||
{{ range . }}
|
||||
<a
|
||||
class="block text-center text-2xl leading-[5rem] lg:text-base lg:font-normal"
|
||||
href="{{ .URL }}"
|
||||
>{{ .Name }}</a
|
||||
>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}<!---->
|
||||
|
||||
{{ with $.Scratch.Get "social_list" }}
|
||||
<nav
|
||||
class="mt-12 flex justify-center space-x-10 dark:invert lg:ml-12 lg:mt-0 lg:items-center lg:space-x-6"
|
||||
>
|
||||
{{ range . }}<!---->
|
||||
<a
|
||||
class="h-8 w-8 text-[0] [background:var(--url)_center_center/cover_no-repeat] lg:h-6 lg:w-6"
|
||||
style="--url: url(./{{ . }}.svg)"
|
||||
href="{{ if eq . `rss` }}{{ `index.xml` | absURL }}{{ else if eq . `mastodon` }}{{ index site.Params . }}{{ else }}https://{{ . }}{{ if eq . `threads` }}.net{{ else }}.com{{ end }}/{{ if eq . `linkedin` }}in/{{ end }}{{ index site.Params . }}{{ end }}"
|
||||
target="_blank"
|
||||
rel="{{ if eq . `rss` }}alternate{{ else }}me{{ end }}"
|
||||
>
|
||||
{{ . }}
|
||||
</a>
|
||||
{{ end }}<!---->
|
||||
</nav>
|
||||
{{ end }}<!---->
|
||||
</div>
|
||||
</header>
|
||||
@@ -0,0 +1,39 @@
|
||||
{{ if site.Params.localKatex }}
|
||||
<link rel="stylesheet" href="{{ "katex.min.css" | relURL }}"/>
|
||||
<script defer src="{{ "katex.min.js" | relURL }}"></script>
|
||||
<script defer src="{{ "auto-render.min.js" | relURL }}"></script>
|
||||
{{ else }}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/katex@0.16.7/dist/katex.min.css"
|
||||
integrity="sha384-3UiQGuEI4TTMaFmGIZumfRPtfKQ3trwQE2JgosJxCnGmQpL/lJdjpcHkaaFwHlcI"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
<script
|
||||
defer
|
||||
src="https://cdn.jsdelivr.net/npm/katex@0.16.7/dist/katex.min.js"
|
||||
integrity="sha384-G0zcxDFp5LWZtDuRMnBkk3EphCK1lhEf4UEyEM693ka574TZGwo4IWwS6QLzM/2t"
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<script
|
||||
defer
|
||||
src="https://cdn.jsdelivr.net/npm/katex@0.16.7/dist/contrib/auto-render.min.js"
|
||||
integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05"
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
{{ end }}
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () =>
|
||||
renderMathInElement(document.body, {
|
||||
// customised options
|
||||
// • auto-render specific keys, e.g.:
|
||||
delimiters: [
|
||||
{ left: '$$', right: '$$', display: true },
|
||||
{ left: '$', right: '$', display: false },
|
||||
],
|
||||
// • rendering keys, e.g.:
|
||||
throwOnError: false,
|
||||
}),
|
||||
);
|
||||
</script>
|
||||
@@ -0,0 +1,20 @@
|
||||
<!-- mermaid.html -->
|
||||
{{ if .Params.mermaid }}
|
||||
<script type="module">
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
|
||||
mermaid.initialize({ startOnLoad: true });
|
||||
</script>
|
||||
<script>
|
||||
Array.from(document.getElementsByClassName('language-mermaid')).forEach(
|
||||
(el) => {
|
||||
el.parentElement.outerHTML = `<div class="mermaid">${el.innerHTML}</div>`;
|
||||
},
|
||||
);
|
||||
</script>
|
||||
<style>
|
||||
.mermaid svg {
|
||||
display: block;
|
||||
margin: auto;
|
||||
}
|
||||
</style>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,10 @@
|
||||
<!---->{{ if not (.Get "summary") }}
|
||||
<!---->{{ errorf "missing param 'summary': %s" .Position }}
|
||||
<!---->{{ else if not (.Get "content") }}{{ warnf "missing param 'content': %s"
|
||||
.Position }}
|
||||
<!---->{{ end }}
|
||||
|
||||
<details {{ if (eq (.Get `openByDefault`) true) }}open="true" {{ end }}>
|
||||
<summary markdown="span">{{ .Get "summary" | markdownify }}</summary>
|
||||
{{ .Get "content" | markdownify }}
|
||||
</details>
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "hugo-paper",
|
||||
"version": "6.25.0",
|
||||
"repository": "https://github.com/nanxiaobei/hugo-paper.git",
|
||||
"author": "nanxiaobei <nanxiaobei@gmail.com>",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"__FOR_DEV__": "To dev on mobile, change all `0.0.0.0` to your local IP",
|
||||
"dev:tailwind": "pnpm tailwindcss -i ./assets/app.css -o ./assets/main.css --watch",
|
||||
"dev:server": "hugo server --buildDrafts --watch --minify --disableFastRender --themesDir=../.. --source=exampleSite --baseURL=0.0.0.0 --bind=0.0.0.0 --port=1313",
|
||||
"dev:open": "open http://0.0.0.0:1313/",
|
||||
"build:go": "cp exampleSite/go.default.mod exampleSite/go.mod",
|
||||
"build:generate": "hugo --gc --minify --themesDir=../.. --source=exampleSite --config=go.toml,config.toml",
|
||||
"dev": "killall hugo & pnpm dev:tailwind & pnpm dev:server & pnpm dev:open",
|
||||
"build": "pnpm build:go & pnpm build:generate"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tailwindcss/typography": "^0.5.12",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier-plugin-tailwindcss": "^0.5.14",
|
||||
"stylelint": "^16.3.1",
|
||||
"stylelint-config-one": "^3.0.1",
|
||||
"tailwindcss": "^3.4.3"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 971 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="1.3 1.3 21.4 21.4"><path d="M10.9,2.1c-4.6,0.5-8.3,4.2-8.8,8.7c-0.5,4.7,2.2,8.9,6.3,10.5C8.7,21.4,9,21.2,9,20.8v-1.6c0,0-0.4,0.1-0.9,0.1 c-1.4,0-2-1.2-2.1-1.9c-0.1-0.4-0.3-0.7-0.6-1C5.1,16.3,5,16.3,5,16.2C5,16,5.3,16,5.4,16c0.6,0,1.1,0.7,1.3,1c0.5,0.8,1.1,1,1.4,1 c0.4,0,0.7-0.1,0.9-0.2c0.1-0.7,0.4-1.4,1-1.8c-2.3-0.5-4-1.8-4-4c0-1.1,0.5-2.2,1.2-3C7.1,8.8,7,8.3,7,7.6C7,7.2,7,6.6,7.3,6 c0,0,1.4,0,2.8,1.3C10.6,7.1,11.3,7,12,7s1.4,0.1,2,0.3C15.3,6,16.8,6,16.8,6C17,6.6,17,7.2,17,7.6c0,0.8-0.1,1.2-0.2,1.4 c0.7,0.8,1.2,1.8,1.2,3c0,2.2-1.7,3.5-4,4c0.6,0.5,1,1.4,1,2.3v2.6c0,0.3,0.3,0.6,0.7,0.5c3.7-1.5,6.3-5.1,6.3-9.3 C22,6.1,16.9,1.4,10.9,2.1z"/></svg>
|
||||
|
After Width: | Height: | Size: 700 B |
@@ -0,0 +1,2 @@
|
||||
/*! highlight.js v9.15.6 | BSD3 License | git.io/hljslicense */
|
||||
!function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(n){var b=[],o=Object.keys,h={},p={},t=/^(no-?highlight|plain|text)$/i,m=/\blang(?:uage)?-([\w-]+)\b/i,r=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,a={case_insensitive:"cI",lexemes:"l",contains:"c",keywords:"k",subLanguage:"sL",className:"cN",begin:"b",beginKeywords:"bK",end:"e",endsWithParent:"eW",illegal:"i",excludeBegin:"eB",excludeEnd:"eE",returnBegin:"rB",returnEnd:"rE",relevance:"r",variants:"v",IDENT_RE:"IR",UNDERSCORE_IDENT_RE:"UIR",NUMBER_RE:"NR",C_NUMBER_RE:"CNR",BINARY_NUMBER_RE:"BNR",RE_STARTERS_RE:"RSR",BACKSLASH_ESCAPE:"BE",APOS_STRING_MODE:"ASM",QUOTE_STRING_MODE:"QSM",PHRASAL_WORDS_MODE:"PWM",C_LINE_COMMENT_MODE:"CLCM",C_BLOCK_COMMENT_MODE:"CBCM",HASH_COMMENT_MODE:"HCM",NUMBER_MODE:"NM",C_NUMBER_MODE:"CNM",BINARY_NUMBER_MODE:"BNM",CSS_NUMBER_MODE:"CSSNM",REGEXP_MODE:"RM",TITLE_MODE:"TM",UNDERSCORE_TITLE_MODE:"UTM",COMMENT:"C",beginRe:"bR",endRe:"eR",illegalRe:"iR",lexemesRe:"lR",terminators:"t",terminator_end:"tE"},N="</span>",v={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function y(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function f(e){return e.nodeName.toLowerCase()}function w(e,t){var r=e&&e.exec(t);return r&&0===r.index}function g(e){return t.test(e)}function u(e){var t,r={},a=Array.prototype.slice.call(arguments,1);for(t in e)r[t]=e[t];return a.forEach(function(e){for(t in e)r[t]=e[t]}),r}function _(e){var n=[];return function e(t,r){for(var a=t.firstChild;a;a=a.nextSibling)3===a.nodeType?r+=a.nodeValue.length:1===a.nodeType&&(n.push({event:"start",offset:r,node:a}),r=e(a,r),f(a).match(/br|hr|img|input/)||n.push({event:"stop",offset:r,node:a}));return r}(e,0),n}function i(e){if(a&&!e.langApiRestored){for(var t in e.langApiRestored=!0,a)e[t]&&(e[a[t]]=e[t]);(e.c||[]).concat(e.v||[]).forEach(i)}}function E(s){function l(e){return e&&e.source||e}function c(e,t){return new RegExp(l(e),"m"+(s.cI?"i":"")+(t?"g":""))}!function t(r,e){if(!r.compiled){if(r.compiled=!0,r.k=r.k||r.bK,r.k){var a={},n=function(r,e){s.cI&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var t=e.split("|");a[t[0]]=[r,t[1]?Number(t[1]):1]})};"string"==typeof r.k?n("keyword",r.k):o(r.k).forEach(function(e){n(e,r.k[e])}),r.k=a}r.lR=c(r.l||/\w+/,!0),e&&(r.bK&&(r.b="\\b("+r.bK.split(" ").join("|")+")\\b"),r.b||(r.b=/\B|\b/),r.bR=c(r.b),r.endSameAsBegin&&(r.e=r.b),r.e||r.eW||(r.e=/\B|\b/),r.e&&(r.eR=c(r.e)),r.tE=l(r.e)||"",r.eW&&e.tE&&(r.tE+=(r.e?"|":"")+e.tE)),r.i&&(r.iR=c(r.i)),null==r.r&&(r.r=1),r.c||(r.c=[]),r.c=Array.prototype.concat.apply([],r.c.map(function(e){return(t="self"===e?r:e).v&&!t.cached_variants&&(t.cached_variants=t.v.map(function(e){return u(t,{v:null},e)})),t.cached_variants||t.eW&&[u(t)]||[t];var t})),r.c.forEach(function(e){t(e,r)}),r.starts&&t(r.starts,e);var i=r.c.map(function(e){return e.bK?"\\.?(?:"+e.b+")\\.?":e.b}).concat([r.tE,r.i]).map(l).filter(Boolean);r.t=i.length?c(function(e,t){for(var r=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,a=0,n="",i=0;i<e.length;i++){var s=a,c=l(e[i]);for(0<i&&(n+=t);0<c.length;){var o=r.exec(c);if(null==o){n+=c;break}n+=c.substring(0,o.index),c=c.substring(o.index+o[0].length),"\\"==o[0][0]&&o[1]?n+="\\"+String(Number(o[1])+s):(n+=o[0],"("==o[0]&&a++)}}return n}(i,"|"),!0):{exec:function(){return null}}}}(s)}function k(e,t,c,r){function o(e,t,r,a){var n='<span class="'+(a?"":v.classPrefix);return(n+=e+'">')+t+(r?"":N)}function l(){p+=null!=b.sL?function(){var e="string"==typeof b.sL;if(e&&!h[b.sL])return y(m);var t=e?k(b.sL,m,!0,i[b.sL]):x(m,b.sL.length?b.sL:void 0);return 0<b.r&&(f+=t.r),e&&(i[b.sL]=t.top),o(t.language,t.value,!1,!0)}():function(){var e,t,r,a,n,i,s;if(!b.k)return y(m);for(a="",t=0,b.lR.lastIndex=0,r=b.lR.exec(m);r;)a+=y(m.substring(t,r.index)),n=b,i=r,s=d.cI?i[0].toLowerCase():i[0],(e=n.k.hasOwnProperty(s)&&n.k[s])?(f+=e[1],a+=o(e[0],y(r[0]))):a+=y(r[0]),t=b.lR.lastIndex,r=b.lR.exec(m);return a+y(m.substr(t))}(),m=""}function u(e){p+=e.cN?o(e.cN,"",!0):"",b=Object.create(e,{parent:{value:b}})}function a(e,t){if(m+=e,null==t)return l(),0;var r=function(e,t){var r,a,n;for(r=0,a=t.c.length;r<a;r++)if(w(t.c[r].bR,e))return t.c[r].endSameAsBegin&&(t.c[r].eR=(n=t.c[r].bR.exec(e)[0],new RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"m"))),t.c[r]}(t,b);if(r)return r.skip?m+=t:(r.eB&&(m+=t),l(),r.rB||r.eB||(m=t)),u(r),r.rB?0:t.length;var a,n,i=function e(t,r){if(w(t.eR,r)){for(;t.endsParent&&t.parent;)t=t.parent;return t}if(t.eW)return e(t.parent,r)}(b,t);if(i){var s=b;for(s.skip?m+=t:(s.rE||s.eE||(m+=t),l(),s.eE&&(m=t));b.cN&&(p+=N),b.skip||b.sL||(f+=b.r),(b=b.parent)!==i.parent;);return i.starts&&(i.endSameAsBegin&&(i.starts.eR=i.eR),u(i.starts)),s.rE?0:t.length}if(a=t,n=b,!c&&w(n.iR,a))throw new Error('Illegal lexeme "'+t+'" for mode "'+(b.cN||"<unnamed>")+'"');return m+=t,t.lLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="2.2 2.2 19.6 19.6"><path d="M 8 3 C 5.239 3 3 5.239 3 8 L 3 16 C 3 18.761 5.239 21 8 21 L 16 21 C 18.761 21 21 18.761 21 16 L 21 8 C 21 5.239 18.761 3 16 3 L 8 3 z M 18 5 C 18.552 5 19 5.448 19 6 C 19 6.552 18.552 7 18 7 C 17.448 7 17 6.552 17 6 C 17 5.448 17.448 5 18 5 z M 12 7 C 14.761 7 17 9.239 17 12 C 17 14.761 14.761 17 12 17 C 9.239 17 7 14.761 7 12 C 7 9.239 9.239 7 12 7 z M 12 9 A 3 3 0 0 0 9 12 A 3 3 0 0 0 12 15 A 3 3 0 0 0 15 12 A 3 3 0 0 0 12 9 z"/></svg>
|
||||
|
After Width: | Height: | Size: 521 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="2 2 46 46"><path d="M41,4H9C6.24,4,4,6.24,4,9v32c0,2.76,2.24,5,5,5h32c2.76,0,5-2.24,5-5V9C46,6.24,43.76,4,41,4z M17,20v19h-6V20H17z M11,14.47c0-1.4,1.2-2.47,3-2.47s2.93,1.07,3,2.47c0,1.4-1.12,2.53-3,2.53C12.2,17,11,15.87,11,14.47z M39,39h-6c0,0,0-9.26,0-10 c0-2-1-4-3.5-4.04h-0.08C27,24.96,26,27.02,26,29c0,0.91,0,10,0,10h-6V20h6v2.56c0,0,1.93-2.56,5.81-2.56 c3.97,0,7.19,2.73,7.19,8.26V39z"/></svg>
|
||||
|
After Width: | Height: | Size: 449 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-7 -7 526 526"><path d="M214.5 1.1c-52.8 3-101.7 12.8-124.6 25-7.9 4.2-22.2 16.2-29.3 24.5-20 23.4-31.9 51.1-37.2 86.6-3.3 22.8-2.7 128.6 1.1 170.8 8.6 97.6 35.6 152.9 87.5 179.4 15.8 8.1 30.4 12.6 58.5 18 24.1 4.6 39.9 6 67.5 6 39.4 0 67.6-4.8 97-16.3l9.5-3.7-.3-13.9c-.1-7.7-.5-17.3-.8-21.3-.6-7-.7-7.3-2.7-6.8-6 1.8-29.4 6.7-38.7 8.1-23.4 3.6-66.6 2.9-88.8-1.4-34.8-6.8-52.6-24.7-57.1-57.5-1.3-9.3-1.4-15.6-.2-15.6.4 0 5.7 1.1 11.7 2.4 31.4 7 55.8 9.7 94.7 10.3 34.8.6 51.9-.3 83.7-4.3 31-3.9 51.5-9.6 73-20.4 27.7-13.9 51.9-36.6 58.9-55.4 9.2-24.6 16-133.2 11-175.6-5.1-43.3-24.2-81-52.7-104.1C422.7 25 409.1 19 384.6 13 341.7 2.4 274-2.3 214.5 1.1zm-11.9 88c8.7 2.2 16.9 6.2 24.9 12.2 7.9 5.9 12.2 11.3 20.2 24.9 3.6 6.2 7 11.9 7.6 12.6.7.9 3.1-2.3 8.6-11.7 8.5-14.2 11.9-18.5 19.5-24.9 28.4-23.6 75.2-19.9 101 7.8 11.3 12.2 17.3 26 20.1 46.1 2.1 14.7 3 70.6 2 119.1l-.7 35.8H354v-68.3c0-73.9-.1-75.1-5.5-85.8-3.4-6.5-9.4-12.5-15.8-15.4-16.9-7.9-35.2-.4-44.2 17.9-5.8 11.6-6.4 17.8-6.5 61.8V260h-51.9l-.3-43.3c-.4-41.2-.5-43.5-2.6-49.7-4-12-11.3-20.9-21.2-25.8-7.9-3.8-18.2-3.8-26.1.1-6.6 3.2-14.2 10.9-17 17.3-4.7 10.5-4.9 13.8-4.9 85.1V311h-51.7l-.8-57.3c-.9-74.3.5-99.8 6.4-117 7.8-22.6 24.8-39.1 48.1-46.6 13-4.2 28.6-4.6 42.6-1z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="7.5 7.5 81 81"><path d="M14.5 14.5L12 16.9v62.2l2.5 2.4 2.4 2.5h62.2l2.4-2.5 2.5-2.4V16.9l-2.5-2.4-2.4-2.5H16.9l-2.4 2.5zm22.7 10.6C56.7 29.3 72 48 72 67.7V72h-7.7l-.5-6.4C62.3 47.1 46.4 32 28.3 32H24v-4c0-4 0-4 4-4 2.1 0 6.3.5 9.2 1.1zM37 41.6c10.4 3.1 19 15.1 19 26.5 0 3.9 0 3.9-3.9 3.9h-3.8l-.6-5.5c-1.1-10.4-7.8-17.1-18.1-18.2l-5.6-.6v-3.8c0-3.8.1-3.9 3.8-3.9 2.1 0 6.2.7 9.2 1.6zM34 62c1.1 1.1 2 2.9 2 4 0 2.6-3.4 6-6 6s-6-3.4-6-6c0-1.1.9-2.9 2-4s2.9-2 4-2 2.9.9 4 2z"/></svg>
|
||||
|
After Width: | Height: | Size: 532 B |
|
After Width: | Height: | Size: 7.8 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-0.5 -0.5 25 25" width="64" height="32" fill="none"><g transform="translate(-12,0)"><path d="M9.3812 2.04327C7.76937 2.50154 6.2485 3.36519 4.97948 4.63421C1.00684 8.60687 1.00684 15.0478 4.97948 19.0205C8.95213 22.9932 15.3931 22.9932 19.3657 19.0205C20.6429 17.7433 21.5095 16.211 21.9654 14.5876M9.5384 2C8.6321 5.39377 9.51018 9.16492 12.1726 11.8274C14.8351 14.4899 18.6063 15.368 22 14.4617" stroke="#000" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" /></g><g transform="translate(12,0)"><path d="M17.5 17.5L19 19M20 12H22M6.5 6.5L5 5M17.5 6.5L19 5M6.5 17.5L5 19M2 12H4M12 2V4M12 20V22M16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12C8 9.79086 9.79086 8 12 8C14.2091 8 16 9.79086 16 12Z" stroke="#000" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" /></g></svg>
|
||||
|
After Width: | Height: | Size: 869 B |
@@ -0,0 +1 @@
|
||||
<svg aria-label="Threads" viewBox="0 0 192 192" xmlns="http://www.w3.org/2000/svg"><path class="x19hqcy" d="M141.537 88.9883C140.71 88.5919 139.87 88.2104 139.019 87.8451C137.537 60.5382 122.616 44.905 97.5619 44.745C97.4484 44.7443 97.3355 44.7443 97.222 44.7443C82.2364 44.7443 69.7731 51.1409 62.102 62.7807L75.881 72.2328C81.6116 63.5383 90.6052 61.6848 97.2286 61.6848C97.3051 61.6848 97.3819 61.6848 97.4576 61.6855C105.707 61.7381 111.932 64.1366 115.961 68.814C118.893 72.2193 120.854 76.925 121.825 82.8638C114.511 81.6207 106.601 81.2385 98.145 81.7233C74.3247 83.0954 59.0111 96.9879 60.0396 116.292C60.5615 126.084 65.4397 134.508 73.775 140.011C80.8224 144.663 89.899 146.938 99.3323 146.423C111.79 145.74 121.563 140.987 128.381 132.296C133.559 125.696 136.834 117.143 138.28 106.366C144.217 109.949 148.617 114.664 151.047 120.332C155.179 129.967 155.42 145.8 142.501 158.708C131.182 170.016 117.576 174.908 97.0135 175.059C74.2042 174.89 56.9538 167.575 45.7381 153.317C35.2355 139.966 29.8077 120.682 29.6052 96C29.8077 71.3178 35.2355 52.0336 45.7381 38.6827C56.9538 24.4249 74.2039 17.11 97.0132 16.9405C119.988 17.1113 137.539 24.4614 149.184 38.788C154.894 45.8136 159.199 54.6488 162.037 64.9503L178.184 60.6422C174.744 47.9622 169.331 37.0357 161.965 27.974C147.036 9.60668 125.202 0.195148 97.0695 0H96.9569C68.8816 0.19447 47.2921 9.6418 32.7883 28.0793C19.8819 44.4864 13.2244 67.3157 13.0007 95.9325L13 96L13.0007 96.0675C13.2244 124.684 19.8819 147.514 32.7883 163.921C47.2921 182.358 68.8816 191.806 96.9569 192H97.0695C122.03 191.827 139.624 185.292 154.118 170.811C173.081 151.866 172.51 128.119 166.26 113.541C161.776 103.087 153.227 94.5962 141.537 88.9883ZM98.4405 129.507C88.0005 130.095 77.1544 125.409 76.6196 115.372C76.2232 107.93 81.9158 99.626 99.0812 98.6368C101.047 98.5234 102.976 98.468 104.871 98.468C111.106 98.468 116.939 99.0737 122.242 100.233C120.264 124.935 108.662 128.946 98.4405 129.507Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="2.1 2.1 19.8 19.8"><path d="M22,3.999c-0.78,0.463-2.345,1.094-3.265,1.276c-0.027,0.007-0.049,0.016-0.075,0.023c-0.813-0.802-1.927-1.299-3.16-1.299 c-2.485,0-4.5,2.015-4.5,4.5c0,0.131-0.011,0.372,0,0.5c-3.353,0-5.905-1.756-7.735-4c-0.199,0.5-0.286,1.29-0.286,2.032 c0,1.401,1.095,2.777,2.8,3.63c-0.314,0.081-0.66,0.139-1.02,0.139c-0.581,0-1.196-0.153-1.759-0.617c0,0.017,0,0.033,0,0.051 c0,1.958,2.078,3.291,3.926,3.662c-0.375,0.221-1.131,0.243-1.5,0.243c-0.26,0-1.18-0.119-1.426-0.165 c0.514,1.605,2.368,2.507,4.135,2.539c-1.382,1.084-2.341,1.486-5.171,1.486H2C3.788,19.145,6.065,20,8.347,20 C15.777,20,20,14.337,20,8.999c0-0.086-0.002-0.266-0.005-0.447C19.995,8.534,20,8.517,20,8.499c0-0.027-0.008-0.053-0.008-0.08 c-0.003-0.136-0.006-0.263-0.009-0.329c0.79-0.57,1.475-1.281,2.017-2.091c-0.725,0.322-1.503,0.538-2.32,0.636 C20.514,6.135,21.699,4.943,22,3.999z"/></svg>
|
||||
|
After Width: | Height: | Size: 919 B |
@@ -0,0 +1,9 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: ['./layouts/**/*.html'],
|
||||
darkMode: 'class',
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [require('@tailwindcss/typography')],
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
# theme.toml template for a Hugo theme
|
||||
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
|
||||
|
||||
name = "Paper"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/nanxiaobei/hugo-paper/blob/main/LICENSE"
|
||||
description = "A simple, clean, flexible Hugo theme"
|
||||
homepage = "https://github.com/nanxiaobei/hugo-paper/"
|
||||
demosite = "https://hugo-paper.vercel.app"
|
||||
tags = ["Responsive", "Simple", "Clean", "Light", "White", "Blog"]
|
||||
features = ["Responsive", "One Column", "Blog"]
|
||||
min_version = "0.57.1"
|
||||
|
||||
[author]
|
||||
name = "nanxiaobei"
|
||||
homepage = "https://lee.so/"
|
||||