Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2d468c419 | ||
|
|
86b5c69f38 | ||
|
|
d6a64e379e | ||
|
|
7e8531701a | ||
|
|
eb4aea7577 | ||
|
|
0cb2264ad3 | ||
|
|
06784b390b | ||
|
|
1956454b79 | ||
|
|
3cd348a933 | ||
|
|
fe6e462bc7 | ||
|
|
4b069518ae | ||
|
|
6251eb0e6b | ||
|
|
5c3b2a482d | ||
|
|
c52f3c8ac1 | ||
|
|
db84030928 | ||
|
|
47dbcdec88 | ||
|
|
226b8e1de4 | ||
|
|
7537bb223f | ||
|
|
5f104d743b | ||
|
|
cccd2b1885 | ||
|
|
315e563a50 | ||
|
|
a19da195c4 | ||
|
|
5794ddcc79 | ||
|
|
3c8007f8ab | ||
|
|
7706de47fc | ||
|
|
c74dbd8592 | ||
|
|
036e9c001b | ||
|
|
0e317ae5eb | ||
|
|
5ef10eb6f2 | ||
|
|
a1ded84604 | ||
|
|
bf69dec71f | ||
|
|
5eeab919fd | ||
|
|
ac7479c14f | ||
|
|
72fbafe9c1 | ||
|
|
97c5a36e87 | ||
|
|
2378012732 | ||
|
|
748862e6a1 | ||
|
|
c096d956d4 | ||
|
|
0452d1ec94 | ||
|
|
1336235e3a | ||
|
|
f5d25b1301 | ||
|
|
4bdc993b98 | ||
|
|
9740ac233a | ||
|
|
3ba89eec3f | ||
|
|
01c333ed22 | ||
|
|
4bbceb23c9 | ||
|
|
cc9be61b29 | ||
|
|
4aba1e8642 | ||
|
|
84110306fe | ||
|
|
c3a4965b83 | ||
|
|
f343aa1ef2 | ||
|
|
fc092b506d | ||
|
|
d946136fdd | ||
|
|
ff475e3fd7 | ||
|
|
0dfff4e1ce | ||
|
|
fa57a841c3 | ||
|
|
7e5d17f08a | ||
|
|
be00e5a557 | ||
|
|
f6be88b723 | ||
|
|
b4e87ed8da | ||
|
|
90555c99e8 | ||
|
|
13e69e5662 | ||
|
|
e1a7a33b8d | ||
|
|
54a5eac466 | ||
|
|
885fea9e85 | ||
|
|
e370e8f53e | ||
|
|
b0560ad9d1 | ||
|
|
0ded7f0b44 | ||
|
|
fb3fb4d325 | ||
|
|
5c8078a888 | ||
|
|
73a42c742a | ||
|
|
241f6697e0 | ||
|
|
4dc6b44956 | ||
|
|
34127c9170 | ||
|
|
d593f3555c | ||
|
|
b8bdf094a3 | ||
|
|
ccad90ea1c | ||
|
|
78df2ff109 | ||
|
|
c4810c43c5 | ||
|
|
54a3d85421 | ||
|
|
22dea01e85 | ||
|
|
c24f2bc8c0 | ||
|
|
dbef6a2f63 | ||
|
|
027205d0b7 | ||
|
|
b93ee5b283 | ||
|
|
5aa358cab1 | ||
|
|
e784e1fbbe | ||
|
|
7fa7158798 | ||
|
|
225acda2cd | ||
|
|
a21d661df8 | ||
|
|
bdc83fba59 | ||
|
|
0593160cbd | ||
|
|
79d978aa74 | ||
|
|
9c3af5b3f8 | ||
|
|
67626597cf | ||
|
|
3989000c88 | ||
|
|
ee584bf188 | ||
|
|
e7550feb5f | ||
|
|
2b99ecb033 | ||
|
|
b85471e946 | ||
|
|
2dae7281f3 | ||
|
|
1bc289f836 | ||
|
|
b6a6d36ec9 | ||
|
|
c778c89962 | ||
|
|
ebeb91be24 | ||
|
|
6cb9d511e2 | ||
|
|
5a86f30958 | ||
|
|
898562a9b3 | ||
|
|
9f48a926ff | ||
|
|
b0ae368007 | ||
|
|
73e5435587 | ||
|
|
5feed2f148 | ||
|
|
632ffe5377 | ||
|
|
7223b0f313 | ||
|
|
11c4de59cb | ||
|
|
4b1dce0c2f | ||
|
|
ec50c93993 | ||
|
|
ed5ae84e0b | ||
|
|
6eeeb12187 | ||
|
|
0dc904aa6f | ||
|
|
6e9f8cd35d | ||
|
|
75cfb283d1 | ||
|
|
78ed2c828b | ||
|
|
a4acd26d40 | ||
|
|
0dd95d7be1 | ||
|
|
49f2c2632b | ||
|
|
5265710f2d | ||
|
|
4fad5dce34 | ||
|
|
9a25e81bb1 | ||
|
|
e11876191a | ||
|
|
512b553094 | ||
|
|
78b9e9a97b | ||
|
|
4f15ed8fe8 | ||
|
|
91dad2f09a | ||
|
|
11b433e37d | ||
|
|
1333328100 | ||
|
|
68d930da82 | ||
|
|
05ab432acb | ||
|
|
5ea29e4dff | ||
|
|
13213fdb3a | ||
|
|
862b47dc54 | ||
|
|
95812d9375 | ||
|
|
f9ac7de409 | ||
|
|
b5d40a2255 | ||
|
|
11168b0255 | ||
|
|
8b4f03f23f | ||
|
|
b87498f91f | ||
|
|
a63c853e11 | ||
|
|
4c54fb88f0 | ||
|
|
6880e4ba3b | ||
|
|
7c5611088f | ||
|
|
f997becf86 | ||
|
|
4f6e6186e0 | ||
|
|
c637c1fb1e | ||
|
|
3c41259974 | ||
|
|
d3d11c81a9 | ||
|
|
a619bb313d | ||
|
|
a46b75e48d | ||
|
|
0a6efeaabf | ||
|
|
be6fe98cab | ||
|
|
1747372731 | ||
|
|
9c05e9dbc2 | ||
|
|
80d39f6806 | ||
|
|
3154d49fea | ||
|
|
f729828601 | ||
|
|
c0fcf738e0 | ||
|
|
d199f5540f | ||
|
|
31c6c4021b | ||
|
|
a208598602 | ||
|
|
8a8901656e | ||
|
|
6ff96415ee | ||
|
|
1bb3840c1f | ||
|
|
cc597f317d | ||
|
|
225666c340 | ||
|
|
f904831878 | ||
|
|
c96836dd28 | ||
|
|
754e47fc1c | ||
|
|
fba8e58b11 | ||
|
|
8898a77d1d | ||
|
|
273adf708a | ||
|
|
47eea39a38 | ||
|
|
68b04af186 | ||
|
|
2f6f69b931 | ||
|
|
fa4aec4086 | ||
|
|
28c5a7d97a | ||
|
|
64a5a06393 | ||
|
|
e677bc6c94 | ||
|
|
bb828c37df | ||
|
|
8c659cdeb8 | ||
|
|
d467fcad30 | ||
|
|
9c5abbe7fa | ||
|
|
874528deaf | ||
|
|
89ae3c7a13 | ||
|
|
57b5b5088d | ||
|
|
7e6dfa4e0d | ||
|
|
1466892bd3 | ||
|
|
eb1d55ac69 | ||
|
|
ba3869a9b8 | ||
|
|
9ec2a52dd4 | ||
|
|
66f93c10c2 | ||
|
|
5633879ffc | ||
|
|
3aefd49526 | ||
|
|
ccaca9896c | ||
|
|
2aa462cf67 | ||
|
|
90ff325d6a | ||
|
|
eabf1c0ff7 | ||
|
|
4f847b0c60 | ||
|
|
cd0dc07dad | ||
|
|
3ac510484e | ||
|
|
40c69710f2 | ||
|
|
6c21991831 | ||
|
|
f94244fc5c | ||
|
|
e9c2f91f67 | ||
|
|
04ca1b0ea8 | ||
|
|
ec38ea21c8 | ||
|
|
5f1dac10bb | ||
|
|
2c745ba0e9 | ||
|
|
0406d122a4 | ||
|
|
449cc05af7 | ||
|
|
daad892b40 | ||
|
|
01976e2cdd | ||
|
|
34adc9b5df | ||
|
|
912aab0b95 | ||
|
|
34c4160515 | ||
|
|
bb376ea3ca | ||
|
|
f1bbd34158 | ||
|
|
7bec799857 | ||
|
|
a7967aa845 | ||
|
|
e13f653186 | ||
|
|
d7c879392a | ||
|
|
f465c57b52 | ||
|
|
e5da6f7104 | ||
|
|
9386c290c3 | ||
|
|
94fcaa84e7 | ||
|
|
6bf69710ab | ||
|
|
57ecd7631e | ||
|
|
fb140a49cf | ||
|
|
10333396a9 | ||
|
|
4786f5a6d8 | ||
|
|
1cdcb120e1 | ||
|
|
8eed05ea4c | ||
|
|
f873df21d5 | ||
|
|
78f6dacfce | ||
|
|
e4440a1848 | ||
|
|
a83885a33e | ||
|
|
f6f3d298cc | ||
|
|
c4afa25a5a | ||
|
|
63553fff74 | ||
|
|
85f3f6fafb | ||
|
|
17ecccfb80 | ||
|
|
6be5fbbea9 | ||
|
|
d8a289e04a | ||
|
|
803ed8eb05 | ||
|
|
992ef265a3 | ||
|
|
f3f9fec642 | ||
|
|
496ee817c3 | ||
|
|
af49559963 | ||
|
|
0d072e1af9 | ||
|
|
23d9926b19 | ||
|
|
92cfcd67f5 | ||
|
|
4a9e2433df | ||
|
|
5d9d7786a2 | ||
|
|
24a0baeb7f | ||
|
|
63e2524024 | ||
|
|
63f0ae9e4d | ||
|
|
7371797b1f | ||
|
|
3dd21719f1 | ||
|
|
8357e46a5e | ||
|
|
946616d8e1 | ||
|
|
b3742c5b52 | ||
|
|
7261cc00cf | ||
|
|
2941cdef6a | ||
|
|
5cf42a224f | ||
|
|
d5a9c64a7c | ||
|
|
6ad74b6295 | ||
|
|
895ce916d5 | ||
|
|
433a25658e | ||
|
|
b92f88f27c | ||
|
|
93a7b4c297 | ||
|
|
4e47e94a69 | ||
|
|
278f6dee51 | ||
|
|
3b9de18696 | ||
|
|
405c351815 | ||
|
|
96cfc46abb | ||
|
|
f7270cb4e1 | ||
|
|
7f0db69a6f | ||
|
|
8abbea4894 | ||
|
|
217cd2cd8f | ||
|
|
d052d19001 | ||
|
|
d86276c292 | ||
|
|
52fd8d2c83 | ||
|
|
2865adaaf3 | ||
|
|
0613d7c4f3 | ||
|
|
6d13296e55 | ||
|
|
3e6d431113 | ||
|
|
6c9f85f0b6 | ||
|
|
73b2f1ac08 | ||
|
|
c91c655da8 | ||
|
|
4b5daeca6d | ||
|
|
c5f606805f | ||
|
|
7574de4439 | ||
|
|
c96f3256d3 | ||
|
|
a570c1a01b | ||
|
|
8642e0116c | ||
|
|
68df1d72de | ||
|
|
6add981bc1 | ||
|
|
e72d013a5f | ||
|
|
3c34eb049f | ||
|
|
875efde235 | ||
|
|
efe6c4c5ed |
No files matched your search
@@ -1,42 +1,82 @@
|
||||
name: Build GH-Pages
|
||||
name: Deploy Hugo PaperMod Demo to Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'images/**'
|
||||
- 'LICENSE'
|
||||
- 'README.md'
|
||||
- "images/**"
|
||||
- "LICENSE"
|
||||
- "README.md"
|
||||
branches:
|
||||
- master
|
||||
- exampleSite
|
||||
workflow_dispatch:
|
||||
# manual run
|
||||
inputs:
|
||||
hugoVersion:
|
||||
description: "Hugo Version"
|
||||
required: false
|
||||
default: "latest"
|
||||
|
||||
# Allow one concurrent deployment
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
# Default to bash
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
# Build job
|
||||
build:
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HUGO_VERSION: ${{ github.event.inputs.hugoVersion || 'latest' }}
|
||||
steps:
|
||||
- name: Git checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Resolve Hugo version
|
||||
run: |
|
||||
if [ "${HUGO_VERSION}" = "latest" ]; then
|
||||
HUGO_VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep '"tag_name"' | sed 's/.*"v\([^"]*\)".*/\1/')
|
||||
echo "HUGO_VERSION=${HUGO_VERSION}" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Install Hugo CLI
|
||||
run: |
|
||||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \
|
||||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: exampleSite
|
||||
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@v6
|
||||
- name: Get Theme
|
||||
run: git submodule update --init --recursive
|
||||
|
||||
- name: Update theme to Latest commit
|
||||
run: git submodule update --remote --merge
|
||||
|
||||
- name: Setup hugo
|
||||
uses: peaceiris/actions-hugo@v2
|
||||
- name: Build with Hugo
|
||||
run: |
|
||||
hugo \
|
||||
--buildDrafts --gc \
|
||||
--baseURL ${{ steps.pages.outputs.base_url }}
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v5
|
||||
with:
|
||||
hugo-version: 'latest'
|
||||
|
||||
- name: Build
|
||||
run: hugo --buildDrafts --gc --verbose --minify
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.TOKEN }}
|
||||
publish_dir: ./public
|
||||
path: ./public
|
||||
# Deployment job
|
||||
deploy:
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v5
|
||||
@@ -0,0 +1,28 @@
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.test
|
||||
|
||||
/public
|
||||
.DS_Store
|
||||
.hugo_build.lock
|
||||
resources/_gen/
|
||||
@@ -0,0 +1,3 @@
|
||||
[submodule "themes/hugo-PaperMod"]
|
||||
path = themes/hugo-PaperMod
|
||||
url = https://github.com/adityatelange/hugo-PaperMod.git
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 nanxiaobei, adityatelange
|
||||
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
|
||||
@@ -18,4 +18,4 @@ 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.
|
||||
SOFTWARE.
|
||||
@@ -1,76 +1,57 @@
|
||||

|
||||

|
||||
[](https://themes.gohugo.io/hugo-papermod/)
|
||||
[](https://sonarcloud.io/dashboard?id=adityatelange_hugo-PaperMod)
|
||||

|
||||
# hugo-paperMod Example
|
||||
|
||||
# hugo-PaperMod | [Demo](https://adityatelange.github.io/hugo-PaperMod/)
|
||||
|
||||
☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive
|
||||
|
||||
Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper).
|
||||
|
||||
The goal of this project is add more Features and customization to the og theme.
|
||||
|
||||
The [demo site](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of documentation about Installation, Features with few more stuff. Make sure you visit it, to get the awesome hands-on experience and get known about the features ...
|
||||
|
||||
ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite). Demo is built up with exampleSite as source.
|
||||
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
<kbd><img width=600px src="https://i.ibb.co/GvspqCX/HomeInfo.png" alt="HomeInfo" /></kbd>
|
||||
<kbd><img width=153px src="https://i.ibb.co/LNgGcrt/mobileview.png" alt="HomeInfo" /></kbd>
|
||||
</p>
|
||||
|
||||
---
|
||||
This repository offers an example site for [hugo-PaperMod](https://github.com/adityatelange/hugo-PaperMod)
|
||||
|
||||
## Install
|
||||
|
||||
Read this post For More Details => [hugo-PaperMod - Installation](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-installation/)
|
||||
Read Wiki => [hugo-PaperMod - Installation](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)
|
||||
|
||||
---
|
||||
## Directory Tree
|
||||
|
||||
## Features/Mods
|
||||
|
||||
- Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default.
|
||||
- 3 Modes:
|
||||
- Regular Mode.
|
||||
- [Home-Info Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#home-info-mode)
|
||||
- [Profile Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#profile-mode)
|
||||
- Table of Content Generation (newer implementation).
|
||||
- Archive of posts
|
||||
- Social-Media Share buttons on post.
|
||||
- Menu location indicator.
|
||||
- Multilingual support.
|
||||
- Cover image for each post
|
||||
- Light/Dark theme ( automatic theme switch a/c to browser theme)
|
||||
- No webpack, nodejs and other depedencies required to edit the theme :)
|
||||
|
||||
Read this post For More Details => [hugo-PaperMod - Features](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/)
|
||||
|
||||
Release ChangeLog has info about stuff added: [Releases](https://github.com/adityatelange/hugo-PaperMod/releases)
|
||||
|
||||
---
|
||||
|
||||
## Social-Icons
|
||||
|
||||
Read this post For More Details => [Social-Icons](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-icons/)
|
||||
|
||||
---
|
||||
|
||||
## LightHouse Report
|
||||
|
||||
<kbd><a href="https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fadityatelange.github.io%2Fhugo-PaperMod%2F"><img src="https://i.ibb.co/y6RwCzb/lighthouse.png" alt="LightHouse" /></a></kbd>
|
||||
|
||||
---
|
||||
|
||||
## Found a bug?
|
||||
|
||||
If you spot any bugs, please use [Issue Tracker](https://github.com/adityatelange/hugo-PaperMod/issues) and/or
|
||||
create a new [Pull Request](https://github.com/adityatelange/hugo-PaperMod/pulls) to fix the issue.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
```
|
||||
.(site root)
|
||||
├── configTaxo.yml
|
||||
├── hugo.yaml
|
||||
├── content
|
||||
│ ├── archives.fr.md
|
||||
│ ├── archives.md
|
||||
│ ├── posts
|
||||
│ │ ├── emoji-support.md
|
||||
│ │ ├── markdown-syntax.fa.md
|
||||
│ │ ├── markdown-syntax.fr.md
|
||||
│ │ ├── markdown-syntax.md
|
||||
│ │ ├── math-typesetting.md
|
||||
│ │ ├── papermod
|
||||
│ │ │ ├── _index.md
|
||||
│ │ │ ├── papermod-faq.md
|
||||
│ │ │ ├── papermod-features
|
||||
│ │ │ │ ├── images
|
||||
│ │ │ │ │ ├── homeinfo.jpg
|
||||
│ │ │ │ │ ├── profile.jpg
|
||||
│ │ │ │ │ └── regular.jpg
|
||||
│ │ │ │ └── index.md
|
||||
│ │ │ ├── papermod-icons.md
|
||||
│ │ │ ├── papermod-installation.md
|
||||
│ │ │ └── papermod-variables.md
|
||||
│ │ ├── placeholder-text.md
|
||||
│ │ └── rich-content.md
|
||||
│ ├── search.fr.md
|
||||
│ ├── search.md
|
||||
│ └── tags
|
||||
├── LICENSE
|
||||
├── README.md
|
||||
├── resources
|
||||
│ └── _gen
|
||||
│ ├── assets
|
||||
│ └── images
|
||||
├── static
|
||||
│ ├── android-chrome-192x192.png
|
||||
│ ├── android-chrome-512x512.png
|
||||
│ ├── apple-touch-icon.png
|
||||
│ ├── favicon-16x16.png
|
||||
│ ├── favicon-32x32.png
|
||||
│ ├── favicon.ico
|
||||
│ └── papermod-cover.png
|
||||
└── themes
|
||||
└── hugo-PaperMod
|
||||
```
|
||||
@@ -1,13 +0,0 @@
|
||||
/* 404
|
||||
-------------------------------------------------- */
|
||||
.not-found {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 80%;
|
||||
font-size: 160px;
|
||||
font-weight: 700;
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #b6b18b
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-id,
|
||||
.hljs-tag,
|
||||
.hljs-template-variable,
|
||||
.hljs-variable {
|
||||
color: #eb3c54
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-link,
|
||||
.hljs-literal,
|
||||
.hljs-meta,
|
||||
.hljs-number,
|
||||
.hljs-params,
|
||||
.hljs-type {
|
||||
color: #e7ce56
|
||||
}
|
||||
|
||||
.hljs-attribute {
|
||||
color: #ee7c2b
|
||||
}
|
||||
|
||||
.hljs-addition,
|
||||
.hljs-bullet,
|
||||
.hljs-string,
|
||||
.hljs-symbol {
|
||||
color: #4fb4d7
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-title {
|
||||
color: #78bb65
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #b45ea4
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #1c1d21;
|
||||
color: #c0c5ce;
|
||||
padding: .5em
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: 700
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
/* Archive
|
||||
-------------------------------------------------- */
|
||||
.archive-posts {
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.archive-year {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.archive-year:not(:last-of-type) {
|
||||
border-bottom: 2px solid var(--border);
|
||||
}
|
||||
|
||||
.archive-month {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.archive-month-header {
|
||||
margin: 25px 0;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.archive-month:not(:last-of-type) {
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.archive-entry {
|
||||
position: relative;
|
||||
padding: 5px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.archive-entry-title {
|
||||
margin: 5px 0;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.archive-meta {
|
||||
color: var(--secondary);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.archive-count {
|
||||
color: var(--secondary);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.archive-month {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.archive-year {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Custom styles added to demo */
|
||||
|
||||
iframe {
|
||||
border-radius: var(--radius) !important;
|
||||
}
|
||||
|
||||
.entry-cover img {
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/* Footer
|
||||
-------------------------------------------------- */
|
||||
.footer {
|
||||
max-width: calc(var(--main-width) + var(--gap) * 2);
|
||||
margin: auto;
|
||||
padding: calc((var(--footer-height) - (var(--gap)) - 10px) / 2) var(--gap);
|
||||
color: var(--secondary);
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.footer span {
|
||||
margin-left: 1px;
|
||||
margin-right: 1px;
|
||||
}
|
||||
|
||||
.footer a {
|
||||
color: inherit;
|
||||
border-bottom: 1px solid var(--secondary);
|
||||
}
|
||||
|
||||
.footer a:hover {
|
||||
color: var(--primary);
|
||||
border-bottom: 1px solid var(--primary);
|
||||
}
|
||||
|
||||
.top-link {
|
||||
font-size: 12px;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
position: fixed;
|
||||
bottom: 60px;
|
||||
right: 30px;
|
||||
z-index: 99;
|
||||
background: var(--tertiary);
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
padding: 12px;
|
||||
color: var(--secondary);
|
||||
border-radius: 64px;
|
||||
fill: currentColor;
|
||||
fill-opacity: 80%;
|
||||
transition: visibility 0.5s,
|
||||
opacity 0.8s linear;
|
||||
}
|
||||
|
||||
.top-link:hover {
|
||||
color: var(--primary);
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
/* Header
|
||||
-------------------------------------------------- */
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
max-width: calc(var(--nav-width) + var(--gap) * 2);
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.nav a {
|
||||
display: block;
|
||||
line-height: var(--header-height);
|
||||
}
|
||||
|
||||
.logo,
|
||||
.menu {
|
||||
display: flex;
|
||||
margin: auto var(--gap);
|
||||
}
|
||||
|
||||
.logo a {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.theme-toggle svg{
|
||||
height: 18px;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
body.dark #moon{
|
||||
vertical-align: middle;
|
||||
display: none;
|
||||
}
|
||||
|
||||
body:not(.dark) #sun {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.menu {
|
||||
list-style: none;
|
||||
word-break: keep-all;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.menu li+li {
|
||||
margin-left: var(--gap);
|
||||
}
|
||||
|
||||
.menu a {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.menu .active {
|
||||
font-weight: 500;
|
||||
border-bottom: 2px solid currentColor;
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/* Main
|
||||
-------------------------------------------------- */
|
||||
.main {
|
||||
position: relative;
|
||||
min-height: calc(100vh - var(--header-height) - var(--footer-height));
|
||||
max-width: calc(var(--main-width) + var(--gap) * 2);
|
||||
margin: auto;
|
||||
padding: var(--gap);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 400px) {
|
||||
.main {
|
||||
min-height: calc(100vh - var(--header-height) - var(--footer-height) - 24px);
|
||||
}
|
||||
}
|
||||
|
||||
.page-header {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.page-header h1 {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.pagination a {
|
||||
color: var(--theme);
|
||||
font-size: 13px;
|
||||
line-height: 36px;
|
||||
background: var(--primary);
|
||||
border-radius: calc(36px / 2);
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.pagination .next {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.social-icons {
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.social-icons a:not(:last-of-type) {
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.social-icons a svg {
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
/* Post entry
|
||||
-------------------------------------------------- */
|
||||
.first-entry {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-height: 320px;
|
||||
margin: var(--gap) 0 calc(var(--gap) * 2) 0;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.first-entry {
|
||||
min-height: 260px;
|
||||
}
|
||||
}
|
||||
|
||||
.first-entry .entry-header {
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
}
|
||||
|
||||
.first-entry .entry-header h2 {
|
||||
font-size: 34px;
|
||||
}
|
||||
|
||||
.first-entry .entry-content {
|
||||
margin: 14px 0;
|
||||
font-size: 16px;
|
||||
-webkit-line-clamp: 3;
|
||||
}
|
||||
|
||||
.first-entry .entry-footer {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.post-entry {
|
||||
position: relative;
|
||||
margin-bottom: var(--gap);
|
||||
padding: var(--gap);
|
||||
background: var(--entry);
|
||||
border-radius: var(--radius);
|
||||
transition: transform 0.1s;
|
||||
}
|
||||
|
||||
.post-entry:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
|
||||
.tag-entry .entry-content,
|
||||
.tag-entry .entry-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.entry-header h2 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.entry-content {
|
||||
margin: 8px 0;
|
||||
color: var(--secondary);
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.entry-footer {
|
||||
color: var(--secondary);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.entry-link {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.entry-isdraft {
|
||||
display: inline;
|
||||
color: var(--secondary);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.entry-cover {
|
||||
margin-bottom: var(--gap);
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
color: var(--secondary);
|
||||
}
|
||||
|
||||
.entry-cover img {
|
||||
border-radius: var(--radius);
|
||||
pointer-events: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.entry-cover a {
|
||||
color: var(--secondary);
|
||||
box-shadow: 0 1px 0 var(--primary);
|
||||
}
|
||||
@@ -1,318 +0,0 @@
|
||||
/* Post single
|
||||
-------------------------------------------------- */
|
||||
.post-header {
|
||||
margin: 24px auto var(--content-gap) auto
|
||||
}
|
||||
|
||||
.post-title {
|
||||
margin-bottom: 2px;
|
||||
font-size: 40px;
|
||||
transform: translateX(-2px);
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
color: var(--secondary);
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.post-meta .i18n_list li {
|
||||
display: inline-flex;
|
||||
list-style: none;
|
||||
margin: auto 3px;
|
||||
box-shadow: 0 1px 0 var(--secondary);
|
||||
}
|
||||
|
||||
.post-content {
|
||||
color: var(--content);
|
||||
}
|
||||
|
||||
.post-content h3,
|
||||
.post-content h4,
|
||||
.post-content h5,
|
||||
.post-content h6 {
|
||||
margin: 24px 0 16px 0;
|
||||
}
|
||||
|
||||
.post-content h1 {
|
||||
margin: 40px auto 32px auto;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.post-content h2 {
|
||||
margin: 32px auto 24px auto;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.post-content h3 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.post-content h4 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.post-content h5 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.post-content h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.post-content a {
|
||||
box-shadow: 0 1px 0 var(--primary);
|
||||
}
|
||||
|
||||
.post-content a code {
|
||||
margin: auto 0;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 -1px 0 var(--primary) inset;
|
||||
}
|
||||
|
||||
.post-content del {
|
||||
text-decoration: none;
|
||||
background: linear-gradient(to right, var(--primary) 100%, transparent 0) 0 50% / 1px 1px repeat-x;
|
||||
}
|
||||
|
||||
.post-content p,
|
||||
.post-content ul,
|
||||
.post-content ol,
|
||||
.post-content dl {
|
||||
margin-bottom: var(--content-gap);
|
||||
}
|
||||
|
||||
.post-content ul,
|
||||
.post-content ol {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.post-content li {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.post-content li p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.post-content dl {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.post-content dt {
|
||||
width: 25%;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.post-content dd {
|
||||
width: 75%;
|
||||
margin-left: 0;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.post-content dt~dt,
|
||||
.post-content dd~dd {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.post-content table {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.post-content table th,
|
||||
.post-content table:not(.highlighttable) td {
|
||||
min-width: 80px;
|
||||
padding: 12px 8px;
|
||||
line-height: 1.5;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.post-content table th {
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.post-content table:not(.highlighttable) td code:only-child {
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
.post-content .highlight,
|
||||
.post-content pre {
|
||||
margin: auto calc(var(--gap) * -1) 32px calc(var(--gap) * -1);
|
||||
background: var(--hljs-bg) !important;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.post-content li>.highlight {
|
||||
margin-right: 0
|
||||
}
|
||||
|
||||
.post-content ul pre {
|
||||
margin-left: calc(var(--gap) * -2);
|
||||
}
|
||||
|
||||
.post-content .highlight pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* table */
|
||||
.post-content .highlighttable {
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.post-content .highlighttable td:first-child {
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.post-content .highlighttable td .linenodiv {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.post-content .highlighttable td .linenodiv pre,
|
||||
.post-content .highlighttable td .highlight {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.post-content .highlighttable td .highlight pre code::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* inline */
|
||||
.post-content .highlight span {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
.post-content code {
|
||||
margin: auto 4px;
|
||||
padding: 4px 6px;
|
||||
font-family: Menlo, Monaco, 'Courier New', Courier, monospace;
|
||||
font-size: 0.78em;
|
||||
line-height: 1.5;
|
||||
background: var(--code-bg);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.post-content pre code {
|
||||
display: block;
|
||||
margin: auto 0;
|
||||
padding: 10px;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.post-content blockquote {
|
||||
margin: 0 calc(var(--gap) * -1);
|
||||
padding: 0 32px;
|
||||
border-left: 2px solid var(--primary);
|
||||
}
|
||||
|
||||
.post-content hr {
|
||||
margin: 30px calc(var(--gap) * -1);
|
||||
height: 2px;
|
||||
background: var(--tertiary);
|
||||
border-top: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.post-content iframe {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.post-content img {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.toc {
|
||||
margin-bottom: 40px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: .5em;
|
||||
}
|
||||
|
||||
.toc details summary {
|
||||
cursor: zoom-in;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.toc details[open] summary {
|
||||
cursor: zoom-out;
|
||||
}
|
||||
|
||||
.toc .details {
|
||||
display: inline;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.toc blockquote {
|
||||
margin: 0 20px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.toc li ul {
|
||||
margin-left: var(--gap);
|
||||
}
|
||||
|
||||
.post-footer {
|
||||
margin-top: 56px;
|
||||
}
|
||||
|
||||
.post-tags li {
|
||||
display: inline-block;
|
||||
margin-right: 3px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.post-tags a {
|
||||
display: block;
|
||||
padding-left: 14px;
|
||||
padding-right: 14px;
|
||||
color: var(--secondary);
|
||||
font-size: 14px;
|
||||
line-height: 34px;
|
||||
background: var(--code-bg);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.post-tags a:hover {
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
.share-buttons {
|
||||
margin-top: var(--gap);
|
||||
border: 1px solid var(--tertiary);
|
||||
padding: var(--radius);
|
||||
border-radius: var(--radius);
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.share-buttons a {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.share-buttons a:not(:last-of-type) {
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.share-buttons a svg {
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
fill: currentColor;
|
||||
transition: transform 0.1s;
|
||||
}
|
||||
|
||||
.share-buttons svg:hover {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.post-content blockquote {
|
||||
margin: 0 calc(var(--gap) * -1);
|
||||
padding: 0 21px;
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
.main {
|
||||
text-align: center;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.main>.profile {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.main>.profile>.profile_inner {
|
||||
transform: translate(0, -10%);
|
||||
}
|
||||
|
||||
.profile_inner h1 {
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.profile_inner span {
|
||||
padding: 10px 0;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
img {
|
||||
display: inline-table;
|
||||
width: 180px;
|
||||
border-radius: 50%;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
img {
|
||||
width: 150px;
|
||||
}
|
||||
.main>.profile>.profile_inner {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.button {
|
||||
background: var(--tertiary);
|
||||
border-radius: var(--radius);
|
||||
margin: 8px;
|
||||
padding: 6px;
|
||||
transition: transform 0.1s;
|
||||
}
|
||||
|
||||
.button-inner {
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.button:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
@@ -1,142 +0,0 @@
|
||||
/* Reset
|
||||
-------------------------------------------------- */
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
color: var(--primary);
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
|
||||
'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
font-size: 18px;
|
||||
line-height: 1.6;
|
||||
word-break: break-word;
|
||||
background: var(--theme);
|
||||
}
|
||||
|
||||
article,
|
||||
aside,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
color: var(--primary);
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
strong,
|
||||
b {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--primary);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
display: block;
|
||||
overflow-x: scroll;
|
||||
word-break: keep-all;
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
textarea {
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
button,
|
||||
input[type='button'],
|
||||
input[type='submit'] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input:-webkit-autofill,
|
||||
textarea:-webkit-autofill {
|
||||
box-shadow: 0 0 0 50px var(--theme) inset;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-track {
|
||||
background: var(--theme);
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-thumb {
|
||||
background: var(--tertiary);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--secondary);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
*::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
*:focus {
|
||||
outline:none;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
.terms-tags li {
|
||||
display: inline-block;
|
||||
margin: 10px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.terms-tags a {
|
||||
display: block;
|
||||
padding: 3px 10px;
|
||||
background: var(--tertiary);
|
||||
border-radius: 6px;
|
||||
transition: transform 0.1s;
|
||||
}
|
||||
|
||||
.terms-tags a:hover {
|
||||
background: var(--tertiary);
|
||||
transform: scale(0.96);
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
/* Theme
|
||||
-------------------------------------------------- */
|
||||
:root {
|
||||
--gap: 24px;
|
||||
--content-gap: 20px;
|
||||
--nav-width: 1024px;
|
||||
--main-width: 720px;
|
||||
--header-height: 60px;
|
||||
--footer-height: 60px;
|
||||
--radius: 8px;
|
||||
|
||||
--theme: #fff;
|
||||
--entry: #fff;
|
||||
--primary: rgba(0, 0, 0, 0.88);
|
||||
--secondary: rgba(0, 0, 0, 0.56);
|
||||
--tertiary: rgba(0, 0, 0, 0.16);
|
||||
--content: rgba(0, 0, 0, 0.88);
|
||||
|
||||
--hljs-bg: #1c1d21;
|
||||
--code-bg: #f5f5f5;
|
||||
--border: #eee;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
:root {
|
||||
--gap: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.dark {
|
||||
--theme: #1d1e20;
|
||||
--entry: #2e2e33;
|
||||
--primary: rgba(255, 255, 255, 0.84);
|
||||
--secondary: rgba(255, 255, 255, 0.56);
|
||||
--tertiary: rgba(255, 255, 255, 0.16);
|
||||
--content: rgba(255, 255, 255, 0.64);
|
||||
|
||||
--hljs-bg: #2e2e33;
|
||||
--code-bg: #37383e;
|
||||
--border: #5b5d67;
|
||||
}
|
||||
|
||||
.list {
|
||||
background: var(--code-bg);
|
||||
}
|
||||
|
||||
.dark.list {
|
||||
background: var(--theme);
|
||||
}
|
||||
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 86 KiB |
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
Highlight.js 10.2.0 (da7d149b)
|
||||
License: BSD-3-Clause
|
||||
Copyright (c) 2006-2020, Ivan Sagalaev
|
||||
*/
|
||||
var hljs=function(){"use strict";function e(n){Object.freeze(n);var t="function"==typeof n;return Object.getOwnPropertyNames(n).forEach((function(r){!Object.hasOwnProperty.call(n,r)||null===n[r]||"object"!=typeof n[r]&&"function"!=typeof n[r]||t&&("caller"===r||"callee"===r||"arguments"===r)||Object.isFrozen(n[r])||e(n[r])})),n}class n{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}ignoreMatch(){this.ignore=!0}}function t(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(e,...n){var t={};for(const n in e)t[n]=e[n];return n.forEach((function(e){for(const n in e)t[n]=e[n]})),t}function a(e){return e.nodeName.toLowerCase()}var i=Object.freeze({__proto__:null,escapeHTML:t,inherit:r,nodeStream:function(e){var n=[];return function e(t,r){for(var i=t.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:r,node:i}),r=e(i,r),a(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:r,node:i}));return r}(e,0),n},mergeStreams:function(e,n,r){var i=0,s="",o=[];function l(){return e.length&&n.length?e[0].offset!==n[0].offset?e[0].offset<n[0].offset?e:n:"start"===n[0].event?e:n:e.length?e:n}function c(e){s+="<"+a(e)+[].map.call(e.attributes,(function(e){return" "+e.nodeName+'="'+t(e.value)+'"'})).join("")+">"}function u(e){s+="</"+a(e)+">"}function g(e){("start"===e.event?c:u)(e.node)}for(;e.length||n.length;){var d=l();if(s+=t(r.substring(i,d[0].offset)),i=d[0].offset,d===e){o.reverse().forEach(u);do{g(d.splice(0,1)[0]),d=l()}while(d===e&&d.length&&d[0].offset===i);o.reverse().forEach(c)}else"start"===d[0].event?o.push(d[0].node):o.pop(),g(d.splice(0,1)[0])}return s+t(r.substr(i))}});const s="</span>",o=e=>!!e.kind;class l{constructor(e,n){this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){this.buffer+=t(e)}openNode(e){if(!o(e))return;let n=e.kind;e.sublanguage||(n=`${this.classPrefix}${n}`),this.span(n)}closeNode(e){o(e)&&(this.buffer+=s)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}class c{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const n={kind:e,children:[]};this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),n.children.forEach(n=>this._walk(e,n)),e.closeNode(n)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{c._collapse(e)}))}}class u extends c{constructor(e){super(),this.options=e}addKeyword(e,n){""!==e&&(this.openNode(n),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,n){const t=e.root;t.kind=n,t.sublanguage=!0,this.add(t)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function g(e){return e?"string"==typeof e?e:e.source:null}const d="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",h={begin:"\\\\[\\s\\S]",relevance:0},f={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[h]},p={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[h]},m={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},b=function(e,n,t={}){var a=r({className:"comment",begin:e,end:n,contains:[]},t);return a.contains.push(m),a.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),a},v=b("//","$"),x=b("/\\*","\\*/"),E=b("#","$");var _=Object.freeze({__proto__:null,IDENT_RE:"[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE:"[a-zA-Z_]\\w*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:d,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map(e=>g(e)).join("")}(n,/.*\b/,e.binary,/\b.*/)),r({className:"meta",begin:n,end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)},BACKSLASH_ESCAPE:h,APOS_STRING_MODE:f,QUOTE_STRING_MODE:p,PHRASAL_WORDS_MODE:m,COMMENT:b,C_LINE_COMMENT_MODE:v,C_BLOCK_COMMENT_MODE:x,HASH_COMMENT_MODE:E,NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},C_NUMBER_MODE:{className:"number",begin:d,relevance:0},BINARY_NUMBER_MODE:{className:"number",begin:"\\b(0b[01]+)",relevance:0},CSS_NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0Line truncated
|
||||
hljs.registerLanguage("apache",function(){"use strict";return function(e){var n={className:"number",begin:"\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?"};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:"</?",end:">",contains:[n,{className:"number",begin:":\\d{1,5}"},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{className:"meta",begin:"\\s\\[",end:"\\]$"},{className:"variable",begin:"[\\$%]\\{",end:"\\}",contains:["self",{className:"number",begin:"[\\$%]\\d+"}]},n,{className:"number",begin:"\\d+"},e.QUOTE_STRING_MODE]}}],illegal:/\S/}}}());
|
||||
hljs.registerLanguage("bash",function(){"use strict";return function(e){const s={};Object.assign(s,{className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{/,end:/\}/,contains:[{begin:/:-/,contains:[s]}]}]});const t={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,t]};t.contains.push(n);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,s]},i=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b-?[a-z\._-]+\b/,keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[i,e.SHEBANG(),c,a,e.HASH_COMMENT_MODE,n,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},s]}}}());
|
||||
hljs.registerLanguage("c-like",function(){"use strict";return function(e){function t(e){return"(?:"+e+")?"}var n="(decltype\\(auto\\)|"+t("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t("<.*?>")+")",r={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},i={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},s={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},o={className:"title",begin:t("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},c=t("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",l={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},d=[r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,a],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:l,contains:d.concat([{begin:/\(/,end:/\)/,keywords:l,contains:d.concat(["self"]),relevance:0}]),relevance:0},u={className:"function",begin:"("+n+"[\\*&\\s]+)+"+c,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:l,illegal:/[^\w\s\*&:<>]/,contains:[{begin:"decltype\\(auto\\)",keywords:l,relevance:0},{begin:c,returnBegin:!0,contains:[o],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,i,r,{begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:["self",e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,i,r]}]},r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s]};return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:l,disableAutodetect:!0,illegal:"</",contains:[].concat(_,u,d,[s,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",end:">",keywords:l,contains:["self",r]},{begin:e.IDENT_RE+"::",keywords:l},{className:"class",beginKeywords:"class struct",end:/[{;:]/,contains:[{begin:/</,end:/>/,contains:["self"]},e.TITLE_MODE]}]),exports:{preprocessor:s,strings:a,keywords:l}}}}());
|
||||
hljs.registerLanguage("c",function(){"use strict";return function(e){var n=e.requireLanguage("c-like").rawDefinition();return n.name="C",n.aliases=["c","h"],n}}());
|
||||
hljs.registerLanguage("coffeescript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);return function(r){var t={keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((e=>n=>!e.includes(n))(["var","const","let","function","static"])).join(" "),literal:n.concat(["yes","no","on","off"]).join(" "),built_in:a.concat(["npm","print"]).join(" ")},i="[A-Za-z$_][0-9A-Za-z$_]*",s={className:"subst",begin:/#\{/,end:/}/,keywords:t},o=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[r.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[r.BACKSLASH_ESCAPE,s]},{begin:/"/,end:/"/,contains:[r.BACKSLASH_ESCAPE,s]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[s,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+i},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];s.contains=o;var c=r.inherit(r.TITLE_MODE,{begin:i}),l={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(o)}]};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:o.concat([r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+i+"\\s*=\\s*(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[c,l]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:"(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[l]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[c]},c]},{begin:i+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}());
|
||||
hljs.registerLanguage("cpp",function(){"use strict";return function(e){var i=e.requireLanguage("c-like").rawDefinition();return i.disableAutodetect=!1,i.name="C++",i.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],i}}());
|
||||
hljs.registerLanguage("csharp",function(){"use strict";return function(e){var n={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in init int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let nameof on orderby partial remove select set value var when where yield",literal:"null false true"},i=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},s={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},t=e.inherit(s,{illegal:/\n/}),l={className:"subst",begin:"{",end:"}",keywords:n},r=e.inherit(l,{illegal:/\n/}),c={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},e.BACKSLASH_ESCAPE,r]},o={className:"string",begin:/\$@"/,end:'"',contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},l]},g=e.inherit(o,{illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},r]});l.contains=[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],r.contains=[g,c,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];var d={variants:[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},i]},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",b={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},d,a,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},i,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",end:/[{;=]/,illegal:/[^\s:]/,contains:[i,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"meta-string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{begin:e.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE,E],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0,contains:[d,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},b]}}}());
|
||||
hljs.registerLanguage("css",function(){"use strict";return function(e){var n={begin:/(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{name:"CSS",case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",illegal:/:/,returnBegin:!0,contains:[{className:"keyword",begin:/@\-?\w[\w]*(\-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/,className:"attribute"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,n]}]}}}());
|
||||
hljs.registerLanguage("diff",function(){"use strict";return function(e){return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^\-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"addition",begin:"^\\!",end:"$"}]}}}());
|
||||
hljs.registerLanguage("go",function(){"use strict";return function(e){var n={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{name:"Go",aliases:["golang"],keywords:n,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1},e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:n,illegal:/["']/}]}]}}}());
|
||||
hljs.registerLanguage("http",function(){"use strict";return function(e){var n="HTTP/[0-9\\.]+";return{name:"HTTP",aliases:["https"],illegal:"\\S",contains:[{begin:"^"+n,end:"$",contains:[{className:"number",begin:"\\b\\d{3}\\b"}]},{begin:"^[A-Z]+ (.*?) "+n+"$",returnBegin:!0,end:"$",contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{begin:n},{className:"keyword",begin:"[A-Z]+"}]},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{end:"$",relevance:0}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}}}());
|
||||
hljs.registerLanguage("ini",function(){"use strict";function e(e){return e?"string"==typeof e?e:e.source:null}function n(...n){return n.map(n=>e(n)).join("")}return function(a){var s={className:"number",relevance:0,variants:[{begin:/([\+\-]+)?[\d]+_[\d_]+/},{begin:a.NUMBER_RE}]},i=a.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];var t={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,s,"self"],relevance:0},g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map(n=>e(n)).join("|")+")";return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr",starts:{end:/$/,contains:[i,c,r,t,l,s]}}]}}}());
|
||||
hljs.registerLanguage("java",function(){"use strict";function e(e){return e?"string"==typeof e?e:e.source:null}function n(e){return a("(",e,")?")}function a(...n){return n.map(n=>e(n)).join("")}function s(...n){return"("+n.map(n=>e(n)).join("|")+")"}return function(e){var t="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",i={className:"meta",begin:"@[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},r=e=>a("[",e,"]+([",e,"_]*[",e,"]+)?"),c={className:"number",variants:[{begin:`\\b(0[bB]${r("01")})[lL]?`},{begin:`\\b(0${r("0-7")})[dDfFlL]?`},{begin:a(/\b0[xX]/,s(a(r("a-fA-F0-9"),/\./,r("a-fA-F0-9")),a(r("a-fA-F0-9"),/\.?/),a(/\./,r("a-fA-F0-9"))),/([pP][+-]?(\d+))?/,/[fFdDlL]?/)},{begin:a(/\b/,s(a(/\d*\./,r("\\d")),r("\\d")),/[eE][+-]?[\d]+[dDfF]?/)},{begin:a(/\b/,r(/\d/),n(/\.?/),n(r(/\d/)),/[dDfFlL]?/)}],relevance:0};return{name:"Java",aliases:["jsp"],keywords:t,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface enum",end:/[{;=]/,excludeEnd:!0,keywords:"class interface enum",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"([À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(<[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:[i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},c,i]}}}());
|
||||
hljs.registerLanguage("javascript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function s(e){return r("(?=",e,")")}function r(...e){return e.map(e=>(function(e){return e?"string"==typeof e?e:e.source:null})(e)).join("")}return function(t){var i="[A-Za-z$_][0-9A-Za-z$_]*",c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/},o={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:e.join(" "),literal:n.join(" "),built_in:a.join(" ")},l={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:t.C_NUMBER_RE+"n?"}],relevance:0},E={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},g={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"css"}},u={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,E]};E.contains=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,d,g,u,l,t.REGEXP_MODE];var b=E.contains.concat([{begin:/\(/,end:/\)/,contains:["self"].concat(E.contains,[t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE])},t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]),_={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:b};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,contains:[t.SHEBANG({binary:"node",relevance:5}),{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,d,g,u,t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,l,{begin:r(/[{,\n]\s*/,s(r(/(((\/\/.*$)|(\/\*(.|\n)*\*\/))\s*)*/,i+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:i+s("\\s*:"),relevance:0}]},{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.REGEXP_MODE,{className:"function",begin:"(\\([^(]*(\\([^(]*(\\([^(]*\\))?\\))?\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:b}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:"<>",end:"</>"},{begin:c.begin,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[t.inherit(t.TITLE_MODE,{begin:i}),_],illegal:/\[|%/},{begin:/\$[(.]/},t.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0},{begin:"(get|set)\\s+(?="+i+"\\()",end:/{/,keywords:"get set",contains:[t.inherit(t.TITLE_MODE,{begin:i}),{begin:/\(\)/},_]}],illegal:/#(?!!)/}}}());
|
||||
hljs.registerLanguage("json",function(){"use strict";return function(n){var e={literal:"true false null"},i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],t=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],a={end:",",endsWithParent:!0,excludeEnd:!0,contains:t,keywords:e},l={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(a,{begin:/:/})].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(a)],illegal:"\\S"};return t.push(l,s),i.forEach((function(n){t.push(n)})),{name:"JSON",contains:t,keywords:e,illegal:"\\S"}}}());
|
||||
hljs.registerLanguage("kotlin",function(){"use strict";return function(e){var n={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:"\\${",end:"}",contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},t={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(t);var r={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(t,{className:"meta-string"})]}]},c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),o={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},d=o;return d.variants[1].contains=[o],o.variants[1].contains=[d],{name:"Kotlin",aliases:["kt"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a,r,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:n,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[o,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,r,l,t,e.C_NUMBER_MODE]},c]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},r,l]},t,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},{className:"number",begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",relevance:0}]}}}());
|
||||
hljs.registerLanguage("less",function(){"use strict";return function(e){var n="([\\w-]+|@{[\\w-]+})",a=[],s=[],t=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},r=function(e,n,a){return{className:e,begin:n,relevance:a}},i={begin:"\\(",end:"\\)",contains:s,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t("'"),t('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},r("number","#[0-9A-Fa-f]+\\b"),i,r("variable","@@?[\\w-]+",10),r("variable","@{[\\w-]+}"),r("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"});var c=s.concat({begin:"{",end:"}",contains:a}),l={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},o={begin:n+"\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:n,end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},g={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:s,relevance:0}},d={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:c}},b={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l,r("keyword","all\\b"),r("variable","@{[\\w-]+}"),r("selector-tag",n+"%?",0),r("selector-id","#"+n),r("selector-class","\\."+n,0),r("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:c},{begin:"!important"}]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,d,o,b),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:a}}}());
|
||||
hljs.registerLanguage("lua",function(){"use strict";return function(e){var t={begin:"\\[=*\\[",end:"\\]=*\\]",contains:["self"]},a=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[","\\]=*\\]",{contains:[t],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:a.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:a}].concat(a)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"\\[=*\\[",end:"\\]=*\\]",contains:[t],relevance:5}])}}}());
|
||||
hljs.registerLanguage("makefile",function(){"use strict";return function(e){var i={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[i]},r={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[i]};return{name:"Makefile",aliases:["mk","mak"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,i,n,a,r,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,"meta-keyword":".PHONY"}},s]}}}());
|
||||
hljs.registerLanguage("xml",function(){"use strict";return function(e){var n={className:"symbol",begin:"&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;"},a={begin:"\\s",contains:[{className:"meta-keyword",begin:"#?[a-z_][a-z1-9_-]+",illegal:"\\n"}]},s=e.inherit(a,{begin:"\\(",end:"\\)"}),t=e.inherit(e.APOS_STRING_MODE,{className:"meta-string"}),i=e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:"[A-Za-z0-9\\._:-]+",relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[n]},{begin:/'/,end:/'/,contains:[n]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin:"<![a-z]",end:">",relevance:10,contains:[a,i,t,s,{begin:"\\[",end:"\\]",contains:[{className:"meta",begin:"<![a-z]",end:">",contains:[a,s,i,t]}]}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:"<style(?=\\s|>)",end:">",keywords:{name:"style"},contains:[c],starts:{end:"</style>",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:"<script(?=\\s|>)",end:">",keywords:{name:"script"},contains:[c],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:"</?",end:"/?>",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},c]}]}}}());
|
||||
hljs.registerLanguage("markdown",function(){"use strict";return function(n){const e={begin:"<",end:">",subLanguage:"xml",relevance:0},a={begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},i={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},s={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};i.contains.push(s),s.contains.push(i);var c=[e,a];return i.contains=i.contains.concat(c),s.contains=s.contains.concat(c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:c=c.concat(i,s)},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:c}]}]},e,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i,s,{className:"quote",begin:"^>\\s+",contains:c,end:"$"},{className:"code",variants:[{begin:"(`{3,})(.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})(.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},a,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}}());
|
||||
hljs.registerLanguage("nginx",function(){"use strict";return function(e){var n={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+e.UNDERSCORE_IDENT_RE}]},a={endsWithParent:!0,keywords:{$pattern:"[a-z/_]+",literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},n]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE+"\\s+{",returnBegin:!0,end:"{",contains:[{className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:a}],relevance:0}],illegal:"[^\\s\\}]"}}}());
|
||||
hljs.registerLanguage("objectivec",function(){"use strict";return function(e){var n=/[a-zA-Z@][a-zA-Z0-9_]*/,_={$pattern:n,keyword:"@interface @class @protocol @implementation"};return{name:"Objective-C",aliases:["mm","objc","obj-c"],keywords:{$pattern:n,keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},illegal:"</",contains:[{className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+_.keyword.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:_,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}}());
|
||||
hljs.registerLanguage("perl",function(){"use strict";return function(e){var n={$pattern:/[\w.]+/,keyword:"getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qq fileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmget sub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedir ioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when"},t={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:n},s={begin:"->{",end:"}"},r={variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},i=[e.BACKSLASH_ESCAPE,t,r],a=[r,e.HASH_COMMENT_MODE,e.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),s,{className:"string",contains:i,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[e.BACKSLASH_ESCAPE],relevance:0}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return t.contains=a,s.contains=a,{name:"Perl",aliases:["pl","pm"],keywords:n,contains:a}}}());
|
||||
hljs.registerLanguage("php",function(){"use strict";return function(e){var r={begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},t={className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},a={className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},n=e.inherit(e.APOS_STRING_MODE,{illegal:null}),i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),o=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),l={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[e.inherit(n,{begin:"b'",end:"'"}),e.inherit(i,{begin:'b"',end:'"'}),i,n,o]},s={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},c={keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list new object or private protected public real return string switch throw trait try unset use var void while xor yield",literal:"false null true",built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Throwable Traversable WeakReference Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass"};return{aliases:["php","php3","php4","php5","php6","php7"],case_insensitive:!0,keywords:c,contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[t]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler"}),t,{className:"keyword",begin:/\$this\b/},r,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",r,e.C_BLOCK_COMMENT_MODE,l,s]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},l,s]}}}());
|
||||
hljs.registerLanguage("php-template",function(){"use strict";return function(n){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},n.inherit(n.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),n.inherit(n.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}}());
|
||||
hljs.registerLanguage("plaintext",function(){"use strict";return function(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}}());
|
||||
hljs.registerLanguage("properties",function(){"use strict";return function(e){var n="[ \\t\\f]*",t="("+n+"[:=]"+n+"|[ \\t\\f]+)",a="([^\\\\:= \\t\\f\\n]|\\\\.)+",s={end:t,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\n"}]}};return{name:".properties",case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+"+t,returnBegin:!0,contains:[{className:"attr",begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",endsParent:!0,relevance:0}],starts:s},{begin:a+t,returnBegin:!0,relevance:0,contains:[{className:"meta",begin:a,endsParent:!0,relevance:0}],starts:s},{className:"attr",relevance:0,begin:a+n+"$"}]}}}());
|
||||
hljs.registerLanguage("python",function(){"use strict";return function(e){var n={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10",built_in:"Ellipsis NotImplemented",literal:"False None True"},a={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:n,illegal:/#/},s={begin:/\{\{/,relevance:0},r={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/(fr|rf|f)'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/(fr|rf|f)"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},{begin:/(fr|rf|f)'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,i]},{begin:/(fr|rf|f)"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},t={className:"params",variants:[{begin:/\(\s*\)/,skip:!0,className:null},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:["self",a,l,r,e.HASH_COMMENT_MODE]}]};return i.contains=[r,l,a],{name:"Python",aliases:["py","gyp","ipython"],keywords:n,illegal:/(<\/|->|\?)|=>/,contains:[a,l,{beginKeywords:"if",relevance:0},r,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,t,{begin:/->/,endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}}());
|
||||
hljs.registerLanguage("python-repl",function(){"use strict";return function(n){return{aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}}());
|
||||
hljs.registerLanguage("ruby",function(){"use strict";return function(e){var n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",a={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},s={className:"doctag",begin:"@[A-Za-z]+"},i={begin:"#<",end:">"},r=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^\\=begin","^\\=end",{contains:[s],relevance:10}),e.COMMENT("^__END__","\\n$")],c={className:"subst",begin:"#\\{",end:"}",keywords:a},t={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<[-~]?'?(\w+)(?:.|\n)*?\n\s*\1\b/,returnBegin:!0,contains:[{begin:/<<[-~]?'?/},e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},b={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:a},d=[t,i,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(r)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:n}),b].concat(r)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[t,{begin:n}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[i,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(r),relevance:0}].concat(r);c.contains=d,b.contains=d;var g=[{begin:/^\s*=>/,starts:{end:"$",contains:d}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{end:"$",contains:d}}];return{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:r.concat(g).concat(d)}}}());
|
||||
hljs.registerLanguage("rust",function(){"use strict";return function(e){var n="([ui](8|16|32|64|128|size)|f(32|64))?",t="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield",literal:"true false Some None Ok Err",built_in:t},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+n},{begin:"\\b0o([0-7_]+)"+n},{begin:"\\b0x([A-Fa-f0-9_]+)"+n},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+n}],relevance:0},{className:"function",beginKeywords:"fn",end:"(\\(|<)",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"meta",begin:"#\\!?\\[",end:"\\]",contains:[{className:"meta-string",begin:/"/,end:/"/}]},{className:"class",beginKeywords:"type",end:";",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"\\S"},{className:"class",beginKeywords:"trait enum struct union",end:"{",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"[\\w\\d]"},{begin:e.IDENT_RE+"::",keywords:{built_in:t}},{begin:"->"}]}}}());
|
||||
hljs.registerLanguage("scss",function(){"use strict";return function(e){var t={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},i={className:"number",begin:"#[0-9A-Fa-f]+"};return e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{className:"selector-pseudo",begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{className:"selector-pseudo",begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},t,{className:"attribute",begin:"\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|noLine truncated
|
||||
hljs.registerLanguage("shell",function(){"use strict";return function(s){return{name:"Shell Session",aliases:["console"],contains:[{className:"meta",begin:"^\\s{0,3}[/\\w\\d\\[\\]()@-]*[>%$#]",starts:{end:"$",subLanguage:"bash"}}]}}}());
|
||||
hljs.registerLanguage("sql",function(){"use strict";return function(e){var t=e.COMMENT("--","$");return{name:"SQL",case_insensitive:!0,illegal:/[<>{}*]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment values with",end:/;/,endsWithParent:!0,keywords:{$pattern:/[\w\.]+/,keyword:"as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert instalLine truncated
|
||||
hljs.registerLanguage("swift",function(){"use strict";return function(e){var i={keyword:"#available #colorLiteral #column #else #elseif #endif #file #fileLiteral #function #if #imageLiteral #line #selector #sourceLocation _ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c compactMap contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),t={className:"subst",begin:/\\\(/,end:"\\)",keywords:i,contains:[]},a={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"""/,end:/"""/},{begin:/"/,end:/"/}]},r={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0};return t.contains=[r],{name:"Swift",keywords:i,contains:[a,e.C_LINE_COMMENT_MODE,n,{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*[!?]"},{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*",relevance:0},r,{className:"function",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin:/</,end:/>/},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:i,contains:["self",r,a,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:i,end:"\\{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{className:"meta",begin:"(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|@propertyWrapper)\\b"},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,n]}]}}}());
|
||||
hljs.registerLanguage("typescript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);return function(r){var t={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:e.concat(["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"]).join(" "),literal:n.join(" "),built_in:a.concat(["any","void","number","boolean","string","object","never","enum"]).join(" ")},s={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},i={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:r.C_NUMBER_RE+"n?"}],relevance:0},o={className:"subst",begin:"\\$\\{",end:"\\}",keywords:t,contains:[]},c={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[r.BACKSLASH_ESCAPE,o],subLanguage:"xml"}},l={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[r.BACKSLASH_ESCAPE,o],subLanguage:"css"}},E={className:"string",begin:"`",end:"`",contains:[r.BACKSLASH_ESCAPE,o]};o.contains=[r.APOS_STRING_MODE,r.QUOTE_STRING_MODE,c,l,E,i,r.REGEXP_MODE];var d={begin:"\\(",end:/\)/,keywords:t,contains:["self",r.QUOTE_STRING_MODE,r.APOS_STRING_MODE,r.NUMBER_MODE]},u={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,s,d]};return{name:"TypeScript",aliases:["ts"],keywords:t,contains:[r.SHEBANG(),{className:"meta",begin:/^\s*['"]use strict['"]/},r.APOS_STRING_MODE,r.QUOTE_STRING_MODE,c,l,E,r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,i,{begin:"("+r.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,r.REGEXP_MODE,{className:"function",begin:"(\\([^(]*(\\([^(]*(\\([^(]*\\))?\\))?\\)|"+r.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:r.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:d.contains}]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[\{;]/,excludeEnd:!0,keywords:t,contains:["self",r.inherit(r.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*"}),u],illegal:/%/,relevance:0},{beginKeywords:"constructor",end:/[\{;]/,excludeEnd:!0,contains:["self",u]},{begin:/module\./,keywords:{built_in:"module"},relevance:0},{beginKeywords:"module",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+r.IDENT_RE,relevance:0},s,d]}}}());
|
||||
hljs.registerLanguage("yaml",function(){"use strict";return function(e){var n="true false yes no null",a="[\\w#;/?:@&=+$,.~*\\'()[\\]]+",s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:"{{",end:"}}"},{begin:"%{",end:"}"}]}]},i=e.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={end:",",endsWithParent:!0,excludeEnd:!0,contains:[],keywords:n,relevance:0},t={begin:"{",end:"}",contains:[l],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]",contains:[l],illegal:"\\n",relevance:0},b=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---s*$",relevance:10},{className:"string",begin:"[\\|>]([0-9]?[+-])?[ ]*\\n( *)[\\S ]+\\n(\\2[\\S ]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type",begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"\\-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},{className:"number",begin:e.C_NUMBER_RE+"\\b"},t,g,s],c=[...b];return c.pop(),c.push(i),l.contains=c,{name:"YAML",case_insensitive:!0,aliases:["yml","YAML"],contains:b}}}());
|
||||
@@ -0,0 +1,255 @@
|
||||
# If your site is in 'https', then make sure your base url isn't written using 'http' otherwise your sitemap would
|
||||
# contain http (as opposeed to https) URLs. This would affect Google indexing of your URLs.
|
||||
baseURL: "https://adityatelange.github.io/hugo-PaperMod/"
|
||||
title: PaperMod
|
||||
copyright: "© [PaperMod Contributors](https://github.com/adityatelange/hugo-PaperMod/graphs/contributors)"
|
||||
theme: [hugo-PaperMod]
|
||||
|
||||
enableInlineShortcodes: true
|
||||
enableRobotsTXT: true
|
||||
buildDrafts: false
|
||||
buildFuture: false
|
||||
buildExpired: false
|
||||
enableEmoji: true
|
||||
pygmentsUseClasses: true
|
||||
mainsections: ["posts", "papermod"]
|
||||
|
||||
minify:
|
||||
disableXML: true
|
||||
# minifyOutput: true
|
||||
|
||||
pagination:
|
||||
disableAliases: false
|
||||
pagerSize: 3
|
||||
|
||||
languages:
|
||||
en:
|
||||
languageName: "English"
|
||||
weight: 1
|
||||
taxonomies:
|
||||
category: categories
|
||||
tag: tags
|
||||
series: series
|
||||
menu:
|
||||
main:
|
||||
- name: About
|
||||
url: about
|
||||
weight: 1
|
||||
- name: Archive
|
||||
url: archives
|
||||
weight: 2
|
||||
- name: Search
|
||||
url: search/
|
||||
weight: 2
|
||||
- name: Tags
|
||||
url: tags/
|
||||
weight: 4
|
||||
- name: "Docs (Wiki)"
|
||||
url: https://github.com/adityatelange/hugo-PaperMod/wiki/
|
||||
|
||||
fr:
|
||||
languageName: "French"
|
||||
weight: 2
|
||||
title: PaperModL2
|
||||
taxonomies:
|
||||
category: FRcategories
|
||||
tag: FRtags
|
||||
series: FRseries
|
||||
menu:
|
||||
main:
|
||||
- name: Archive
|
||||
url: archives/
|
||||
weight: 5
|
||||
- name: FRTags
|
||||
url: frtags
|
||||
weight: 10
|
||||
- name: FRCategories
|
||||
url: frcategories
|
||||
weight: 10
|
||||
- name: FRSeries
|
||||
url: frseries
|
||||
weight: 10
|
||||
- name: External
|
||||
url: "https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode"
|
||||
|
||||
# custom params for each language should be under [langcode].parms - hugo v0.120.0
|
||||
params:
|
||||
languageAltTitle: French
|
||||
profileMode:
|
||||
enabled: true
|
||||
title: PaperMod
|
||||
imageUrl: "https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=200&h=200"
|
||||
imageTitle: ProfileMode image
|
||||
# imageWidth: 120
|
||||
# imageHeight: 120
|
||||
subtitle: "☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive"
|
||||
buttons:
|
||||
- name: Blog
|
||||
url: posts
|
||||
- name: Profile Mode
|
||||
url: https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode
|
||||
|
||||
fa:
|
||||
languageName: "Farsi"
|
||||
languagedirection: rtl
|
||||
weight: 3
|
||||
title: PaperMod RTL
|
||||
taxonomies:
|
||||
category: FAcategories
|
||||
tag: FAtags
|
||||
series: FAseries
|
||||
menu:
|
||||
main:
|
||||
- name: FATags
|
||||
url: fatags
|
||||
weight: 10
|
||||
# custom params for each language should be under [langcode].parms - hugo v0.120.0
|
||||
params:
|
||||
homeInfoParams:
|
||||
Title: "Hi there \U0001F44B"
|
||||
Content: Welcome to RTL layout
|
||||
|
||||
outputFormats:
|
||||
llms:
|
||||
mediaType: "text/plain"
|
||||
baseName: "llms"
|
||||
isPlainText: true
|
||||
notAlternative: true
|
||||
|
||||
outputs:
|
||||
home:
|
||||
- HTML
|
||||
- RSS
|
||||
- JSON
|
||||
- llms
|
||||
|
||||
params:
|
||||
env: production # to enable google analytics, opengraph, twitter-cards and schema.
|
||||
description: "Theme PaperMod - https://github.com/adityatelange/hugo-PaperMod"
|
||||
author: Theme PaperMod
|
||||
# author: ["Me", "You"] # multiple authors
|
||||
|
||||
defaultTheme: auto
|
||||
# disableThemeToggle: true
|
||||
ShowShareButtons: true
|
||||
ShowReadingTime: true
|
||||
# disableSpecial1stPost: true
|
||||
displayFullLangName: true
|
||||
ShowPostNavLinks: true
|
||||
ShowBreadCrumbs: true
|
||||
ShowCodeCopyButtons: true
|
||||
ShowRssButtonInSectionTermList: true
|
||||
ShowAllPagesInArchive: true
|
||||
ShowPageNums: true
|
||||
ShowToc: true
|
||||
# comments: false
|
||||
images: ["images/papermod-cover.png"]
|
||||
|
||||
profileMode:
|
||||
enabled: false
|
||||
title: PaperMod
|
||||
imageUrl: "#"
|
||||
imageTitle: my image
|
||||
# imageWidth: 120
|
||||
# imageHeight: 120
|
||||
buttons:
|
||||
- name: Archives
|
||||
url: archives
|
||||
- name: Tags
|
||||
url: tags
|
||||
|
||||
homeInfoParams:
|
||||
Title: "PaperMod's Demo"
|
||||
Content: |
|
||||
A clean, fast, and responsive Hugo theme built for a polished reading experience. [Read more..](/about/)
|
||||
- Lightweight by design, with a modern layout that keeps your content front and center.
|
||||
- Explore the [Docs (Wiki)](https://github.com/adityatelange/hugo-PaperMod/wiki/) to learn more about features and configuration.
|
||||
- Support the project on [GitHub](https://github.com/adityatelange/hugo-PaperMod) and share it with others who love minimalistic designs.
|
||||
- PaperMod is inspired by the [Paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3) theme.
|
||||
|
||||
socialIcons:
|
||||
- name: github
|
||||
title: View Source on Github
|
||||
url: "https://github.com/adityatelange/hugo-PaperMod"
|
||||
- name: Discord
|
||||
title: Join discord community
|
||||
url: "https://discord.gg/ahpmTvhVmp"
|
||||
- name: X
|
||||
title: Share PaperMod on X/Twitter
|
||||
url: "https://x.com/intent/tweet/?text=Checkout%20Hugo%20PaperMod%20%E2%9C%A8%0AA%20fast,%20clean,%20responsive%20Hugo%20theme.&url=https://github.com/adityatelange/hugo-PaperMod&hashtags=Hugo,PaperMod"
|
||||
- name: KoFi
|
||||
title: Buy me a Ko-Fi :)
|
||||
url: "https://ko-fi.com/adityatelange"
|
||||
|
||||
editPost:
|
||||
URL: "https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite/content"
|
||||
Text: "Suggest Changes" # edit text
|
||||
appendFilePath: true # to append file path to Edit link
|
||||
|
||||
# label:
|
||||
# iconSVG: '<svg xmlns="http://www.w3.org/2000/svg" height="25" viewBox="0 -960 960 960" fill="currentColor"><path d="M320-240h320v-80H320v80Zm0-160h320v-80H320v80ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z"/></svg>'
|
||||
# text: "Home"
|
||||
# icon: icon.png
|
||||
# iconHeight: 35
|
||||
|
||||
# analytics:
|
||||
# google:
|
||||
# SiteVerificationTag: "XYZabc"
|
||||
|
||||
assets:
|
||||
disableHLJS: true
|
||||
# favicon: "<link / abs url>"
|
||||
# favicon16x16: "<link / abs url>"
|
||||
# favicon32x32: "<link / abs url>"
|
||||
# apple_touch_icon: "<link / abs url>"
|
||||
# safari_pinned_tab: "<link / abs url>"
|
||||
|
||||
# cover:
|
||||
# hidden: true # hide everywhere but not in structured data
|
||||
# hiddenInList: true # hide on list pages and home
|
||||
# hiddenInSingle: true # hide on single page
|
||||
|
||||
# fuseOpts:
|
||||
# isCaseSensitive: false
|
||||
# shouldSort: true
|
||||
# location: 0
|
||||
# distance: 1000
|
||||
# threshold: 0.4
|
||||
# minMatchCharLength: 0
|
||||
# keys: ["title", "permalink", "summary", "content"]
|
||||
|
||||
markup:
|
||||
goldmark:
|
||||
renderer:
|
||||
unsafe: true
|
||||
highlight:
|
||||
noClasses: false
|
||||
# anchorLineNos: true
|
||||
# codeFences: true
|
||||
# guessSyntax: true
|
||||
# lineNos: true
|
||||
# style: monokai
|
||||
|
||||
# privacy:
|
||||
# vimeo:
|
||||
# disabled: false
|
||||
# simple: true
|
||||
|
||||
# twitter:
|
||||
# disabled: false
|
||||
# enableDNT: true
|
||||
# simple: true
|
||||
|
||||
# instagram:
|
||||
# disabled: false
|
||||
# simple: true
|
||||
|
||||
# youtube:
|
||||
# disabled: false
|
||||
# privacyEnhanced: true
|
||||
|
||||
services:
|
||||
instagram:
|
||||
disableInlineCSS: true
|
||||
x:
|
||||
disableInlineCSS: true
|
||||
@@ -0,0 +1,119 @@
|
||||
---
|
||||
title: "About"
|
||||
date: 2026-05-09T12:00:00+05:30
|
||||
description: "A fast, clean, and responsive Hugo theme designed for bloggers and content creators."
|
||||
author: ["Aditya Telange"]
|
||||
draft: false
|
||||
hiddenInRss: true
|
||||
disableShare: true
|
||||
ShowBreadcrumbs: false
|
||||
---
|
||||
|
||||
PaperMod is a fast, clean, and responsive Hugo theme designed for bloggers and content creators. It offers a modern design with a focus on readability and performance, making it an excellent choice for personal blogs, portfolios, and documentation sites.
|
||||
|
||||
> Based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3), with additional features and customization options.
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>PaperMod at Hugo Themes</td>
|
||||
<td><a href="https://themes.gohugo.io/themes/hugo-papermod/">PaperMod@themes.gohugo.io</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Minimum Hugo Version</td>
|
||||
<td><a href="https://github.com/gohugoio/hugo/releases/tag/v0.146.0">Hugo v0.146.0+</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Discord Community</td>
|
||||
<td><a href="https://discord.gg/ahpmTvhVmp">Join Discord to chat with the community</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Github Discussion</td>
|
||||
<td><a href="https://github.com/adityatelange/hugo-PaperMod/discussions">Join Discussions on Github</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Live Demo</td>
|
||||
<td><a href="https://adityatelange.github.io/hugo-PaperMod/">adityatelange.github.io/hugo-PaperMod</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Documentation</td>
|
||||
<td><a href="https://github.com/adityatelange/hugo-PaperMod/wiki">Github Wiki</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Example Site Source</td>
|
||||
<td><a href="https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite">exampleSite branch</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.star-history.com/adityatelange/hugo-papermod"><img src="https://api.star-history.com/badge?repo=adityatelange/hugo-PaperMod&theme=dark" alt="Star History Rank" /></a></td>
|
||||
<td><a href="https://ko-fi.com/H2H229ZWH"><img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="ko-fi" /></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://user-images.githubusercontent.com/21258296/114303440-bfc0ae80-9aeb-11eb-8cfa-48a4bb385a6d.png" alt="Mockup image" title="Mockup"/>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## Features 💥
|
||||
|
||||
`☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive`
|
||||
|
||||
- **Asset pipeline** -- Hugo's built-in asset generator with fingerprinting, bundling, and minification.
|
||||
- **Three layout modes** -- [Regular](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#regular-mode-default-mode), [Home-Info](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#home-info-mode), and [Profile](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode).
|
||||
- **Light and dark themes** -- Automatic switching based on browser preference, plus a manual toggle.
|
||||
- **Multilingual support** -- Includes a built-in language selector.
|
||||
- **Search** -- Client-side search powered by Fuse.js.
|
||||
- **SEO optimized** -- Open Graph, Twitter Cards, and Schema.org structured data out of the box.
|
||||
- **Cover images** -- Per-post cover images with responsive image support.
|
||||
- **Table of contents** -- Auto-generated from heading structure.
|
||||
- **Multiple authors** -- Native support for multi-author sites.
|
||||
- **Social icons and share buttons** -- Configurable social links and per-post sharing.
|
||||
- **Breadcrumb navigation**
|
||||
- **Post archives and taxonomies**
|
||||
- **Code block copy buttons** -- One-click copying with Chroma syntax highlighting.
|
||||
- **Related post suggestions**
|
||||
- **Zero JS build dependencies** -- No webpack, Node.js, or other tooling required.
|
||||
|
||||
| Topic | Description |
|
||||
| ------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||||
| **[Installation guide](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)** | Detailed installation and update instructions |
|
||||
| **[Features wiki page](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)** | In-depth explanations of all features |
|
||||
| **[FAQ wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)** | Common questions and configuration walkthroughs |
|
||||
| **[Icons wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)** | Documentation for social icons and share icons |
|
||||
| **[Variables wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/Variables)** | List of all available template variables |
|
||||
| **[Overiding templates](https://github.com/adityatelange/hugo-PaperMod/wiki/Template_Overrides)** | Guide to customizing templates without forking |
|
||||
| **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)** | Detailed history of releases |
|
||||
|
||||
---
|
||||
|
||||
## Performance ☄️
|
||||
|
||||
PaperMod consistently scores near-perfect results on [Pagespeed Insights](https://pagespeed.web.dev/report?url=https://adityatelange.github.io/hugo-PaperMod/).
|
||||
|
||||
<img width="481" height="116" alt="image" src="https://github.com/user-attachments/assets/497d831b-d143-4a46-bc11-b1d7f8ef4a83" />
|
||||
|
||||
---
|
||||
|
||||
## Support 🫶
|
||||
|
||||
- Star this repository to show your support.
|
||||
- Share PaperMod with others who might find it useful.
|
||||
- Sponsor the project on [GitHub Sponsors](https://github.com/sponsors/adityatelange) or [Ko-Fi](https://ko-fi.com/adityatelange).
|
||||
|
||||
---
|
||||
|
||||
## Special Thanks 🌟
|
||||
|
||||
- [Highlight.js](https://github.com/highlightjs/highlight.js)
|
||||
- [Fuse.js](https://github.com/krisk/fuse)
|
||||
- [Feather Icons](https://github.com/feathericons/feather)
|
||||
- [Simple Icons](https://github.com/simple-icons/simple-icons)
|
||||
- All contributors and supporters
|
||||
|
||||
---
|
||||
|
||||
## Stargazers 📈
|
||||
|
||||
[](https://starchart.cc/adityatelange/hugo-PaperMod)
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
title: "Archive"
|
||||
layout: "archives"
|
||||
# url: "/l2/archives"
|
||||
summary: "archives"
|
||||
---
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
title: "Archive"
|
||||
layout: "archives"
|
||||
# url: "/archives"
|
||||
summary: "archives"
|
||||
---
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
title: "Audio and Video"
|
||||
date: 2026-04-11
|
||||
description: "Learn how to embed audio and video in your hugo site using shortcodes and HTML."
|
||||
tags: ["hugo", "audio", "video", "shortcodes", "HTML"]
|
||||
---
|
||||
|
||||
In this post, we'll explore how to embed audio and video content in your Hugo site using both shortcodes and HTML. This allows you to enhance your content with multimedia elements, making it more engaging for your audience.
|
||||
|
||||
## Embedding Audio
|
||||
|
||||
To embed audio in your Hugo site, you can use the built-in `audio` shortcode. Here's an example of how to use it:
|
||||
|
||||
```markdown
|
||||
{{/*< audio src="/path/to/your/audiofile.mp3" >*/}}
|
||||
```
|
||||
|
||||
{{< audio src="https://upload.wikimedia.org/wikipedia/commons/5/55/Apollo_8_liftoff.ogg" caption="Apollo 8 liftoff.ogg" >}}
|
||||
|
||||
|
||||
Make sure to replace `/path/to/your/audiofile.mp3` with the actual path to your audio file. This shortcode will generate an audio player that allows visitors to play the audio directly on your site.
|
||||
|
||||
Alternatively, you can also use HTML to embed audio. Here's how you can do it:
|
||||
|
||||
```html
|
||||
<audio controls>
|
||||
<source src="/path/to/your/audiofile.mp3" type="audio/mpeg">
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
```
|
||||
|
||||
Again, replace `/path/to/your/audiofile.mp3` with the correct path to your audio file. This HTML code will create a similar audio player as the shortcode.
|
||||
|
||||
## Embedding Video
|
||||
|
||||
To embed video content, you can use the `video` shortcode in Hugo. Here's an example:
|
||||
|
||||
```markdown
|
||||
{{/*< video src="/path/to/your/videofile.mp4" >*/}}
|
||||
```
|
||||
|
||||
{{< video src="https://upload.wikimedia.org/wikipedia/commons/8/8f/Apollo_4_separation_of_interstage_ring.webm" >}}
|
||||
|
||||
|
||||
Make sure to replace `/path/to/your/videofile.mp4` with the actual path to your video file. This shortcode will generate a video player that allows visitors to watch the video directly on your site.
|
||||
|
||||
You can also use HTML to embed video content. Here's how you can do it:
|
||||
|
||||
```html
|
||||
<video controls>
|
||||
<source src="/path/to/your/videofile.mp4" type="video/mp4" />
|
||||
Your browser does not support the video element.
|
||||
</video>
|
||||
```
|
||||
|
||||
Again, replace `/path/to/your/videofile.mp4` with the correct path to your video file. This HTML code will create a video player similar to the one generated by the shortcode.
|
||||
@@ -0,0 +1,152 @@
|
||||
---
|
||||
author: ["Aditya Telange"]
|
||||
title: "Code Syntax Guide"
|
||||
date: "2019-03-10"
|
||||
description: "Sample article showcasing basic code syntax and formatting for HTML elements."
|
||||
summary: "Sample article showcasing basic code syntax and formatting for HTML elements."
|
||||
tags: ["markdown", "syntax", "code",]
|
||||
categories: ["themes", "syntax"]
|
||||
series: ["Themes Guide"]
|
||||
ShowToc: true
|
||||
TocOpen: true
|
||||
social:
|
||||
fediverse_creator: "@adityatelange@mastodon.social"
|
||||
weight: 3
|
||||
---
|
||||
|
||||
### Inline Code
|
||||
|
||||
`This is Inline Code`
|
||||
|
||||
### Only `pre`
|
||||
|
||||
<pre>
|
||||
This is pre text
|
||||
</pre>
|
||||
|
||||
### Code block with backticks
|
||||
|
||||
```{hl_lines=[2,8]}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Example HTML5 Document</title>
|
||||
<meta
|
||||
name="description"
|
||||
content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### Code block with backticks and language specified
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Example HTML5 Document</title>
|
||||
<meta
|
||||
name="description"
|
||||
content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### Code block with backticks and language specified with line numbers
|
||||
|
||||
```html {linenos=true}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Example HTML5 Document</title>
|
||||
<meta
|
||||
name="description"
|
||||
content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### Code block with line numbers and <mark>highlighted</mark> lines
|
||||
|
||||
- PaperMod supports `linenos=true` or `linenos=table`
|
||||
|
||||
```html {linenos=true,hl_lines=[2,8]}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Example HTML5 Document</title>
|
||||
<meta
|
||||
name="description"
|
||||
content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
- <del>With `linenos=inline` line <mark>**might not** get highlighted</mark> properly.<del>
|
||||
- This issue is fixed with [045c084](https://github.com/adityatelange/hugo-PaperMod/commit/045c08496d61b1b3f9c79e69e7d3d243a526d8f3)
|
||||
|
||||
```html {linenos=inline,hl_lines=[2,8]}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Example HTML5 Document</title>
|
||||
<meta
|
||||
name="description"
|
||||
content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
/>
|
||||
</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 >}}
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
author: "Hugo Authors"
|
||||
title: "Emoji Support"
|
||||
date: "2019-03-05"
|
||||
description: "Guide to emoji usage in Hugo"
|
||||
tags: ["emoji"]
|
||||
ShowToc: false
|
||||
ShowBreadCrumbs: false
|
||||
---
|
||||
|
||||
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,11 @@
|
||||
---
|
||||
title: Inner Section
|
||||
description: This section contains inner pages to test the section and page layouts in Hugo.
|
||||
date: 2026-04-11
|
||||
---
|
||||
|
||||
Section/List pages can include markdown content as well. Simply add the content in the `_index.md` file of the section. The content will be rendered above the list of pages in that section.
|
||||
|
||||
You can add images, links, and other markdown content in the `_index.md` file. This allows you to provide an introduction or overview of the section before listing the individual pages.
|
||||
|
||||

|
||||
|
After Width: | Height: | Size: 41 KiB |
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Cover Image
|
||||
description: This page is created to test the cover image functionality in Hugo.
|
||||
summary: This is a test page to verify that the cover image is displayed correctly in Hugo.
|
||||
date: 2026-04-11
|
||||
draft: true
|
||||
cover:
|
||||
image: image.png
|
||||
alt: "A sample cover image"
|
||||
caption: "This is a caption for the cover image."
|
||||
---
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: "Sample Markdown Blog Post"
|
||||
date: 2024-06-01T12:00:00Z
|
||||
---
|
||||
|
||||
## Sample Markdown Blog Post
|
||||
|
||||
A sample blog post to test markdown rendering in PaperMod. This post includes various markdown elements such as headings, images, and code blocks. The content is meant to verify that all markdown features are displayed correctly in the theme.
|
||||
|
||||
### Sample Heading
|
||||
|
||||
Knock knock. Who's there? Lettuce. Lettuce who? Lettuce in, it's cold out here!
|
||||
|
||||

|
||||
|
||||
```javascript
|
||||
function greet(name) {
|
||||
return `Hello, ${name}!`;
|
||||
}
|
||||
console.log(greet('World'));
|
||||
```
|
||||
|
||||
```python {hl_lines="2",linenos="table"}
|
||||
def greet(name):
|
||||
return f"Hello, {name}!"
|
||||
|
||||
print(greet("World"))
|
||||
```
|
||||
|
||||
#### Another Heading
|
||||
|
||||
| This is a table | With some data |
|
||||
|-----------------|----------------|
|
||||
| Row 1 | Data 1 |
|
||||
| Row 2 | Data 2 |
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: "Markdown Headings"
|
||||
date: 2024-06-01T12:00:00Z
|
||||
draft: false
|
||||
---
|
||||
|
||||
# Heading 1
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
||||
## Heading 2
|
||||
|
||||
Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.
|
||||
|
||||
Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.
|
||||
|
||||
### Heading 3
|
||||
|
||||
Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.
|
||||
|
||||
Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.
|
||||
|
||||
#### Heading 4
|
||||
|
||||
Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.
|
||||
|
||||
Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.
|
||||
|
||||
##### Heading 5
|
||||
|
||||
Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.
|
||||
|
||||
Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.
|
||||
|
||||
###### Heading 6
|
||||
|
||||
Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.
|
||||
|
||||
Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
title: "Markdown Lists"
|
||||
date: 2024-06-01T12:00:00Z
|
||||
draft: false
|
||||
---
|
||||
|
||||
## Markdown Lists
|
||||
|
||||
Markdown supports both ordered and unordered lists, as well as nested lists. Here's how you can create them:
|
||||
|
||||
### Ordered List
|
||||
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
|
||||
### Unordered List
|
||||
|
||||
- List item
|
||||
- Another item
|
||||
- And another item
|
||||
|
||||
### Nested Unordered list
|
||||
|
||||
- Fruit
|
||||
- Apple
|
||||
- Orange
|
||||
- Dairy
|
||||
- Milk
|
||||
- Cheese
|
||||
|
||||
### Nested Ordered list
|
||||
|
||||
1. Fruit
|
||||
- Apple
|
||||
- Orange
|
||||
2. Dairy
|
||||
1. Milk
|
||||
2. Cheese
|
||||
|
||||
### Mixed Nested Lists
|
||||
|
||||
1. First item
|
||||
- Sub item 1
|
||||
2. Second item
|
||||
1. Sub item 1
|
||||
- Sub sub item 1
|
||||
2. Sub item 2
|
||||
3. Third item
|
||||
- Sub item 1
|
||||
1. Sub sub item 1
|
||||
|
||||
### List with paragraphs, code blocks, and blockquotes
|
||||
|
||||
- Item 1
|
||||
|
||||
This is a paragraph within the first item.
|
||||
|
||||
- Item 2
|
||||
|
||||
```javascript
|
||||
function helloWorld() {
|
||||
console.log("Hello, World!");
|
||||
}
|
||||
```
|
||||
|
||||
- Item 3
|
||||
> This is a blockquote within the third item.
|
||||
|
||||
### Lists with links, images, and other markdown content
|
||||
|
||||
- Item 1
|
||||
- Sub item with a [link](https://example.com)
|
||||
- Sub item with an image 
|
||||
- Item 2
|
||||
- Sub item with **bold text**
|
||||
- Sub item with _italic text_
|
||||
- Item 3
|
||||
- Sub item with `inline code`
|
||||
- Sub item with a blockquote > This is a blockquote within a sub item.
|
||||
This flexibility allows you to create rich and organized content using Markdown lists.
|
||||
@@ -0,0 +1,178 @@
|
||||
---
|
||||
author: "Hugo Authors"
|
||||
title: "Markdown Syntax Guide For RTL"
|
||||
date: "2019-03-11"
|
||||
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
FAtags: ["markdown", "css", "html", "themes"]
|
||||
FAcategories: ["themes", "syntax"]
|
||||
FAseries: ["Themes Guide"]
|
||||
aliases: ["migrate-from-jekyl"]
|
||||
ShowToc: true
|
||||
TocOpen: true
|
||||
---
|
||||
|
||||
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.
|
||||
>
|
||||
> — <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 them out-of-the-box.
|
||||
|
||||
| Name | Age |
|
||||
| ----- | --- |
|
||||
| Bob | 27 |
|
||||
| Alice | 23 |
|
||||
|
||||
#### Inline Markdown within tables
|
||||
|
||||
| Italics | Bold | Code |
|
||||
| --------- | -------- | ------ |
|
||||
| _italics_ | **bold** | `code` |
|
||||
|
||||
## Code Blocks
|
||||
|
||||
#### Inline Code
|
||||
|
||||
`This is Inline Code`
|
||||
|
||||
#### Only `pre`
|
||||
|
||||
<pre>
|
||||
This is pre text
|
||||
</pre>
|
||||
|
||||
#### Code block with backticks
|
||||
|
||||
```
|
||||
<!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 backticks and language specified
|
||||
|
||||
```html {linenos=true}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Example HTML5 Document</title>
|
||||
<meta name="description" content="Sample article showcasing basic Markdown syntax and formatting for HTML elements.">
|
||||
</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,178 @@
|
||||
---
|
||||
author: "Hugo Authors"
|
||||
title: "Markdown Syntax Guide For L2"
|
||||
date: "2019-03-11"
|
||||
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
FRtags: ["markdown", "css", "html", "themes"]
|
||||
FRcategories: ["themes", "syntax"]
|
||||
FRseries: ["Themes Guide"]
|
||||
aliases: ["migrate-from-jekyl"]
|
||||
ShowToc: true
|
||||
TocOpen: true
|
||||
---
|
||||
|
||||
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.
|
||||
>
|
||||
> — <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 them out-of-the-box.
|
||||
|
||||
| Name | Age |
|
||||
| ----- | --- |
|
||||
| Bob | 27 |
|
||||
| Alice | 23 |
|
||||
|
||||
#### Inline Markdown within tables
|
||||
|
||||
| Italics | Bold | Code |
|
||||
| --------- | -------- | ------ |
|
||||
| _italics_ | **bold** | `code` |
|
||||
|
||||
## Code Blocks
|
||||
|
||||
#### Inline Code
|
||||
|
||||
`This is Inline Code`
|
||||
|
||||
#### Only `pre`
|
||||
|
||||
<pre>
|
||||
This is pre text
|
||||
</pre>
|
||||
|
||||
#### Code block with backticks
|
||||
|
||||
```
|
||||
<!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 backticks and language specified
|
||||
|
||||
```html {linenos=true}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Example HTML5 Document</title>
|
||||
<meta name="description" content="Sample article showcasing basic Markdown syntax and formatting for HTML elements.">
|
||||
</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,123 @@
|
||||
---
|
||||
author: "Hugo Authors"
|
||||
title: "Markdown Syntax Guide"
|
||||
date: "2019-03-11"
|
||||
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
tags: ["markdown", "css", "html", "themes"]
|
||||
categories: ["themes", "syntax"]
|
||||
series: ["Themes Guide"]
|
||||
aliases: ["migrate-from-jekyl"]
|
||||
# cover:
|
||||
# image: images/msg.png
|
||||
# caption: "Generated using [OG Image Playground by Vercel](https://og-playground.vercel.app/)"
|
||||
ShowToc: true
|
||||
TocOpen: true
|
||||
weight: 2
|
||||
---
|
||||
|
||||
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.
|
||||
>
|
||||
> — <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 them out-of-the-box.
|
||||
|
||||
| Name | Age |
|
||||
| ----- | --- |
|
||||
| Bob | 27 |
|
||||
| Alice | 23 |
|
||||
|
||||
#### Inline Markdown within tables
|
||||
|
||||
| Italics | Bold | Code |
|
||||
| --------- | -------- | ------ |
|
||||
| _italics_ | **bold** | `code` |
|
||||
|
||||
## List Types
|
||||
|
||||
#### Ordered List
|
||||
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
|
||||
#### Unordered List
|
||||
|
||||
- List item
|
||||
- Another item
|
||||
- And another item
|
||||
|
||||
#### Nested Unordered list
|
||||
|
||||
- Fruit
|
||||
- Apple
|
||||
- Orange
|
||||
- Banana
|
||||
- Dairy
|
||||
- Milk
|
||||
- Cheese
|
||||
|
||||
#### Nested Ordered list
|
||||
|
||||
1. Fruit
|
||||
- Apple
|
||||
- Orange
|
||||
- Banana
|
||||
2. Dairy
|
||||
1. Milk
|
||||
2. Cheese
|
||||
3. Third item
|
||||
1. Sub One
|
||||
2. Sub Two
|
||||
|
||||
## 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,55 @@
|
||||
---
|
||||
author: Hugo Authors
|
||||
title: Math Typesetting
|
||||
date: 2019-03-08
|
||||
description: A brief guide to setup KaTeX
|
||||
math: true
|
||||
ShowBreadCrumbs: false
|
||||
---
|
||||
|
||||
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 ([`extend_head.html`](../papermod/papermod-faq/#custom-head--footer)) like so:
|
||||
- refer [ISSUE #236](https://github.com/adityatelange/hugo-PaperMod/issues/236)
|
||||
|
||||
```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 >}}
|
||||
{{ if or .Page.Params.math .Site.Params.math }}
|
||||
|
||||
<!-- KaTeX -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
|
||||
{{ end }}
|
||||
{{</ 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,5 @@
|
||||
---
|
||||
title: PaperMod
|
||||
summary: Contains posts related to `PaperMod`
|
||||
description: Contains posts related to PaperMod
|
||||
---
|
||||
@@ -0,0 +1,306 @@
|
||||
---
|
||||
title: "FAQs / How To's Guide"
|
||||
summary: We'll try to answer frequently asked qestions by users.
|
||||
date: 2021-01-20
|
||||
expiryDate: 2026-05-08
|
||||
aliases: ['/papermod-how-to-guide', '/posts/papermod/papermod-how-to']
|
||||
tags: ["PaperMod", "Docs"]
|
||||
author: ["PaperMod Contributors"]
|
||||
draft: true
|
||||
---
|
||||
|
||||
> This page is not updated anymore and is only kept for reference. Please refer to [Documentation](https://github.com/adityatelange/hugo-PaperMod/wiki/) for latest information.
|
||||
|
||||
---
|
||||
|
||||
> - **We'll be using `yml/yaml` format for all examples down below, I recommend using `yml` over `toml` as it is easier to read.**
|
||||
>
|
||||
> - You can find any [YML to TOML](https://www.google.com/search?q=yml+to+toml) converters if necessary.
|
||||
|
||||
---
|
||||
|
||||
## Override theme template
|
||||
|
||||
By Hugo's Lookup Order, you can override any part of a theme that you want. The following is a quick example.
|
||||
|
||||
Let's say you wish the `list` was different. All you have to do is copy the `list` template:
|
||||
|
||||
```shell
|
||||
your-site/themes/papermod/layouts/_defaults/list.html
|
||||
```
|
||||
|
||||
And paste it under your own `layouts` folder:
|
||||
|
||||
```shell
|
||||
your-site/layouts/_defaults/list.html
|
||||
```
|
||||
|
||||
Then you're free to make any changes you want to the `list`.
|
||||
When Hugo builds your site, your copy of `list.html` will be used instead of the theme's `list.html`.
|
||||
|
||||
---
|
||||
|
||||
## Enable Social-Metadata and SEO
|
||||
|
||||
These include OpenGraph, Twitter Cards and Schema.
|
||||
|
||||
```yml {linenos=true}
|
||||
params:
|
||||
env: production
|
||||
```
|
||||
|
||||
or set `HUGO_ENV` as "production" in system env-vars
|
||||
|
||||
---
|
||||
|
||||
## Failed to find a valid digest in the 'integrity' attribute for resource ... ?
|
||||
|
||||
Read about How Subresource Integrity helps: [Subresource_Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)
|
||||
|
||||
Why was the `asset` not loading ? : [How_browsers_handle_Subresource_Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity#How_browsers_handle_Subresource_Integrity)
|
||||
|
||||
**Solution:**
|
||||
|
||||
Set the following in `hugo.yaml`
|
||||
|
||||
```yml {linenos=true}
|
||||
params:
|
||||
assets:
|
||||
disableFingerprinting: true
|
||||
```
|
||||
|
||||
Linked Issues:
|
||||
|
||||
- https://stackoverflow.com/questions/65056585/hugo-theme-not-loading
|
||||
- https://stackoverflow.com/questions/65040931/hugo-failed-to-find-a-valid-digest-in-the-integrity-attribute-for-resource
|
||||
- https://blog.gerardbeckerleg.com/posts/hugo-failed-to-find-a-valid-digest-in-the-integrity-attribute-for-resource/
|
||||
|
||||
---
|
||||
|
||||
## Bundling Custom css with theme's assets
|
||||
|
||||
- For adding custom css to be bundled inside one minimized css
|
||||
|
||||
Create folder in yout project directory as
|
||||
|
||||
```
|
||||
.(site root)
|
||||
├── hugo.yaml
|
||||
├── content/
|
||||
├── theme/hugo-PaperMod/
|
||||
└── assets/
|
||||
└── css/
|
||||
└── extended/ <---
|
||||
├── custom_css1.css <---
|
||||
└── any_name.css <---
|
||||
```
|
||||
|
||||
All `css` files inside `assets/css/extended` will be bundled !
|
||||
|
||||
**Note**: blank.css is just the placeholder so that it doesn't break the theme when no files are present under `assets/css/extended`
|
||||
|
||||
Linked Issues:
|
||||
|
||||
- [Papermod Theme: How to add custom CSS?](https://discourse.gohugo.io/t/papermod-theme-how-to-add-custom-css/30165)
|
||||
|
||||
---
|
||||
|
||||
## Custom Head / Footer
|
||||
|
||||
Custom css/js can be added by way mentioned below.
|
||||
|
||||
```
|
||||
.(site root)
|
||||
├── hugo.yaml
|
||||
├── content/
|
||||
├── theme/hugo-PaperMod/
|
||||
└── layouts
|
||||
├── partials
|
||||
│ ├── comments.html
|
||||
│ ├── extend_footer.html <---
|
||||
│ └── extend_head.html <---
|
||||
└── robots.txt
|
||||
```
|
||||
|
||||
Create a html page in directory structure as shown above.
|
||||
|
||||
Contents of `extend_head.html` will be added to `head` of page.
|
||||
|
||||
and contents of `extend_footer.html` will be added to bottom of page.
|
||||
|
||||
---
|
||||
|
||||
## Add menu to site
|
||||
|
||||
You can add menu entries which will appear in the header of every page.
|
||||
|
||||
To do so, add a `menu` section to your site's `hugo.yaml`:
|
||||
|
||||
```yml {linenos=true}
|
||||
menu:
|
||||
main:
|
||||
- identifier: categories
|
||||
name: categories
|
||||
url: /categories/
|
||||
weight: 10
|
||||
- identifier: tags
|
||||
name: tags
|
||||
url: /tags/
|
||||
weight: 20
|
||||
- identifier: example
|
||||
name: example.org
|
||||
url: https://example.org
|
||||
weight: 30
|
||||
```
|
||||
|
||||
`name` controls what will be displayed for the menu entry.
|
||||
`url` sets the URL that the entry points to.
|
||||
`weight` is used to control the positioning of entries.
|
||||
|
||||
For more information on menus, see the [Hugo wiki page](https://gohugo.io/content-management/menus/).
|
||||
|
||||
---
|
||||
|
||||
## Pin a Post
|
||||
|
||||
Post can be pinned/ displayed top on the list by adding a `weight=<num>` var to page-variables
|
||||
|
||||
example:
|
||||
|
||||
```yml {linenos=true}
|
||||
---
|
||||
title: "My Important post"
|
||||
date: 2020-09-15T11:30:03+00:00
|
||||
weight: 1
|
||||
---
|
||||
```
|
||||
|
||||
```yml {linenos=true}
|
||||
---
|
||||
title: "My 2nd Important post"
|
||||
date: 2020-09-15T11:30:03+00:00
|
||||
weight: 2
|
||||
---
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Adding Custom Favicon(s)
|
||||
|
||||
We support the following paths under `/static` directory
|
||||
and can be added accordingly.
|
||||
|
||||
- `favicon.ico`
|
||||
- `favicon-16x16.png`
|
||||
- `favicon-32x32.png`
|
||||
- `apple-touch-icon.png`
|
||||
- `safari-pinned-tab.svg`
|
||||
|
||||
1. Favicon(s) can be generated by [Favicon.io](https://favicon.io) and can be simply put in `/static` folder.
|
||||
|
||||
2. Other way is to add favicon(s) NOT located in `/static` folder.
|
||||
|
||||
In site config add the following:
|
||||
|
||||
```yml {linenos=true}
|
||||
params:
|
||||
assets:
|
||||
favicon: "<link / absolute url>"
|
||||
favicon16x16: "<link / absolute url>"
|
||||
favicon32x32: "<link / absolute url>"
|
||||
apple_touch_icon: "<link / absolute url>"
|
||||
safari_pinned_tab: "<link / absolute url>"
|
||||
```
|
||||
|
||||
Note: `absolute url` means direct links to external resource: ex. `https://web.site/someimage.png`
|
||||
|
||||
```yml {linenos=true}
|
||||
params:
|
||||
assets:
|
||||
favicon: "/favicon.ico"
|
||||
favicon16x16: "/favicon-16x16.png"
|
||||
favicon32x32: "/favicon-32x32.png"
|
||||
apple_touch_icon: "/apple-touch-icon.png"
|
||||
safari_pinned_tab: "/safari-pinned-tab.svg"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Centering image in markdown
|
||||
|
||||
Add `#center` after image to center align an image
|
||||
|
||||
```md {linenos=true}
|
||||

|
||||
```
|
||||
|
||||
**When using [`figure`](https://gohugo.io/content-management/shortcodes/) shortcode**
|
||||
|
||||
use `align=center` to center image with captions
|
||||
|
||||
```md {linenos=true}
|
||||
{{</* figure align=center src="image.jpg" */>}}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Using Hugo's Syntax highlighter "chroma"
|
||||
|
||||
1. Disable Highlight.js in site `hugo.yaml`
|
||||
|
||||
```yml {linenos=true}
|
||||
params:
|
||||
assets:
|
||||
disableHLJS: true
|
||||
```
|
||||
|
||||
2. Set hugo's markdown styling in site `hugo.yaml`
|
||||
|
||||
```yml {linenos=true}
|
||||
markup:
|
||||
highlight:
|
||||
# anchorLineNos: true
|
||||
codeFences: true
|
||||
guessSyntax: true
|
||||
lineNos: true
|
||||
# noClasses: false
|
||||
style: monokai
|
||||
```
|
||||
|
||||
3. If you want `lineNos: true`, the background won't be proper.
|
||||
This will only work with `noClasses: false` or `pygmentsUseClasses: true`.
|
||||
Read [Generate Syntax Highlighter CSS](https://gohugo.io/content-management/syntax-highlighting/#generate-syntax-highlighter-css)
|
||||
|
||||
Add the following to `assets/css/extended/custom.css`
|
||||
|
||||
```css {linenos=true}
|
||||
.chroma {
|
||||
background-color: unset;
|
||||
}
|
||||
```
|
||||
|
||||
More Info : [Configure Markup - Highlight](https://gohugo.io/getting-started/configuration-markup#highlight)
|
||||
|
||||
---
|
||||
|
||||
## Search not working ?
|
||||
|
||||
If you are using a CDN to server assets from a different domain, search would break
|
||||
|
||||
Why? Take a look at [fastsearch.js#L35](https://github.com/adityatelange/hugo-PaperMod/blob/fb4988cfb6d0d6e4e489f17d89f0fa618def3396/assets/js/fastsearch.js#L35).
|
||||
|
||||
We fetch the `index.json` (where the search function looks for the keywords typed) one level up of the website `search.min.js` is hosted on.
|
||||
|
||||
We have used this insted of assigning `baseURL` so as to work with multilingual websites ex. `example.com/fr/` and websites being placed under a subdirectory ex. `example.com/blog/`.
|
||||
|
||||
To fix for _single_ language websites hosting assets from CDN, this you may [override](#override-theme-template) [fastsearch.js#L35](https://github.com/adityatelange/hugo-PaperMod/blob/fb4988cfb6d0d6e4e489f17d89f0fa618def3396/assets/js/fastsearch.js#L35) and placing appropriate URL as in
|
||||
|
||||
```js {linenos=true}
|
||||
xhr.open("GET", "https://example.com/index.json");
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## References
|
||||
|
||||
- [Override a Hugo theme](https://zwbetz.com/override-a-hugo-theme/)
|
||||
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 95 KiB |
@@ -0,0 +1,515 @@
|
||||
---
|
||||
title: "Features / Mods"
|
||||
summary: Learn About All Features in PaperMod
|
||||
date: 2021-01-20
|
||||
expiryDate: 2026-05-08
|
||||
aliases: ["/papermod-features"]
|
||||
tags: ["PaperMod", "Docs"]
|
||||
author: ["Aditya Telange"]
|
||||
social:
|
||||
fediverse_creator: "@adityatelange@mastodon.social"
|
||||
---
|
||||
|
||||
> This page is not updated anymore and is only kept for reference. Please refer to [Documentation](https://github.com/adityatelange/hugo-PaperMod/wiki/) for latest information.
|
||||
|
||||
### Intro
|
||||
|
||||
- **We'll be using `yml/yaml` format for all examples down below, I recommend using `yml` over `toml` as it is easier to read.**
|
||||
|
||||
- You can find any [YML to TOML](https://www.google.com/search?q=yml+to+toml) converters if necessary.
|
||||
|
||||
---
|
||||
|
||||
### Assets (js/css)
|
||||
|
||||
The following is enabled by default
|
||||
|
||||
- [minification](https://gohugo.io/hugo-pipes/minification/) - makes the assets size smallest as possible.
|
||||
- [bundling](https://gohugo.io/hugo-pipes/bundling/) - bundles all the styles in one single asset
|
||||
- [fingerprint/intergity](https://gohugo.io/hugo-pipes/fingerprint/) check.
|
||||
|
||||
---
|
||||
|
||||
### Default Theme light/dark/auto
|
||||
|
||||
```yml {linenos=true}
|
||||
params:
|
||||
# defaultTheme: light
|
||||
# defaultTheme: dark
|
||||
defaultTheme: auto # to switch between dark or light according to browser theme
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
### Theme Switch Toggle (enabled by default)
|
||||
|
||||
Shows icon besides title of page to change theme
|
||||
|
||||
To disable it :
|
||||
|
||||
```yml {linenos=true}
|
||||
disableThemeToggle: true
|
||||
```
|
||||
|
||||
You can refer following table for better understanding...
|
||||
|
||||
| `defaultTheme` | `disableThemeToggle` | checks local storage? | checks system theme? | Info |
|
||||
| -------------- | -------------------- | --------------------- | -------------------- | ----------------- |
|
||||
| `auto` | true | No | Yes | only system theme |
|
||||
| | false | Yes (if not->2) | Yes (2) | _switch present_ |
|
||||
| `dark` | true | No | No | force dark only |
|
||||
| | false | Yes | No | _switch present_ |
|
||||
| `light` | true | No | No | force light only |
|
||||
| | false | Yes | No | _switch present_ |
|
||||
|
||||
---
|
||||
|
||||
### Archives Layout
|
||||
|
||||
Create a page with `archive.md` in `content` directory with following content
|
||||
|
||||
```shell
|
||||
.
|
||||
├── hugo.yaml
|
||||
├── content/
|
||||
│ ├── archives.md <--- Create archive.md here
|
||||
│ └── posts/
|
||||
├── static/
|
||||
└── themes/
|
||||
└── PaperMod/
|
||||
```
|
||||
|
||||
and add the following to it
|
||||
|
||||
```yml
|
||||
---
|
||||
title: "Archive"
|
||||
layout: "archives"
|
||||
url: "/archives/"
|
||||
summary: archives
|
||||
---
|
||||
```
|
||||
|
||||
**Note:** Archives Layout does not support Multilingual Month Translations.
|
||||
|
||||
ex: [archives.md](https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/exampleSite/content/archives.md)
|
||||
|
||||
---
|
||||
|
||||
### Regular Mode (default-mode)
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
### Home-Info Mode
|
||||
|
||||

|
||||
|
||||
Use 1st entry as some Information
|
||||
|
||||
add following to config file
|
||||
|
||||
```yml
|
||||
params:
|
||||
homeInfoParams:
|
||||
Title: Hi there wave
|
||||
Content: Can be Info, links, about...
|
||||
|
||||
socialIcons: # optional
|
||||
- name: "<platform>"
|
||||
url: "<link>"
|
||||
- name: "<platform 2>"
|
||||
url: "<link2>"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Profile Mode
|
||||
|
||||

|
||||
|
||||
Shows Index/Home page as Full Page with Social Links and Image
|
||||
|
||||
add following to config file
|
||||
|
||||
```yml {linenos=true}
|
||||
params:
|
||||
profileMode:
|
||||
enabled: true
|
||||
title: "<Title>" # optional default will be site title
|
||||
subtitle: "This is subtitle"
|
||||
imageUrl: "<image link>" # optional
|
||||
imageTitle: "<title of image as alt>" # optional
|
||||
imageWidth: 120 # custom size
|
||||
imageHeight: 120 # custom size
|
||||
buttons:
|
||||
- name: Archive
|
||||
url: "/archive"
|
||||
- name: Github
|
||||
url: "https://github.com/"
|
||||
|
||||
socialIcons: # optional
|
||||
- name: "<platform>"
|
||||
url: "<link>"
|
||||
- name: "<platform 2>"
|
||||
url: "<link2>"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Search Page
|
||||
|
||||
PaperMod uses [Fuse.js Basic](https://fusejs.io/getting-started/different-builds.html#explanation-of-different-builds) for search functionality
|
||||
|
||||
Add the following to site config, `hugo.yaml`
|
||||
|
||||
```yml {linenos=true,hl_lines=[5]}
|
||||
outputs:
|
||||
home:
|
||||
- HTML
|
||||
- RSS
|
||||
- JSON # necessary for search
|
||||
```
|
||||
|
||||
Create a page with `search.md` in `content` directory with following content
|
||||
|
||||
```yml {linenos=true,hl_lines=[3]}
|
||||
---
|
||||
title: "Search" # in any language you want
|
||||
layout: "search" # necessary for search
|
||||
# url: "/archive"
|
||||
# description: "Description for Search"
|
||||
summary: "search"
|
||||
placeholder: "placeholder text in search input box"
|
||||
---
|
||||
```
|
||||
|
||||
To hide a particular page from being searched, add it in post's frontmatter
|
||||
|
||||
```yml {linenos=true}
|
||||
searchHidden: true
|
||||
```
|
||||
|
||||
ex: [search.md](https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/exampleSite/content/search.md)
|
||||
|
||||
> Search Page also has Key bindings:
|
||||
>
|
||||
> - Arrow keys to move up/down the list
|
||||
> - Enter key (return) or Right Arrow key to go to the highlighted page
|
||||
> - Escape key to clear searchbox and results
|
||||
|
||||
For Multilingual use `search.<lang>.md` ex. `search.es.md`.
|
||||
|
||||
**Note:** Search will work only on current language, user is currently on !
|
||||
|
||||
**Customizing Fusejs Options**
|
||||
|
||||
Refer https://fusejs.io/api/options.html for Options, Add those as shown below.
|
||||
|
||||
```yml {linenos=true}
|
||||
params:
|
||||
fuseOpts:
|
||||
isCaseSensitive: false
|
||||
shouldSort: true
|
||||
location: 0
|
||||
distance: 1000
|
||||
threshold: 0.4
|
||||
minMatchCharLength: 0
|
||||
# limit: 10 # refer: https://www.fusejs.io/api/methods.html#search
|
||||
keys: ["title", "permalink", "summary", "content"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Draft Page indication
|
||||
|
||||
adds `[draft]` mark to indicate draft pages.
|
||||
|
||||
---
|
||||
|
||||
### Post Cover Image
|
||||
|
||||
In post's page-variables add :
|
||||
|
||||
```yml {linenos=true}
|
||||
cover:
|
||||
image: "<image path/url>"
|
||||
# can also paste direct link from external site
|
||||
# ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png
|
||||
alt: "<alt text>"
|
||||
caption: "<text>"
|
||||
relative: false # To use relative path for cover image, used in hugo Page-bundles
|
||||
```
|
||||
|
||||
When you include images in the [Page Bundle](https://gohugo.io/content-management/page-bundles/), multiple sizes of the image will automatically be provided using the HTML5 `srcset` field.
|
||||
|
||||
To reduce generation time and size of the site, you can disable this feature using
|
||||
|
||||
```yml {linenos=true}
|
||||
params:
|
||||
cover:
|
||||
responsiveImages: false
|
||||
```
|
||||
|
||||
To enable hyperlinks to the full image size on post pages, use
|
||||
|
||||
```yml {linenos=true}
|
||||
params:
|
||||
cover:
|
||||
linkFullImages: true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Share Buttons on post
|
||||
|
||||
Displays Share Buttons at Bottom of each post
|
||||
|
||||
to show share buttons add
|
||||
|
||||
```yml
|
||||
params:
|
||||
ShowShareButtons: true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Show post reading time
|
||||
|
||||
Displays Reading Time (the estimated time, in minutes, it takes to read the content.)
|
||||
|
||||
To show reading time add
|
||||
|
||||
```yml
|
||||
Params:
|
||||
ShowReadingTime: true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Show Table of Contents (Toc) on blog post
|
||||
|
||||
Displays ToC on blog-pages
|
||||
|
||||
To show ToC add following to page-variables
|
||||
|
||||
```yml
|
||||
ShowToc: true
|
||||
```
|
||||
|
||||
To keep Toc Open **by default** on a post add following to page-variables:
|
||||
|
||||
```yml
|
||||
TocOpen: true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### BreadCrumb Navigation
|
||||
|
||||
Adds BreadCrumb Navigation above Post's Title to show subsections and Navigation to Home
|
||||
|
||||
```yml
|
||||
params:
|
||||
ShowBreadCrumbs: true
|
||||
```
|
||||
|
||||
Can be diabled for particular page's front-matter
|
||||
|
||||
```yml
|
||||
---
|
||||
ShowBreadCrumbs: false
|
||||
---
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Edit Link for Posts
|
||||
|
||||
Add a button to suggest changes by using the file path of the post to link to a edit destination.
|
||||
|
||||
For site config use:
|
||||
|
||||
```yml
|
||||
Params:
|
||||
editPost:
|
||||
URL: "https://github.com/<path_to_repo>/content"
|
||||
Text: "Suggest Changes" # edit text
|
||||
appendFilePath: true # to append file path to Edit link
|
||||
```
|
||||
|
||||
Can be modified for individual pages
|
||||
|
||||
```yml
|
||||
---
|
||||
editPost:
|
||||
URL: "https://github.com/<path_to_repo>/content"
|
||||
Text: "Suggest Changes" # edit text
|
||||
appendFilePath: true # to append file path to Edit link
|
||||
---
|
||||
```
|
||||
|
||||
The example above would yield the following link for the post file `posts/post-name.md`:
|
||||
`https://github.com/<path_to_repo>/content/posts/post-name.md`
|
||||
|
||||
| Parameter | Required | Default Value |
|
||||
| ------------------------- | -------- | ------------- |
|
||||
| `editPost.URL` | true | - |
|
||||
| `editPost.appendFilePath` | false | `false` |
|
||||
| `editPost.Text` | false | `Edit` |
|
||||
|
||||
Since the link generated is a regular HTML anchor tag `<a href=...>`, you can
|
||||
also use other URL schemas like `mailto://`, e.g.
|
||||
`URL: "mailto://mail@example.com?subject=Suggesting changes for "`
|
||||
|
||||
---
|
||||
|
||||
### Other Posts suggestion below a post
|
||||
|
||||
Adds a Previous / Next post suggestion under a single post
|
||||
|
||||
```yml
|
||||
params:
|
||||
ShowPostNavLinks: true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Code Copy Button
|
||||
|
||||
Adds a `copy` button in code block to copy the code it contains
|
||||
|
||||
```yml
|
||||
params:
|
||||
ShowCodeCopyButtons: true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Multiple Authors
|
||||
|
||||
To Use multiple authors for a post, in post-variables:
|
||||
|
||||
```yml
|
||||
---
|
||||
author: ["Me", "You"]
|
||||
---
|
||||
```
|
||||
|
||||
To use Multiple Authors Site-wide, in `hugo.yaml`:
|
||||
|
||||
```yml
|
||||
params:
|
||||
author: ["Me", "You"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Comments
|
||||
|
||||
to add comments, create a html file
|
||||
|
||||
`layouts/partials/comments.html`
|
||||
|
||||
and paste code provided by your comments provider
|
||||
|
||||
also in config add this
|
||||
|
||||
```yml
|
||||
params:
|
||||
comments: true
|
||||
```
|
||||
|
||||
read more about this [hugo-comments](https://gohugo.io/content-management/comments/)
|
||||
|
||||
---
|
||||
|
||||
### AccessKeys
|
||||
|
||||
```text
|
||||
c - ToC Open/Close
|
||||
g - Go To Top
|
||||
h - Home (according to current lang)
|
||||
t - Theme toggle
|
||||
/ - Jumps to search page if in menu
|
||||
```
|
||||
|
||||
[What's AccessKeys ?](https://www.w3schools.com/tags/att_global_accesskey.asp)
|
||||
|
||||
---
|
||||
|
||||
### Enhanced SEO
|
||||
|
||||
**Enabled only when `env: production`**
|
||||
|
||||
- [Rich Results/Snippets Support](https://support.google.com/webmasters/answer/7506797?hl=en)
|
||||
|
||||
#### Twitter Cards Support
|
||||
|
||||
- The Twitter Cards metadata, except `twitter:image` should not require
|
||||
additional configuration, since it is generated from metadata that
|
||||
you should already have (for instance the page title and description).
|
||||
- The `twitter:image` uses the [Post Cover Image](#post-cover-image), if present.
|
||||
- In the absence of a cover images, the first image from the `images`
|
||||
frontmatter (a list) is used.
|
||||
```yaml
|
||||
images:
|
||||
- image_01.png
|
||||
- image_02.png
|
||||
```
|
||||
- Finally, if neither of those are provided, `twitter:image` comes from the first
|
||||
[Page Bundle](https://gohugo.io/content-management/page-bundles/)
|
||||
image with `feature` in the name, with a fallback to the first image with
|
||||
`cover` or `thumbnail` in the name.
|
||||
|
||||
#### OpenGraph support
|
||||
|
||||
- The OpenGraph metadata, except `og:image` should not require
|
||||
additional configuration, since it is generated from metadata that
|
||||
you should already have (for instance the page title and description).
|
||||
- The `og:image` uses the [Post Cover Image](#post-cover-image), if present.
|
||||
- In the absence of a cover images, the first image from the `images`
|
||||
frontmatter (a list) is used.
|
||||
```yaml
|
||||
images:
|
||||
- image_01.png
|
||||
- image_02.png
|
||||
```
|
||||
- Finally, if neither of those are provided, `og:image` comes from the first
|
||||
[Page Bundle](https://gohugo.io/content-management/page-bundles/)
|
||||
image with `feature` in the name, with a fallback to the first image with
|
||||
`cover` or `thumbnail` in the name.
|
||||
- For pages, you can also add audio (using frontmatter `audio: filename.ext`) and/or
|
||||
videos.
|
||||
```yaml
|
||||
videos:
|
||||
- filename01.mov
|
||||
- filename02.avi
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Multilingual Support
|
||||
|
||||
---
|
||||
|
||||
### Misc
|
||||
|
||||
#### Scroll-Bar themed (by default)
|
||||
|
||||
#### Smooth Scroll between in-page links (by default)
|
||||
|
||||
#### Scroll-to-Top Button (by default)
|
||||
|
||||
```text
|
||||
Displays a Scroll-to-Top button in right-bottom corner
|
||||
```
|
||||
|
||||
#### Google Analytics integration
|
||||
|
||||
#### Syntax highlighting
|
||||
|
||||
#### RSS feeds
|
||||
@@ -0,0 +1,133 @@
|
||||
---
|
||||
title: "Social-Icons / Share-Icons"
|
||||
summary: List of all Icons supported by PaperMod
|
||||
date: 2021-01-20
|
||||
expiryDate: 2026-05-08
|
||||
aliases: ["/papermod-icons"]
|
||||
tags: ["PaperMod", "Docs"]
|
||||
author: ["Aditya Telange"]
|
||||
draft: true
|
||||
social:
|
||||
fediverse_creator: "@adityatelange@mastodon.social"
|
||||
---
|
||||
|
||||
> This page is not updated anymore and is only kept for reference. Please refer to [Documentation](https://github.com/adityatelange/hugo-PaperMod/wiki/) for latest information.
|
||||
|
||||
## Social Icons
|
||||
|
||||
| Name | Platform Link |
|
||||
| --------------- | ------------------------------- |
|
||||
| `123rf` | 123rf.com |
|
||||
| `adobestock` | stock.adobe.com |
|
||||
| `applemusic` | music.apple.com |
|
||||
| `behance` | behance.net |
|
||||
| `bilibili` | bilibili.com |
|
||||
| `bitcoin` | - |
|
||||
| `buymeacoffee` | buymeacoffee.com |
|
||||
| `codepen` | codepen.io |
|
||||
| `cryptohack` | cryptohack.org |
|
||||
| `ctftime` | ctftime.org |
|
||||
| `cv` | - |
|
||||
| `deezer` | deezer.com |
|
||||
| `dev` | dev.to |
|
||||
| `discogs` | discogs.com |
|
||||
| `discord` | discord.com |
|
||||
| `dreamstime` | dreamstime.com |
|
||||
| `dribbble` | dribbble.com |
|
||||
| `email` | - |
|
||||
| `facebook` | facebook.com |
|
||||
| `flickr` | flickr.com |
|
||||
| `freepik` | freepik.com |
|
||||
| `gitea` | gitea.io |
|
||||
| `github` | github.com |
|
||||
| `gitlab` | gitlab.com |
|
||||
| `goodreads` | goodreads.com |
|
||||
| `googlescholar` | scholar.google.com |
|
||||
| `guruShots` | gurushots.com |
|
||||
| `hackerone` | hackerone.com |
|
||||
| `hackerrank` | hackerrank.com |
|
||||
| `hackthebox` | hackthebox.eu |
|
||||
| `instagram` | instagram.com |
|
||||
| `itchio` | itch.io |
|
||||
| `kaggle` | - |
|
||||
| `kakaotalk` | kakaocorp.com/service/KakaoTalk |
|
||||
| `key` | - |
|
||||
| `keybase` | keybase.io |
|
||||
| `kofi` | ko-fi.com |
|
||||
| `komoot` | - |
|
||||
| `lastfm` | last.fm |
|
||||
| `letterboxd` | - |
|
||||
| `liberapay` | liberapay.com |
|
||||
| `linkedin` | linkedin.com |
|
||||
| `mastodon` | mastodon.social |
|
||||
| `matrix` | matrix.org |
|
||||
| `medium` | medium.com |
|
||||
| `monero` | - |
|
||||
| `mixcloud` | mixcloud.com |
|
||||
| `nostr` | nostr.org |
|
||||
| `nuget` | nuget.org |
|
||||
| `paypal` | paypal.com |
|
||||
| `peertube` | - |
|
||||
| `pgp` | - |
|
||||
| `phone` | - |
|
||||
| `ploywork` | ploywork.com |
|
||||
| `qq` | qq.com |
|
||||
| `reddit` | reddit.com |
|
||||
| `researchgate` | researchgate.net |
|
||||
| `rss` | - |
|
||||
| `serverfault` | serverfault.com |
|
||||
| `soundcloud` | soundcloud.com |
|
||||
| `shutterstock` | shutterstock.com |
|
||||
| `slack` | slack.com |
|
||||
| `snapchat` | snapchat.com/add |
|
||||
| `spotify` | spotify.com |
|
||||
| `stackoverflow` | stackoverflow.com |
|
||||
| `steam` | steampowered.com |
|
||||
| `strava` | strava.com |
|
||||
| `telegram` | telegram.org |
|
||||
| `tiktok` | tiktok.com |
|
||||
| `twitch` | twitch.tv |
|
||||
| `twitter` | twitter.com |
|
||||
| `unsplash` | unsplash.com |
|
||||
| `x` | x.com |
|
||||
| `xda` | xda-developers.com |
|
||||
| `xing` | xing.com |
|
||||
| `ycombinator` | ycombinator.com |
|
||||
| `youtube` | youtube.com |
|
||||
| `zcal` | zcal.co |
|
||||
| `other` | - |
|
||||
|
||||
Usage :
|
||||
|
||||
```yml {linenos=true}
|
||||
socialIcons:
|
||||
- name: "kofi"
|
||||
url: "https://kofi.com"
|
||||
- name: "x"
|
||||
url: "https://x.com"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Share Icons
|
||||
|
||||
| Platform |
|
||||
| ------------------------------------------------------------------- |
|
||||
| `x` (also generates `#hashtags` from _tags_ linked with post) |
|
||||
| `linkedin` |
|
||||
| `reddit` |
|
||||
| `facebook` |
|
||||
| `whatsapp` |
|
||||
| `telegram` |
|
||||
|
||||
Usage:
|
||||
|
||||
```yml {linenos=true}
|
||||
params:
|
||||
ShowShareButtons: true
|
||||
```
|
||||
|
||||
```yml {linenos=true}
|
||||
params:
|
||||
ShareButtons: ["linkedin", "twitter"] # To customize which share buttons to be enabled on page
|
||||
```
|
||||
@@ -0,0 +1,164 @@
|
||||
---
|
||||
title: "PaperMod Installation Guide"
|
||||
summary: "Step by step guide to install and update PaperMod in your Hugo site."
|
||||
date: 2021-01-20
|
||||
weight: 1
|
||||
series: ["PaperMod"]
|
||||
aliases: ["/papermod-installation"]
|
||||
tags: ["PaperMod", "Docs"]
|
||||
author: ["Aditya Telange"]
|
||||
|
||||
social:
|
||||
fediverse_creator: "@adityatelange@mastodon.social"
|
||||
---
|
||||
|
||||
> - **We'll be using `yml/yaml` format for all examples down below, it is recommend to use `yaml` over `toml` as it is easier to read.**
|
||||
> - You can find any [YML to TOML](https://www.google.com/search?q=yml+to+toml) converters if needed.
|
||||
|
||||
---
|
||||
|
||||
## Getting Started 🚀
|
||||
|
||||
1. **Follow [Hugo Docs's - Quick Start](https://gohugo.io/getting-started/quick-start/) guide to install {{< inTextImg url="https://raw.githubusercontent.com/gohugoio/hugoDocs/master/static/img/hugo-logo.png" height="14" >}}.**
|
||||
<br>(Make sure you install [**Hugo v0.146.0 +**](https://github.com/gohugoio/hugo/releases) as PaperMod uses some of the latest features of Hugo. You can check your Hugo version by running `hugo version` in terminal.)
|
||||
|
||||
2. **Create a new {{< inTextImg url="https://raw.githubusercontent.com/gohugoio/hugoDocs/master/static/img/hugo-logo.png" height="14" >}} site**
|
||||
|
||||
```bash
|
||||
hugo new site MyFreshWebsite --format yaml
|
||||
# replace MyFreshWebsite with name of your website
|
||||
```
|
||||
|
||||
Note:
|
||||
- Older versions of Hugo may not support `--format yaml`
|
||||
- Read more here about [Hugo Docs's - hugo new site command](https://gohugo.io/commands/hugo_new_site/#synopsis)
|
||||
|
||||
3. **Installing/Updating PaperMod**
|
||||
- Themes reside in `MyFreshWebsite/themes` directory.
|
||||
- PaperMod will be installed in `MyFreshWebsite/themes/PaperMod`
|
||||
|
||||
> {{< collapse summary="**Expand Method 1 - Git Clone**" >}}
|
||||
|
||||
**INSTALL** : Inside the folder of your Hugo site `MyFreshWebsite`, run:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1
|
||||
```
|
||||
|
||||
You may use ` --branch v7.0` to end of above command if you want to stick to specific release.
|
||||
|
||||
**UPDATE**: Inside the folder of your Hugo site `MyFreshWebsite`, run:
|
||||
|
||||
```bash
|
||||
cd themes/PaperMod
|
||||
git pull
|
||||
```
|
||||
|
||||
{{</ collapse >}}
|
||||
|
||||
> {{< collapse summary="**Expand Method 2 - Git Submodule (recomended)**" >}}
|
||||
|
||||
**INSTALL** : Inside the folder of your Hugo site `MyFreshWebsite`, run:
|
||||
|
||||
```bash
|
||||
git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
|
||||
git submodule update --init --recursive # needed when you reclone your repo (submodules may not get cloned automatically)
|
||||
```
|
||||
|
||||
You may use ` --branch v7.0` to end of above command if you want to stick to specific release.
|
||||
Read more about git submodules [here](https://www.atlassian.com/git/tutorials/git-submodule).
|
||||
|
||||
**UPDATE**: Inside the folder of your Hugo site `MyFreshWebsite`, run:
|
||||
|
||||
```bash
|
||||
git submodule update --remote --merge
|
||||
```
|
||||
|
||||
{{</ collapse >}}
|
||||
|
||||
> {{< collapse summary="**Expand Method 3 - Download an unzip**" >}}
|
||||
|
||||
Download PaperMod source as Zip from Github Releases and extract in your themes directory at `MyFreshWebsite/themes/PaperMod`
|
||||
|
||||
Direct Links:
|
||||
- [Master Branch (Latest)](https://github.com/adityatelange/hugo-PaperMod/archive/master.zip)
|
||||
- [v7.0](https://github.com/adityatelange/hugo-PaperMod/archive/v7.0.zip)
|
||||
- [v6.0](https://github.com/adityatelange/hugo-PaperMod/archive/v6.0.zip)
|
||||
- [v5.0](https://github.com/adityatelange/hugo-PaperMod/archive/v5.0.zip)
|
||||
- [v4.0](https://github.com/adityatelange/hugo-PaperMod/archive/v4.0.zip)
|
||||
- [v3.0](https://github.com/adityatelange/hugo-PaperMod/archive/v3.0.zip)
|
||||
- [v2.0](https://github.com/adityatelange/hugo-PaperMod/archive/v2.0.zip)
|
||||
- [v1.0](https://github.com/adityatelange/hugo-PaperMod/archive/v1.0.zip)
|
||||
|
||||
{{</ collapse >}}
|
||||
|
||||
> {{< collapse summary="**Expand Method 4 - Hugo module**" >}}
|
||||
|
||||
**INSTALL** :
|
||||
- Install [Go programming language](https://go.dev/doc/install) in your operating system.
|
||||
|
||||
- Intialize your own hugo mod
|
||||
|
||||
```bash
|
||||
hugo mod init YOUR_OWN_GIT_REPOSITORY
|
||||
```
|
||||
|
||||
- Add PaperMod in your `hugo.yaml` file
|
||||
|
||||
```go {linenos=true}
|
||||
module:
|
||||
imports:
|
||||
- path: github.com/adityatelange/hugo-PaperMod
|
||||
```
|
||||
|
||||
**UPDATE**:
|
||||
|
||||
```bash
|
||||
hugo mod get -u
|
||||
```
|
||||
|
||||
Read more : [Hugo Docs's - HUGO MODULES](https://gohugo.io/hugo-modules/use-modules/)
|
||||
|
||||
{{</ collapse >}}
|
||||
|
||||
4. **Finally set theme as PaperMod in your site config**
|
||||
|
||||
In `hugo.yaml` add:
|
||||
|
||||
```yml {linenos=true}
|
||||
theme: ["PaperMod"]
|
||||
```
|
||||
|
||||
### Next up - Customizing PaperMod to suit your preferences 🎨
|
||||
|
||||
- Your site will be blank after you set up for the very first time.
|
||||
- You may go through this website's source code - [PaperMod's exampleSite's source](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite)
|
||||
- You can also refer to the following wiki pages for detailed documentation on all features and configuration options.
|
||||
|
||||
| Topic | Description |
|
||||
| ------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||||
| **[Installation guide](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)** | Detailed installation and update instructions |
|
||||
| **[Features wiki page](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)** | In-depth explanations of all features |
|
||||
| **[FAQ wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)** | Common questions and configuration walkthroughs |
|
||||
| **[Icons wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)** | Documentation for social icons and share icons |
|
||||
| **[Variables wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/Variables)** | List of all available template variables |
|
||||
| **[Overiding templates](https://github.com/adityatelange/hugo-PaperMod/wiki/Template_Overrides)** | Guide to customizing templates without forking |
|
||||
| **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)** | Detailed history of releases |
|
||||
|
||||
---
|
||||
|
||||
## Support 🫶
|
||||
|
||||
- Star 🌟 PaperMod's [Github repository](https://github.com/adityatelange/hugo-PaperMod).
|
||||
- Help spread the word about PaperMod by [sharing it on social media](https://x.com/intent/tweet/?text=Checkout%20Hugo%20PaperMod%20%E2%9C%A8%0AA%20fast,%20clean,%20responsive%20Hugo%20theme.&url=https://github.com/adityatelange/hugo-PaperMod&hashtags=Hugo,PaperMod) and recommending it to your friends. 🗣️
|
||||
- You can also sponsor 🏅 on [Github Sponsors](https://github.com/sponsors/adityatelange) / [Ko-Fi](https://ko-fi.com/adityatelange).
|
||||
|
||||
---
|
||||
|
||||
## Videos featuring PaperMod
|
||||
|
||||
You can go through few videos which are available on YouTube for getting to know the creator's thoughts as well as the setup process.
|
||||
|
||||
▶️ [Curated list of videos about PaperMod](https://youtube.com/playlist?list=PLeiDFxcsdhUrzkK5Jg9IZyiTsIMvXxKZP)
|
||||
|
||||
---
|
||||
@@ -0,0 +1,205 @@
|
||||
---
|
||||
title: "Variables | Front Matter"
|
||||
summary: List of Front Matter variables used by PaperMod
|
||||
date: 2021-01-20
|
||||
expiryDate: 2026-05-08
|
||||
tags: ["PaperMod", "Docs"]
|
||||
author: ["Aditya Telange"]
|
||||
draft: true
|
||||
social:
|
||||
fediverse_creator: "@adityatelange@mastodon.social"
|
||||
---
|
||||
|
||||
> This page is not updated anymore and is only kept for reference. Please refer to [Documentation](https://github.com/adityatelange/hugo-PaperMod/wiki/) for latest information.
|
||||
|
||||
**Below are variables used with this theme...**
|
||||
|
||||
---
|
||||
|
||||
### Site Variables under `Params`
|
||||
|
||||
| name | type | example | Description |
|
||||
| -------------------------------------- | ------------- | ------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `env` | string | 'production' | To set env to production |
|
||||
| `title` | string | 'My Blog' | To set title |
|
||||
| `description` | string | 'This is a blog of mine' | To set site description |
|
||||
| `author` | string \|list | 'Me' \| ['Me','You'] | To show multiple Authors |
|
||||
| `images` | string | 'myimage.png' | Link or path of image for opengraph, twitter-cards |
|
||||
| `keywords` | list | [blog, page] | Add keywords for Home page |
|
||||
| `DateFormat` | string | "January 2, 2006" | The format of date strings in the website. [Details](https://gohugo.io/functions/format/) |
|
||||
| `languageAltTitle` | string | "English" | Alternate title in Multilingual Mode |
|
||||
| `ShowReadingTime` | boolean | true \| false | To show read time in post meta |
|
||||
| `ShowShareButtons` | boolean | true \| false | To show/hide share buttons under post |
|
||||
| `ShowCodeCopyButtons` | boolean | true \| false | To show/hide Code Copy button |
|
||||
| `ShowFullTextinRSS` | boolean | true \| false | To show Content in RSS feed |
|
||||
| `defaultTheme` | string | light \| dark \| auto | To set default theme |
|
||||
| `disableThemeToggle` | boolean | true \| false | To disable theme toggle icon shown besides label |
|
||||
| `disableSpecial1stPost` | boolean | true \| false | To disable no-card special appearance of 1st post |
|
||||
| `disableScrollToTop` | boolean | true \| false | To disable ScrollToTop button |
|
||||
| `disableAnchoredHeadings` | boolean | true \| false | To disable Anchored Headings |
|
||||
| `hideMeta` | boolean | true \| false | To Hide meta elements : date, read-time, author and available-translations for page |
|
||||
| `hideSummary` | boolean | true \| false | To Hide summary being shown in list pages |
|
||||
| `showtoc` | boolean | true \| false | To show/hide Table of Contents |
|
||||
| `tocopen` | boolean | true \| false | To keep open ToC by default on page load |
|
||||
| `ShowPostNavLinks` | boolean | true \| false | Show Previous and Next Posts below a Post |
|
||||
| `ShowBreadCrumbs` | boolean | true \| false | Show BreadCrumb Navigation above single post/page |
|
||||
| `ShareButtons` | list | ["linkedin", "x"] | To customize which share buttons to be enabled on page |
|
||||
| `ShowWordCount` | boolean | true \| false | To word count to metadata |
|
||||
| `ShowRssButtonInSectionTermList` | boolean | true \| false | To show RSS icon in Section, Term and List pages |
|
||||
| `UseHugoToc` | boolean | true \| false | To use Hugo's default Toc instead of custom |
|
||||
| `comments` | boolean | true \| false | To show/hide comments |
|
||||
| `hideFooter` | boolean | true \| false | To Hide Footer Text om the end of page |
|
||||
| `CanonicalLinkText` | string | 'Originally published at' | To show text before canonical URL's hostname |
|
||||
| `displayFullLangName` | boolean | true \| false | To show `languageName` under a language in Language switch header |
|
||||
| `analytics.google.SiteVerificationTag` | string | "XYZabc" | Site Verification Tag for Google Analytics |
|
||||
| `analytics.bing.SiteVerificationTag` | string | "XYZabc" | Site Verification Tag for Bing |
|
||||
| `analytics.yandex.SiteVerificationTag` | string | "XYZabc" | Site Verification Tag for Yandex |
|
||||
| `schema` | - | - | [Details](#schema) |
|
||||
| `fuseOpts` | - | - | [Details](#fuseopts) |
|
||||
| `socialIcons` | - | - | [Details](#socialicons) |
|
||||
| `label` | - | - | [Details](#label) |
|
||||
| `assets` | - | - | [Details](#assets) |
|
||||
| `cover` | - | - | [Details](#cover) |
|
||||
| `profileMode` | - | - | [Details](#profilemode) |
|
||||
| `editPost` | - | - | [Details](#editpost) |
|
||||
|
||||
### Site Variables
|
||||
|
||||
| name | type | example | Description |
|
||||
| ----------- | ------ | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `copyright` | string | `**[example.site](https://example.site)**` | This is [HUGO's site variable](https://gohugo.io/variables/site/#site-variables-list), which can also render markdown content |
|
||||
|
||||
#### label
|
||||
|
||||
| name | type | example | Description |
|
||||
| ------------------ | ------- | ----------------------- | ------------------------------------------------ |
|
||||
| `label.text` | string | 'Home' | To display different label text other than title |
|
||||
| `label.icon` | string | '/apple-touch-icon.png' | To display a logo image in label |
|
||||
| `label.iconHeight` | integer | 35 | To set size of label logo image |
|
||||
|
||||
#### profileMode
|
||||
|
||||
| name | type | example | Description |
|
||||
| ------------------------- | ------- | ---------------------------------------------- | ---------------------------------------------------- |
|
||||
| `profileMode.enabled` | boolean | true \| false | For enabling profileMode, needs to be explicitly set |
|
||||
| `profileMode.title` | string | "Title" | Title |
|
||||
| `profileMode.subtitle` | string | "subtitle here" | Subtitle |
|
||||
| `profileMode.imageUrl` | string | "image.png" \| "https://example.com/image.jpg" | Image URL or Link |
|
||||
| `profileMode.imageWidth ` | string | "150" | Width of image |
|
||||
| `profileMode.imageHeight` | string | "150" | Height of image |
|
||||
| `profileMode.imageTitle` | string | "This image is a picture of .." | Title of image |
|
||||
| `profileMode.buttons` | - | - | [Details](#profilemodebuttons) |
|
||||
|
||||
##### profileMode.buttons
|
||||
|
||||
```yml
|
||||
profileMode:
|
||||
buttons:
|
||||
- name: Archive
|
||||
url: "/archive"
|
||||
- name: Github
|
||||
url: "https://github.com/"
|
||||
```
|
||||
|
||||
#### assets
|
||||
|
||||
| name | type | example | Description |
|
||||
| -------------------------------- | ------- | ------------- | -------------------------------------------- |
|
||||
| `assets.favicon` | string | 'icon.ico' | To set favicon, can be path or external link |
|
||||
| `assets.disableHLJS` | boolean | true \| false | To disable Highlight.js loading |
|
||||
| `assets.disableFingerprinting` | boolean | true \| false | To disable Sub-Resource integrity for assets |
|
||||
| `assets.theme_color` | string | '#color' | To set custom meta theme-color |
|
||||
| `assets.msapplication_TileColor` | string | '#color' | To set custom msapplication_TileColor |
|
||||
|
||||
#### cover
|
||||
|
||||
| name | type | example | Description |
|
||||
| ------------------------ | ------- | ------------- | ------------------------------------------------------- |
|
||||
| `cover.linkFullImages` | boolean | true \| false | To open full size cover images on click on cover |
|
||||
| `cover.responsiveImages` | boolean | true \| false | To enable/disable generation of responsive cover images |
|
||||
| `cover.hidden` | boolean | true \| false | To hide everywhere but not in structured data |
|
||||
| `cover.hiddenInList` | boolean | true \| false | To hide on list pages and home |
|
||||
| `cover.hiddenInSingle ` | boolean | true \| false | To hide on list pages and home |
|
||||
|
||||
#### schema
|
||||
|
||||
| name | type | example | Description |
|
||||
| ---------------------- | ------ | ---------------- | ----------------------------- |
|
||||
| `schema.publisherType` | string | 'Organization' | https://schema.org/publisher |
|
||||
| `schema.sameAs` | list | ["URL1", "URL2"] | Set https://schema.org/sameAs |
|
||||
|
||||
#### fuseOpts
|
||||
|
||||
Refer: https://fusejs.io/api/options.html
|
||||
|
||||
```yml
|
||||
fuseOpts:
|
||||
isCaseSensitive: false
|
||||
shouldSort: true
|
||||
location: 0
|
||||
distance: 1000
|
||||
threshold: 0.4
|
||||
minMatchCharLength: 0
|
||||
limit: 10 # refer: https://www.fusejs.io/api/methods.html#search
|
||||
keys: ["title", "permalink", "summary", "content"] ## can be less but not more than shown in list
|
||||
```
|
||||
|
||||
#### socialIcons
|
||||
|
||||
```yml
|
||||
socialIcons:
|
||||
- name: "<platform>"
|
||||
url: "<link>"
|
||||
- name: "<platform 2>"
|
||||
url: "<link2>"
|
||||
```
|
||||
|
||||
#### editPost
|
||||
|
||||
```yml
|
||||
editPost:
|
||||
URL: "https://github.com/<path_to_repo>/content"
|
||||
Text: "Suggest Changes" # edit text
|
||||
appendFilePath: true # to append file path to Edit link
|
||||
```
|
||||
|
||||
> Note: Same format is being used by Page Variables
|
||||
|
||||
---
|
||||
|
||||
### Page Variables
|
||||
|
||||
| Name | Type | Example | Description |
|
||||
| -------------------------------- | ------------- | ------------------------------- | ----------------------------------------------------------------------------------- |
|
||||
| `showtoc` | boolean | true \| false | To show/hide Table of Contents |
|
||||
| `tocopen` | boolean | true \| false | To keep open ToC by default on page load |
|
||||
| `hidemeta` | boolean | true \| false | To Hide meta elements : date, read-time, author and available-translations for page |
|
||||
| `comments` | boolean | true \| false | To show/hide comments |
|
||||
| `description` | string | 'description text' | Show Post Description under Title |
|
||||
| `canonicalURL` | string | "https://canonical.url/to/page" | To add canonical URL to posts |
|
||||
| `ShowCanonicalLink` | boolean | true \| false | To show canonical URL's hostname |
|
||||
| `CanonicalLinkText` | string | 'Originally published at' | To show text before canonical URL's hostname |
|
||||
| `disableShare` | boolean | true \| false | To hide/show share icons under a page |
|
||||
| `disableHLJS` | boolean | true \| false | To disable Highlight.js loading |
|
||||
| `disableAnchoredHeadings` | boolean | true \| false | To disable Anchored Headings |
|
||||
| `searchHidden` | boolean | true \| false | Hide page from search |
|
||||
| `hideSummary` | boolean | true \| false | To Hide summary being shown in list pages |
|
||||
| `hideFooter` | boolean | true \| false | To Hide Footer Text om the end of page |
|
||||
| `ShowReadingTime` | boolean | true \| false | To show read time in post meta |
|
||||
| `ShowBreadCrumbs` | boolean | true \| false | Show BreadCrumb Navigation above single post/page |
|
||||
| `ShowPostNavLinks` | boolean | true \| false | Show Previous and Next Posts below a Post |
|
||||
| `ShowCodeCopyButtons` | boolean | true \| false | To show/hide Code Copy button |
|
||||
| `author` | string \|list | 'Me' \| ['Me','You'] | To show multiple Authors |
|
||||
| `cover.image` | string | 'featured.jpg' | To add a cover image |
|
||||
| `cover.caption ` | string | 'caption for image' | To add caption to cover image |
|
||||
| `cover.alt` | string | 'this is cover image' | Alternate text to show if image doesn't load/show up |
|
||||
| `cover.relative` | boolean | true \| false | To use relative path for cover image, used in hugo Page-bundles |
|
||||
| `cover.responsiveImages` | boolean | true \| false | To enable/disable generation of responsive cover images |
|
||||
| `cover.hidden` | boolean | true \| false | To hide on current single page |
|
||||
| `weight ` | integer | 5 | To set page order or to pin a post to Top of list |
|
||||
| `ShareButtons` | list | ["linkedin", "x"] | To customize which share buttons to be enabled on page |
|
||||
| `ShowWordCount` | boolean | true \| false | To word count to metadata |
|
||||
| `ShowRssButtonInSectionTermList` | boolean | true \| false | To show RSS icon in Section, Term and List pages |
|
||||
| `UseHugoToc` | boolean | true \| false | To use Hugo's default Toc instead of custom |
|
||||
| `robotsNoIndex` | boolean | true \| false | To hide a particular page from indexing by search engines |
|
||||
| `hiddenInHomelist` | boolean | true \| false | To Hide specific being shown in Home pages |
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
author: ["Hugo Authors", "PaperMod Contributors"]
|
||||
title: "Rich Content and Shortcodes"
|
||||
date: "2019-03-10"
|
||||
description: "A brief description of Hugo Shortcodes"
|
||||
tags: ["markdown", "shortcodes", "privacy"]
|
||||
ShowToc: true
|
||||
---
|
||||
|
||||
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
|
||||
|
||||
{{< youtube hjD9jTi_DQ4 >}}
|
||||
|
||||
---
|
||||
|
||||
## Vimeo Shortcode
|
||||
|
||||
{{< vimeo 152985022 >}}
|
||||
|
||||
---
|
||||
|
||||
## X Shortcode
|
||||
|
||||
{{< x user="GoHugoIO" id="1305090583917203457" >}}
|
||||
|
||||
---
|
||||
|
||||
## Instagram Shortcode
|
||||
|
||||
{{< instagram DBHw3t6A6a4 >}}
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "SearchL2"
|
||||
layout: "search"
|
||||
---
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: "Search"
|
||||
placeholder: Search demo site with full text fuzzy search ...
|
||||
layout: "search"
|
||||
---
|
||||
@@ -1,5 +0,0 @@
|
||||
- id: prev_page
|
||||
translation: "Vorherige Seite"
|
||||
|
||||
- id: next_page
|
||||
translation: "Nächste Seite"
|
||||
@@ -1,16 +0,0 @@
|
||||
- id: prev_page
|
||||
translation: "Prev Page"
|
||||
|
||||
- id: next_page
|
||||
translation: "Next Page"
|
||||
|
||||
- id: read_time
|
||||
translation:
|
||||
one : "1 min"
|
||||
other: "{{ .Count }} min"
|
||||
|
||||
- id: toc
|
||||
translation: "Table of Contents"
|
||||
|
||||
- id: translations
|
||||
translation: "Translations"
|
||||
@@ -1,5 +0,0 @@
|
||||
- id: prev_page
|
||||
translation: "Página anterior"
|
||||
|
||||
- id: next_page
|
||||
translation: "Página siguiente"
|
||||
@@ -1,5 +0,0 @@
|
||||
- id: prev_page
|
||||
translation: "Page Précédente"
|
||||
|
||||
- id: next_page
|
||||
translation: "Page Suivante"
|
||||
@@ -1,16 +0,0 @@
|
||||
- id: prev_page
|
||||
translation: "पिछला पृष्ठ"
|
||||
|
||||
- id: next_page
|
||||
translation: "अगला पृष्ठ"
|
||||
|
||||
- id: read_time
|
||||
translation:
|
||||
one : "एक मिनट"
|
||||
other: "{{ .Count }} मिनट"
|
||||
|
||||
- id: toc
|
||||
translation: "विषय - सूची"
|
||||
|
||||
- id: translations
|
||||
translation: "अनुवाद"
|
||||
@@ -1,5 +0,0 @@
|
||||
- id: prev_page
|
||||
translation: "前のページ"
|
||||
|
||||
- id: next_page
|
||||
translation: "次のページ"
|
||||
@@ -1,5 +0,0 @@
|
||||
- id: prev_page
|
||||
translation: "이전 페이지"
|
||||
|
||||
- id: next_page
|
||||
translation: "다음 페이지"
|
||||
@@ -1,5 +0,0 @@
|
||||
- id: prev_page
|
||||
translation: "Сюда"
|
||||
|
||||
- id: next_page
|
||||
translation: "Туда"
|
||||
@@ -1,16 +0,0 @@
|
||||
- id: prev_page
|
||||
translation: "上一页"
|
||||
|
||||
- id: next_page
|
||||
translation: "下一页"
|
||||
|
||||
- id: read_time
|
||||
translation:
|
||||
one : "1 分钟"
|
||||
other: "{{ .Count }} 分钟"
|
||||
|
||||
- id: toc
|
||||
translation: "目录"
|
||||
|
||||
- id: translations
|
||||
translation: "语言"
|
||||
|
Before Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 16 KiB |
@@ -1,3 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<div class="not-found">404</div>
|
||||
{{ end }}{{/* end main */}}
|
||||
@@ -1,42 +0,0 @@
|
||||
{{- define "main" }}
|
||||
|
||||
<header class="page-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</header>
|
||||
|
||||
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{- range $pages.GroupByPublishDate "2006" }}
|
||||
{{- if ne .Key "0001" }}
|
||||
<div class="archive-year">
|
||||
<h2 class="archive-year-header">
|
||||
{{- replace .Key "0001" "" }}<sup class="archive-count"> {{ len .Pages }}</sup>
|
||||
</h2>
|
||||
{{- range .Pages.GroupByDate "January" }}
|
||||
<div class="archive-month">
|
||||
<h3 class="archive-month-header">{{- .Key }}<sup class="archive-count"> {{ len .Pages }}</h3>
|
||||
<div class="archive-posts">
|
||||
{{- range .Pages }}
|
||||
{{- if eq .Kind "page" }}
|
||||
<div class="archive-entry">
|
||||
<h3 class="archive-entry-title">
|
||||
{{- .Title | markdownify }}
|
||||
</h3>
|
||||
<div class="archive-meta">
|
||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||
{{- if $.Site.Params.ShowReadingTime }} ·
|
||||
{{- $default_txt := print .ReadingTime " " "min" }}
|
||||
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
||||
{{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }}
|
||||
</div>
|
||||
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}{{/* end main */}}
|
||||
@@ -1,18 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language }}">
|
||||
|
||||
<head>
|
||||
{{- partial "head.html" . }}
|
||||
</head>
|
||||
|
||||
<body class="{{ if (and (eq .Kind `page` ) (ne .Layout `archives`)) }}single{{ else }}list
|
||||
{{- if .IsHome }} home{{ end }}{{ end }}{{- if eq $.Site.Params.defaultTheme `dark` }} dark{{ end }}" id="top">
|
||||
{{- partialCached "header.html" . .Page}}
|
||||
<main class="main">
|
||||
{{- block "main" . }}
|
||||
{{- end }}
|
||||
</main>
|
||||
{{- partialCached "footer.html" . .Type }}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,78 +0,0 @@
|
||||
{{- define "main" }}
|
||||
|
||||
{{- if (and .Site.Params.profileMode.enabled .IsHome) }}
|
||||
{{- partial "index_profile.html" . }}
|
||||
{{- else }} {{/* if not profileMode */}}
|
||||
|
||||
{{- if not .IsHome | and .Title }}
|
||||
<header class="page-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</header>
|
||||
{{- end }}
|
||||
|
||||
{{- $pages := .RegularPages }}
|
||||
|
||||
{{- if .IsHome }}
|
||||
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{- end}}
|
||||
|
||||
{{ $paginator := .Paginate $pages }}
|
||||
|
||||
{{- range $index, $page := $paginator.Pages }}
|
||||
|
||||
{{- $class := "post-entry" }}
|
||||
{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0)) }}
|
||||
{{- if .Site.Params.homeInfoParams | or .Site.Params.disableSpecial1stPost}}
|
||||
{{- partial "home_info.html" . }}
|
||||
{{- else}}
|
||||
{{- $class = "first-entry" }}
|
||||
{{- end }}
|
||||
{{- else if .Data.Term }}
|
||||
{{- $class = "post-entry tag-entry" }}
|
||||
{{- end }}
|
||||
<article class="{{ $class }}">
|
||||
{{- if .Params.cover.image }}
|
||||
<figure class="entry-cover">
|
||||
{{- if (or (fileExists (path.Join "static" .Params.cover.image)) (hasPrefix .Params.cover.image "http://") (hasPrefix .Params.cover.image "https://")) }}
|
||||
<img src="{{ .Params.cover.image | absURL }}" alt="{{ .Params.cover.alt | plainify }}">
|
||||
{{- else}}
|
||||
<img src="{{ .Permalink -}} {{- .Params.cover.image }}" alt="{{ .Params.cover.alt | plainify }}">
|
||||
{{- end}}
|
||||
</figure>
|
||||
{{- end }}
|
||||
<header class="entry-header">
|
||||
<h2>
|
||||
{{ .Title }}
|
||||
{{- if .Draft }}<div class="entry-isdraft"><sup> [draft]</sup></div>{{- end }}
|
||||
</h2>
|
||||
</header>
|
||||
{{- if (ne .Site.Params.hideSummary true)}}
|
||||
<section class="entry-content">
|
||||
<p>{{ .Summary | plainify | htmlUnescape }}...</p>
|
||||
</section>
|
||||
{{- end }}
|
||||
<footer class="entry-footer">
|
||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||
{{- if $.Site.Params.ShowReadingTime }} ·
|
||||
{{- $default_txt := print .ReadingTime " " "min" }}
|
||||
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
||||
{{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }}
|
||||
</footer>
|
||||
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
||||
</article>
|
||||
{{- end }}
|
||||
|
||||
{{- if gt $paginator.TotalPages 1 }}
|
||||
<footer class="page-footer">
|
||||
<nav class="pagination">
|
||||
{{- if $paginator.HasPrev }}
|
||||
<a class="prev" href="{{ $paginator.Prev.URL }}">« {{ i18n "prev_page" }}</a>
|
||||
{{- end }}
|
||||
{{- if $paginator.HasNext }}
|
||||
<a class="next" href="{{ $paginator.Next.URL }}">{{ i18n "next_page" }} »</a>
|
||||
{{- end }}
|
||||
</nav>
|
||||
</footer>
|
||||
{{- end }}
|
||||
{{end}}{{/* end profileMode */}}
|
||||
{{- end }}{{- /* end main */ -}}
|
||||
@@ -1,71 +0,0 @@
|
||||
{{- define "main" }}
|
||||
|
||||
<article class="post-single">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">
|
||||
{{ .Title }}
|
||||
{{- if .Draft }}<div class="entry-isdraft"><sup> [draft]</sup></div>{{- end }}
|
||||
</h1>
|
||||
{{- if .Params.hideMeta }}{{ else }}
|
||||
<div class="post-meta">
|
||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||
{{- if $.Site.Params.ShowReadingTime -}} ·
|
||||
{{- $default_txt := print .ReadingTime " " "min" }}
|
||||
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
||||
{{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }}
|
||||
{{- if .IsTranslated -}} |
|
||||
<ul class="i18n_list">
|
||||
{{- i18n "translations" | default "Translations"}}:
|
||||
{{- range .Translations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end}}
|
||||
</header>
|
||||
{{- if .Params.cover.image }}
|
||||
<figure class="entry-cover">
|
||||
{{- if (or (fileExists (path.Join "static" .Params.cover.image)) (hasPrefix .Params.cover.image "http://") (hasPrefix .Params.cover.image "https://")) }}
|
||||
<img src="{{ .Params.cover.image | absURL }}" alt="{{ .Params.cover.alt | plainify }}">
|
||||
{{- else}}
|
||||
<img src="{{ .Permalink -}} {{- .Params.cover.image }}" alt="{{ .Params.cover.alt | plainify }}">
|
||||
{{- end}}
|
||||
<p>{{.Params.cover.caption | markdownify }}</p>
|
||||
</figure>
|
||||
{{- end }}
|
||||
{{- if .Params.ShowToc }}
|
||||
<div class="toc">
|
||||
<details {{if .Params.TocOpen }} open{{ end }}>
|
||||
<summary>
|
||||
<div class="details">{{- i18n "toc" | default "Table of Contents" }}</div>
|
||||
</summary>
|
||||
<blockquote>
|
||||
{{- partial "toc.html" . }}
|
||||
</blockquote>
|
||||
</details>
|
||||
</div>
|
||||
{{- end }}
|
||||
<div class="post-content">{{ .Content }}</div>
|
||||
<footer class="post-footer">
|
||||
{{- if .Params.tags }}
|
||||
<ul class="post-tags">
|
||||
{{- range .Params.tags }}
|
||||
{{- $href := print (absLangURL "tags/") (urlize .) }}
|
||||
<li><a href="{{ $href }}">{{ . }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true) ) }}
|
||||
{{- partial "share_icons.html" . }}
|
||||
{{- end }}
|
||||
</footer>
|
||||
|
||||
{{- if and ($.Site.Params.comments) (ne .Params.comments false) }}
|
||||
{{- partial "comments.html" . }}
|
||||
{{- end }}
|
||||
</article>
|
||||
|
||||
{{- end }}{{/* end main */}}
|
||||
@@ -1,22 +0,0 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{- if .Title }}
|
||||
<header class="page-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</header>
|
||||
{{- end }}
|
||||
|
||||
<ul class="terms-tags">
|
||||
{{- $type := .Type }}
|
||||
{{- range $key, $value := .Data.Terms.Alphabetical }}
|
||||
{{- $name := .Name }}
|
||||
{{- $count := .Count }}
|
||||
{{- with $.Site.GetPage (printf "/%s/%s" $type $name) }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
|
||||
{{ end }}{{/* end main */}}
|
||||
@@ -1,5 +0,0 @@
|
||||
<!-- Comments area start -->
|
||||
<!--
|
||||
to add comments read => https://gohugo.io/content-management/comments/
|
||||
-->
|
||||
<!-- Comments area end -->
|
||||
@@ -1,69 +0,0 @@
|
||||
<footer class="footer">
|
||||
{{- if .Site.Copyright }}
|
||||
<span>{{ .Site.Copyright | markdownify }}</span>
|
||||
{{- else }}
|
||||
<span>© {{ now.Year }} <a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></span>
|
||||
{{- end }}
|
||||
<span>·</span>
|
||||
<span>Powered by <a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo️️</a>️</span>
|
||||
<span>·</span>
|
||||
<span>Theme️ <a href="https://git.io/hugopapermod" rel="noopener" target="_blank">PaperMod</a></span>
|
||||
</footer>
|
||||
<a href="#top" aria-label="go to top" title="Go to Top">
|
||||
<button class="top-link" id="top-link" type="button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6">
|
||||
<path d="M12 6H0l6-6z" /></svg>
|
||||
</button>
|
||||
</a>
|
||||
{{ if in site.Params.mainSections .Type }}
|
||||
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint -}}
|
||||
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
{{- end }}
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (localStorage.getItem("menu-scroll-position")) {
|
||||
document.getElementById('menu').scrollLeft = localStorage.getItem("menu-scroll-position");
|
||||
}
|
||||
}
|
||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||
anchor.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
document.querySelector(this.getAttribute("href")).scrollIntoView({
|
||||
behavior: "smooth"
|
||||
});
|
||||
});
|
||||
});
|
||||
var mybutton = document.getElementById("top-link");
|
||||
window.onscroll = function () {
|
||||
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
|
||||
mybutton.style.visibility = "visible";
|
||||
mybutton.style.opacity = "1";
|
||||
} else {
|
||||
mybutton.style.visibility = "hidden";
|
||||
mybutton.style.opacity = "0";
|
||||
}
|
||||
};
|
||||
function menu_on_scroll() {
|
||||
localStorage.setItem("menu-scroll-position", document.getElementById('menu').scrollLeft);
|
||||
}
|
||||
</script>
|
||||
{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }}
|
||||
<script>
|
||||
document.getElementById("theme-toggle").addEventListener("click", () => {
|
||||
if (document.body.className.includes("dark")) {
|
||||
document.body.classList.remove('dark');
|
||||
localStorage.setItem("pref-theme", 'light');
|
||||
} else {
|
||||
document.body.classList.add('dark');
|
||||
localStorage.setItem("pref-theme", 'dark');
|
||||
}
|
||||
})
|
||||
</script>
|
||||
{{- else -}}
|
||||
<!-- case where owner disables theme button after deployment, this resets the stored theme -->
|
||||
<script>
|
||||
localStorage.removeItem("pref-theme");
|
||||
</script>
|
||||
{{- end }}
|
||||
@@ -1,55 +0,0 @@
|
||||
<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 .IsHome }}{{else}}{{ if .Title }}{{ .Title }} - {{ end }}{{end}}{{ .Site.Title }}</title>
|
||||
<!-- Meta -->
|
||||
{{- if in site.Params.mainSections .Type }}
|
||||
<meta name="description" content="{{ .Summary }}">
|
||||
<meta name="keywords" content={{ delimit .Keywords ", " }} />
|
||||
{{- else }}
|
||||
<meta name="description"
|
||||
content="{{if .IsHome}}{{ .Site.Params.description }}{{else}}{{ .Title }} - {{ .Site.Title }}{{end}}">
|
||||
{{- end }}
|
||||
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
{{- if .Site.Params.analytics.google.SiteVerificationTag }}
|
||||
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
|
||||
{{- end}}
|
||||
<!-- Styles -->
|
||||
{{- $anoldhope := resources.Get "css/an-old-hope.min.css" }}
|
||||
{{- $theme := resources.Get "css/theme-vars.css" }}
|
||||
{{- $reset := resources.Get "css/reset.css" }}
|
||||
{{- $header := resources.Get "css/header.css" }}
|
||||
{{- $main := resources.Get "css/main.css" }}
|
||||
{{- $postentry := resources.Get "css/post-entry.css" }}
|
||||
{{- $postsingle := resources.Get "css/post-single.css" }}
|
||||
{{- $terms := resources.Get "css/terms.css" }}
|
||||
{{- $archive := resources.Get "css/archive.css" }}
|
||||
{{- $footer := resources.Get "css/footer.css" }}
|
||||
{{- $404 := resources.Get "css/404.css" }}
|
||||
{{- $style := slice $theme $reset $header $main $postentry $postsingle $terms $archive $footer $404 | resources.Concat "stylesheet.css" }}
|
||||
{{- $stylesheet := slice $anoldhope $style | resources.Concat "assets/css/stylesheet.css" | minify | fingerprint -}}
|
||||
<link href="{{ $stylesheet.Permalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet"
|
||||
as="style">
|
||||
{{- if (and (.Site.Params.profileMode.enabled) (.IsHome)) }}
|
||||
{{- $profileMode := slice (resources.Get "css/profile-mode.css") | resources.Concat "assets/css/profile-mode.css" | minify | fingerprint }}
|
||||
<link href="{{ $profileMode.Permalink }}" integrity="{{ $profileMode.Data.Integrity }}" rel="preload stylesheet"
|
||||
as="style">
|
||||
{{- end -}}
|
||||
<!-- Favicons -->
|
||||
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
|
||||
<link rel="icon" href="{{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }}">
|
||||
<!-- Generator -->
|
||||
{{- hugo.Generator }}
|
||||
<!-- RSS -->
|
||||
{{- range .AlternativeOutputFormats -}}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
||||
{{ end -}}
|
||||
<!-- Misc -->
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
|
||||
{{- template "_internal/google_analytics_async.html" . }}
|
||||
{{- template "_internal/opengraph.html" . }}
|
||||
{{- template "_internal/twitter_cards.html" . }}
|
||||
{{- template "_internal/schema.html" . }}
|
||||
{{- end }}
|
||||
@@ -1,75 +0,0 @@
|
||||
{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }}
|
||||
<script>
|
||||
// load memory
|
||||
if (localStorage.getItem("pref-theme") === "dark") {
|
||||
document.body.classList.add('dark');
|
||||
} else if (localStorage.getItem("pref-theme") === "light") {
|
||||
document.body.classList.remove('dark')
|
||||
} else {
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
document.body.classList.add('dark');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{{- end }}
|
||||
{{- if (and (.Site.Params.disableThemeToggle) (eq .Site.Params.defaultTheme "auto")) }}
|
||||
<script>
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
document.body.classList.add('dark');
|
||||
}
|
||||
</script>
|
||||
{{- end }}
|
||||
<noscript>
|
||||
<style type="text/css">
|
||||
.theme-toggle,
|
||||
.top-link {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</noscript>
|
||||
<header class="header">
|
||||
<nav class="nav">
|
||||
<p class="logo">
|
||||
<a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a>
|
||||
{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }}
|
||||
<span class="theme-toggle">
|
||||
<a id="theme-toggle">
|
||||
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
||||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
|
||||
</svg>
|
||||
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
||||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</a>
|
||||
</span>
|
||||
{{- end}}
|
||||
</p>
|
||||
{{- $currentPage := . }}
|
||||
<ul class="menu" id="menu" onscroll="menu_on_scroll()">
|
||||
{{- range .Site.Menus.main }}
|
||||
{{- $menu_item_url := .URL | relLangURL }}
|
||||
{{- $page_url:= $currentPage.RelPermalink | relLangURL }}
|
||||
<li>
|
||||
<a href="{{ .URL | absLangURL }}">
|
||||
<span {{- if eq $menu_item_url $page_url }}
|
||||
{{- /* the menu item links to the current page (with relLangURL) */}} class="active" {{- end }}>
|
||||
{{ .Name }}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
@@ -1,13 +0,0 @@
|
||||
{{- with $.Site.Params.homeInfoParams }}
|
||||
<article class="first-entry">
|
||||
<header class="entry-header">
|
||||
<h2>{{- .Title }}</h2>
|
||||
</header>
|
||||
<section class="entry-content">
|
||||
<p>{{- .Content | markdownify }}</p>
|
||||
</section>
|
||||
<footer class="entry-footer">
|
||||
{{- partial "social_icons.html" $.Site.Params.socialIcons -}}
|
||||
</footer>
|
||||
</article>
|
||||
{{- end}}
|
||||
@@ -1,20 +0,0 @@
|
||||
<div class="profile">
|
||||
{{- with .Site.Params.profileMode }}
|
||||
<div class="profile_inner">
|
||||
{{- if .imageUrl}}<img src="{{ .imageUrl}}" alt="{{ .imageTitle | default "profile image" }}" />{{- end}}
|
||||
<h1>{{- .title | default $.Site.Title -}}</h1>
|
||||
<span>{{- .subtitle -}}</span>
|
||||
{{- partial "social_icons.html" $.Site.Params.socialIcons -}}
|
||||
|
||||
{{- with .buttons }}
|
||||
<div class="buttons">
|
||||
{{- range . -}}
|
||||
<a class="button" href="{{ .url }}" rel="noopener" title="{{ .name | humanize }}">
|
||||
<span class="button-inner">{{ .name }}</span>
|
||||
</a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end}}
|
||||
</div>
|
||||
@@ -1,46 +0,0 @@
|
||||
{{- $pageurl := .Permalink }}
|
||||
{{- $title := .Title }}
|
||||
<div class="share-buttons">
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on twitter"
|
||||
href="https://twitter.com/intent/tweet/?text={{ $title }}&url={{ $pageurl }}">
|
||||
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
|
||||
<path
|
||||
d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-253.927,424.544c135.939,0 210.268,-112.643 210.268,-210.268c0,-3.218 0,-6.437 -0.153,-9.502c14.406,-10.421 26.973,-23.448 36.935,-38.314c-13.18,5.824 -27.433,9.809 -42.452,11.648c15.326,-9.196 26.973,-23.602 32.49,-40.92c-14.252,8.429 -30.038,14.56 -46.896,17.931c-13.487,-14.406 -32.644,-23.295 -53.946,-23.295c-40.767,0 -73.87,33.104 -73.87,73.87c0,5.824 0.613,11.494 1.992,16.858c-61.456,-3.065 -115.862,-32.49 -152.337,-77.241c-6.284,10.881 -9.962,23.601 -9.962,37.088c0,25.594 13.027,48.276 32.95,61.456c-12.107,-0.307 -23.448,-3.678 -33.41,-9.196l0,0.92c0,35.862 25.441,65.594 59.311,72.49c-6.13,1.686 -12.72,2.606 -19.464,2.606c-4.751,0 -9.348,-0.46 -13.946,-1.38c9.349,29.426 36.628,50.728 68.965,51.341c-25.287,19.771 -57.164,31.571 -91.8,31.571c-5.977,0 -11.801,-0.306 -17.625,-1.073c32.337,21.15 71.264,33.41 112.95,33.41Z" />
|
||||
</svg>
|
||||
</a>
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on linkedin"
|
||||
href="https://www.linkedin.com/shareArticle?mini=true&url={{ $pageurl }}&title={{ $title }}&summary={{ $title }}&source={{ $pageurl }}">
|
||||
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
|
||||
<path
|
||||
d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-288.985,423.278l0,-225.717l-75.04,0l0,225.717l75.04,0Zm270.539,0l0,-129.439c0,-69.333 -37.018,-101.586 -86.381,-101.586c-39.804,0 -57.634,21.891 -67.617,37.266l0,-31.958l-75.021,0c0.995,21.181 0,225.717 0,225.717l75.02,0l0,-126.056c0,-6.748 0.486,-13.492 2.474,-18.315c5.414,-13.475 17.767,-27.434 38.494,-27.434c27.135,0 38.007,20.707 38.007,51.037l0,120.768l75.024,0Zm-307.552,-334.556c-25.674,0 -42.448,16.879 -42.448,39.002c0,21.658 16.264,39.002 41.455,39.002l0.484,0c26.165,0 42.452,-17.344 42.452,-39.002c-0.485,-22.092 -16.241,-38.954 -41.943,-39.002Z" />
|
||||
</svg>
|
||||
</a>
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on reddit"
|
||||
href="https://reddit.com/submit?url={{ $pageurl }}&title={{ $title }}">
|
||||
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
|
||||
<path
|
||||
d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-3.446,265.638c0,-22.964 -18.616,-41.58 -41.58,-41.58c-11.211,0 -21.361,4.457 -28.841,11.666c-28.424,-20.508 -67.586,-33.757 -111.204,-35.278l18.941,-89.121l61.884,13.157c0.756,15.734 13.642,28.29 29.56,28.29c16.407,0 29.706,-13.299 29.706,-29.701c0,-16.403 -13.299,-29.702 -29.706,-29.702c-11.666,0 -21.657,6.792 -26.515,16.578l-69.105,-14.69c-1.922,-0.418 -3.939,-0.042 -5.585,1.036c-1.658,1.073 -2.811,2.761 -3.224,4.686l-21.152,99.438c-44.258,1.228 -84.046,14.494 -112.837,35.232c-7.468,-7.164 -17.589,-11.591 -28.757,-11.591c-22.965,0 -41.585,18.616 -41.585,41.58c0,16.896 10.095,31.41 24.568,37.918c-0.639,4.135 -0.99,8.328 -0.99,12.576c0,63.977 74.469,115.836 166.33,115.836c91.861,0 166.334,-51.859 166.334,-115.836c0,-4.218 -0.347,-8.387 -0.977,-12.493c14.564,-6.47 24.735,-21.034 24.735,-38.001Zm-119.474,108.193c-20.27,20.241 -59.115,21.816 -70.534,21.816c-11.428,0 -50.277,-1.575 -70.522,-21.82c-3.007,-3.008 -3.007,-7.882 0,-10.889c3.003,-2.999 7.882,-3.003 10.885,0c12.777,12.781 40.11,17.317 59.637,17.317c19.522,0 46.86,-4.536 59.657,-17.321c3.016,-2.999 7.886,-2.995 10.885,0.008c3.008,3.011 3.003,7.882 -0.008,10.889Zm-5.23,-48.781c-16.373,0 -29.701,-13.324 -29.701,-29.698c0,-16.381 13.328,-29.714 29.701,-29.714c16.378,0 29.706,13.333 29.706,29.714c0,16.374 -13.328,29.698 -29.706,29.698Zm-160.386,-29.702c0,-16.381 13.328,-29.71 29.714,-29.71c16.369,0 29.689,13.329 29.689,29.71c0,16.373 -13.32,29.693 -29.689,29.693c-16.386,0 -29.714,-13.32 -29.714,-29.693Z" />
|
||||
</svg>
|
||||
</a>
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on facebook"
|
||||
href="https://facebook.com/sharer/sharer.php?u={{ $pageurl }}">
|
||||
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
|
||||
<path
|
||||
d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-106.468,0l0,-192.915l66.6,0l12.672,-82.621l-79.272,0l0,-53.617c0,-22.603 11.073,-44.636 46.58,-44.636l36.042,0l0,-70.34c0,0 -32.71,-5.582 -63.982,-5.582c-65.288,0 -107.96,39.569 -107.96,111.204l0,62.971l-72.573,0l0,82.621l72.573,0l0,192.915l-191.104,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Z" />
|
||||
</svg>
|
||||
</a>
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on whatsapp"
|
||||
href="https://api.whatsapp.com/send?text={{ $title }}%20-%20{{ $pageurl }}">
|
||||
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
|
||||
<path
|
||||
d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-58.673,127.703c-33.842,-33.881 -78.847,-52.548 -126.798,-52.568c-98.799,0 -179.21,80.405 -179.249,179.234c-0.013,31.593 8.241,62.428 23.927,89.612l-25.429,92.884l95.021,-24.925c26.181,14.28 55.659,21.807 85.658,21.816l0.074,0c98.789,0 179.206,-80.413 179.247,-179.243c0.018,-47.895 -18.61,-92.93 -52.451,-126.81Zm-126.797,275.782l-0.06,0c-26.734,-0.01 -52.954,-7.193 -75.828,-20.767l-5.441,-3.229l-56.386,14.792l15.05,-54.977l-3.542,-5.637c-14.913,-23.72 -22.791,-51.136 -22.779,-79.287c0.033,-82.142 66.867,-148.971 149.046,-148.971c39.793,0.014 77.199,15.531 105.329,43.692c28.128,28.16 43.609,65.592 43.594,105.4c-0.034,82.149 -66.866,148.983 -148.983,148.984Zm81.721,-111.581c-4.479,-2.242 -26.499,-13.075 -30.604,-14.571c-4.105,-1.495 -7.091,-2.241 -10.077,2.241c-2.986,4.483 -11.569,14.572 -14.182,17.562c-2.612,2.988 -5.225,3.364 -9.703,1.12c-4.479,-2.241 -18.91,-6.97 -36.017,-22.23c-13.314,-11.876 -22.304,-26.542 -24.916,-31.026c-2.612,-4.484 -0.279,-6.908 1.963,-9.14c2.016,-2.007 4.48,-5.232 6.719,-7.847c2.24,-2.615 2.986,-4.484 4.479,-7.472c1.493,-2.99 0.747,-5.604 -0.374,-7.846c-1.119,-2.241 -10.077,-24.288 -13.809,-33.256c-3.635,-8.733 -7.327,-7.55 -10.077,-7.688c-2.609,-0.13 -5.598,-0.158 -8.583,-0.158c-2.986,0 -7.839,1.121 -11.944,5.604c-4.105,4.484 -15.675,15.32 -15.675,37.364c0,22.046 16.048,43.342 18.287,46.332c2.24,2.99 31.582,48.227 76.511,67.627c10.685,4.615 19.028,7.371 25.533,9.434c10.728,3.41 20.492,2.929 28.209,1.775c8.605,-1.285 26.499,-10.833 30.231,-21.295c3.732,-10.464 3.732,-19.431 2.612,-21.298c-1.119,-1.869 -4.105,-2.99 -8.583,-5.232Z" />
|
||||
</svg>
|
||||
</a>
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on telegram"
|
||||
href="https://telegram.me/share/url?text={{ $title }}&url={{ $pageurl }}">
|
||||
<svg version="1.1" xml:space="preserve" viewBox="2 2 28 28">
|
||||
<path
|
||||
d="M26.49,29.86H5.5a3.37,3.37,0,0,1-2.47-1,3.35,3.35,0,0,1-1-2.47V5.48A3.36,3.36,0,0,1,3,3,3.37,3.37,0,0,1,5.5,2h21A3.38,3.38,0,0,1,29,3a3.36,3.36,0,0,1,1,2.46V26.37a3.35,3.35,0,0,1-1,2.47A3.38,3.38,0,0,1,26.49,29.86Zm-5.38-6.71a.79.79,0,0,0,.85-.66L24.73,9.24a.55.55,0,0,0-.18-.46.62.62,0,0,0-.41-.17q-.08,0-16.53,6.11a.59.59,0,0,0-.41.59.57.57,0,0,0,.43.52l4,1.24,1.61,4.83a.62.62,0,0,0,.63.43.56.56,0,0,0,.4-.17L16.54,20l4.09,3A.9.9,0,0,0,21.11,23.15ZM13.8,20.71l-1.21-4q8.72-5.55,8.78-5.55c.15,0,.23,0,.23.16a.18.18,0,0,1,0,.06s-2.51,2.3-7.52,6.8Z" />
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
@@ -1,6 +0,0 @@
|
||||
<div class="social-icons">
|
||||
{{- range . -}}
|
||||
<a href="{{ .url }}" target="_blank" rel="noopener noreferrer"
|
||||
title="{{ .name | humanize }}">{{ partial "svg.html" . }}</a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
@@ -1,252 +0,0 @@
|
||||
{{- if (eq .name "123rf") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path style="font-variation-settings:normal"
|
||||
d="M7.48 3.826c-.702 0-1.345.388-1.675 1.008l-.711 1.334a4.214 4.214 0 0 1-1.614 1.67l-.388.224a2.207 2.207 0 0 0-1.104 1.913v8.607c0 .878.712 1.592 1.59 1.592h1.186c.468 0 .916-.19 1.244-.524l1.478-1.504c.266-.27.628-.421 1.006-.421h7.04c.378 0 .74.151 1.005.421l1.478 1.504c.329.334.778.524 1.247.524h1.183c.879 0 1.592-.714 1.592-1.592V9.975c0-.79-.422-1.518-1.106-1.912l-.388-.225a4.214 4.214 0 0 1-1.613-1.67l-.711-1.334a1.899 1.899 0 0 0-1.676-1.008z"
|
||||
stroke-linejoin="miter" />
|
||||
<circle cx="12" cy="12.467" r="2.723" /></svg>
|
||||
{{- else if (eq .name "adobestock") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path style="font-variation-settings:normal" d="M2.235 2.235h19.53v19.53H2.235z" />
|
||||
<path style="font-variation-settings:normal"
|
||||
d="M6.165 16.659s3.16 1.2 4.602-.17c1.37-1.3.787-3.163-.754-4.05-1.68-.969-3.284-1.788-3.036-3.536.446-3.138 4.386-1.851 4.386-1.851M15.792 7.794v7.774c0 1.023.635 1.766 2.043 1.624M17.826 10.04h-3.582" />
|
||||
</svg>
|
||||
{{- else if (eq .name "behance") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path paint-order="stroke fill markers" stroke-linejoin="miter" stroke-width="2"
|
||||
style="font-variation-settings:normal"
|
||||
d="M1.774 18.063V5.466h5.51c1.978 0 3.116 1.326 3.055 2.806-.043 1.049-.711 2.988-2.643 2.988h-5.93H7.73c1.224 0 3.532 1.13 3.532 3.532 0 2.4-1.873 3.27-3.318 3.27zm12.57-4.459h7.89s.012-4.18-4.167-4.18c-5.237 0-5.277 9.11-.3 9.11 3.06 0 3.935-1.806 3.935-1.806M15.526 5.823h4.987" />
|
||||
</svg>
|
||||
{{- else if (eq .name "codepen") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon>
|
||||
<line x1="12" y1="22" x2="12" y2="15.5"></line>
|
||||
<polyline points="22 8.5 12 15.5 2 8.5"></polyline>
|
||||
<polyline points="2 15.5 12 8.5 22 15.5"></polyline>
|
||||
<line x1="12" y1="2" x2="12" y2="8.5"></line>
|
||||
</svg>
|
||||
{{- else if (eq .name "cryptohack") -}}
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 57 57" preserveAspectRatio="xMidYMid meet">
|
||||
<g transform="translate(0.000000,57.000000) scale(0.100000,-0.100000)" fill="currentColor" stroke-width="12"
|
||||
stroke="currentColor">
|
||||
<path
|
||||
d="M180 495 c-7 -8 -22 -15 -35 -15 -23 0 -55 -28 -55 -48 0 -6 -12 -23 -26 -37 -18 -18 -24 -33 -21 -48 3 -12 -1 -31 -9 -41 -18 -26 -18 -70 1 -86 8 -7 15 -21 15 -31 0 -36 23 -68 59 -83 21 -8 43 -21 50 -30 19 -23 74 -20 97 5 17 19 19 41 22 204 3 174 2 185 -17 204 -25 25 -63 27 -81 6z m54 -11 c14 -5 16 -32 16 -193 0 -196 -3 -211 -45 -211 -39 0 -47 20 -20 52 14 16 25 40 25 52 0 34 -37 76 -66 76 -31 0 -31 -18 0 -26 30 -7 50 -48 36 -73 -28 -54 -118 -28 -103 29 3 10 -4 27 -16 39 -26 26 -27 46 -2 68 14 12 18 24 14 48 -7 41 12 53 40 27 12 -11 32 -23 44 -26 12 -4 31 -18 42 -32 33 -41 55 -29 25 14 -15 21 -15 25 1 42 22 25 0 38 -25 15 -26 -24 -68 -12 -81 21 -12 32 3 54 36 54 12 0 28 7 35 15 14 17 21 18 44 9z" />
|
||||
<path
|
||||
d="M309 489 c-19 -19 -20 -30 -17 -204 3 -163 5 -185 22 -204 23 -25 78 -28 97 -5 7 9 29 22 50 30 36 15 59 47 59 83 0 10 7 24 15 31 19 16 19 60 1 86 -8 10 -12 29 -9 41 3 15 -3 30 -19 46 -12 13 -30 37 -38 53 -10 19 -25 30 -42 32 -15 2 -32 10 -38 18 -18 20 -57 17 -81 -7z m71 -14 c7 -8 23 -15 35 -15 34 0 48 -22 34 -54 -10 -20 -19 -26 -46 -26 -34 0 -44 -13 -17 -24 28 -11 47 -7 70 15 30 28 48 16 41 -28 -4 -24 -2 -36 8 -39 20 -8 28 -40 15 -64 -11 -20 -63 -28 -86 -12 -17 11 -36 51 -29 62 3 5 1 11 -5 15 -16 10 -24 -25 -12 -57 9 -24 8 -30 -8 -38 -21 -11 -33 -37 -24 -52 4 -6 16 2 28 17 20 25 26 27 64 20 23 -4 44 -10 47 -14 9 -15 -26 -51 -49 -51 -14 0 -30 -10 -40 -25 -18 -27 -54 -33 -74 -13 -17 17 -17 384 1 391 22 9 34 7 47 -8z" />
|
||||
</g>
|
||||
</svg>
|
||||
{{- else if (eq .name "dev") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
||||
<path
|
||||
d="M7.42 10.05c-.18-.16-.46-.23-.84-.23H6l.02 2.44.04 2.45.56-.02c.41 0 .63-.07.83-.26.24-.24.26-.36.26-2.2 0-1.91-.02-1.96-.29-2.18zM0 4.94v14.12h24V4.94H0zM8.56 15.3c-.44.58-1.06.77-2.53.77H4.71V8.53h1.4c1.67 0 2.16.18 2.6.9.27.43.29.6.32 2.57.05 2.23-.02 2.73-.47 3.3zm5.09-5.47h-2.47v1.77h1.52v1.28l-.72.04-.75.03v1.77l1.22.03 1.2.04v1.28h-1.6c-1.53 0-1.6-.01-1.87-.3l-.3-.28v-3.16c0-3.02.01-3.18.25-3.48.23-.31.25-.31 1.88-.31h1.64v1.3zm4.68 5.45c-.17.43-.64.79-1 .79-.18 0-.45-.15-.67-.39-.32-.32-.45-.63-.82-2.08l-.9-3.39-.45-1.67h.76c.4 0 .75.02.75.05 0 .06 1.16 4.54 1.26 4.83.04.15.32-.7.73-2.3l.66-2.52.74-.04c.4-.02.73 0 .73.04 0 .14-1.67 6.38-1.8 6.68z" />
|
||||
</svg>
|
||||
{{- else if (eq .name "discogs") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
||||
<path
|
||||
d="M1.7422 11.982c0-5.6682 4.61-10.2782 10.2758-10.2782 1.8238 0 3.5372.48 5.0251 1.3175l.8135-1.4879C16.1768.588 14.2474.036 12.1908.0024h-.1944C5.4091.0144.072 5.3107 0 11.886v.1152c.0072 3.4389 1.4567 6.5345 3.7748 8.7207l1.1855-1.2814c-1.9798-1.8743-3.218-4.526-3.218-7.4585zM20.362 3.4053l-1.1543 1.2406c1.903 1.867 3.0885 4.4636 3.0885 7.3361 0 5.6658-4.61 10.2758-10.2758 10.2758-1.783 0-3.4605-.456-4.922-1.2575l-.8542 1.5214c1.7086.9384 3.6692 1.4735 5.7546 1.4759C18.6245 23.9976 24 18.6246 24 11.9988c-.0048-3.3717-1.399-6.4146-3.638-8.5935zM1.963 11.982c0 2.8701 1.2119 5.4619 3.146 7.2953l1.1808-1.2767c-1.591-1.5166-2.587-3.6524-2.587-6.0186 0-4.586 3.7293-8.3152 8.3152-8.3152 1.483 0 2.875.3912 4.082 1.0751l.8351-1.5262C15.481 2.395 13.8034 1.927 12.018 1.927 6.4746 1.9246 1.963 6.4362 1.963 11.982zm18.3702 0c0 4.586-3.7293 8.3152-8.3152 8.3152-1.4327 0-2.7837-.3648-3.962-1.0055l-.852 1.5166c1.4303.7823 3.0718 1.2287 4.814 1.2287 5.5434 0 10.055-4.5116 10.055-10.055 0-2.8077-1.1567-5.3467-3.0165-7.1729l-1.183 1.2743c1.519 1.507 2.4597 3.5924 2.4597 5.8986zm-1.9486 0c0 3.5109-2.8558 6.3642-6.3642 6.3642a6.3286 6.3286 0 01-3.0069-.756l-.8471 1.507c1.147.624 2.4597.9768 3.854.9768 4.4636 0 8.0944-3.6308 8.0944-8.0944 0-2.239-.9143-4.2692-2.3902-5.7378l-1.1783 1.267c1.1351 1.152 1.8383 2.731 1.8383 4.4732zm-14.4586 0c0 2.3014.9671 4.382 2.515 5.8578l1.1734-1.2695c-1.207-1.159-1.9606-2.786-1.9606-4.5883 0-3.5108 2.8557-6.3642 6.3642-6.3642 1.1423 0 2.215.3048 3.1437.8352l.8303-1.5167c-1.1759-.6647-2.5317-1.0487-3.974-1.0487-4.4612 0-8.092 3.6308-8.092 8.0944zm12.5292 0c0 2.4502-1.987 4.4372-4.4372 4.4372a4.4192 4.4192 0 01-2.0614-.5088l-.8351 1.4879a6.1135 6.1135 0 002.8965.727c3.3885 0 6.1434-2.7548 6.1434-6.1433 0-1.6774-.6767-3.1989-1.7686-4.3076l-1.1615 1.2503c.7559.7967 1.2239 1.8718 1.2239 3.0573zm-10.5806 0c0 1.7374.7247 3.3069 1.8886 4.4252L8.92 15.1569l.0144.0144c-.8351-.8063-1.3559-1.9366-1.3559-3.1869 0-2.4502 1.9846-4.4372 4.4372-4.4372.8087 0 1.5646.2184 2.2174.5976l.8207-1.4975a6.097 6.097 0 00-3.0381-.8063c-3.3837-.0048-6.141 2.7525-6.141 6.141zm6.681 0c0 .2952-.2424.5351-.5376.5351-.2952 0-.5375-.24-.5375-.5351 0-.2976.24-.5375.5375-.5375.2952 0 .5375.24.5375.5375zm-3.9405 0c0-1.879 1.5239-3.4029 3.4005-3.4029 1.879 0 3.4005 1.5215 3.4005 3.4029 0 1.879-1.5239 3.4005-3.4005 3.4005S8.6151 13.861 8.6151 11.982zm.1488 0c.0048 1.7974 1.4567 3.2493 3.2517 3.2517 1.795 0 3.254-1.4567 3.254-3.2517-.0023-1.7974-1.4566-3.2517-3.254-3.254-1.795 0-3.2517 1.4566-3.2517 3.254Z" />
|
||||
</svg>
|
||||
{{- else if (eq .name "dreamstime") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path
|
||||
d="M19.834 20.994s4.824-4.08 2.044-12.03C19.252 1.456 6.822-1.223 2.508 7.566c-3.936 8.023 2.18 14.46 7.88 14.374 4.889-.075 8.475-3.226 7.813-8.604-.76-6.18-6.73-6.816-9.275-4.184-2.256 2.334-1.816 7.034.873 7.823 2.241.844 4.661-1.265 3.161-3.215"
|
||||
style="font-variation-settings:normal" stroke="currentColor" stroke-linejoin="bevel"
|
||||
paint-order="stroke fill markers" /></svg>
|
||||
{{- else if (eq .name "dribbble") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle style="font-variation-settings:normal" cx="12.004" cy="12" r="9.39" paint-order="stroke fill markers" />
|
||||
<path style="font-variation-settings:normal"
|
||||
d="M5.858 19.136s2.343-5.79 8.161-6.422c5.818-.633 7.442.479 7.442.479M2.68 10.839s4.91.752 10.112-1.11c5.202-1.863 5.887-4.601 5.887-4.601" />
|
||||
<path style="font-variation-settings:normal"
|
||||
d="M8.533 3.208s2.888 2.73 5.339 9.235c2.451 6.505 2.344 8.4 2.344 8.4" /></svg>
|
||||
{{- else if (eq .name "email") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
|
||||
<polyline points="22,6 12,13 2,6"></polyline>
|
||||
</svg>
|
||||
{{- else if (eq .name "facebook") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path>
|
||||
</svg>
|
||||
{{- else if (eq .name "freepik") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path
|
||||
d="M5.737 17.28s3.423.84 7.61.162c4.188-.676 6.862-2.57 6.862-2.57s.28 3.943-4.967 5.33c-5.248 1.388-8.543.657-9.506-2.923zm-.62-3.104s4.491 1.361 8.728.344c4.237-1.016 5.94-2.568 5.94-2.568s-1.81-6.448-7.405-5.648c-5.597.8-8.061 4.414-7.263 7.872z"
|
||||
style="font-variation-settings:normal" stroke-linejoin="round" />
|
||||
<path
|
||||
d="M1.265 12.607c.159-1.98.561-3.898 2.08-5.701m5.148-3.29c2.006-.66 3.968-1.157 6.446-.844m5.202 2.98c1.192 1.275 1.963 2.163 2.594 3.815"
|
||||
style="font-variation-settings:normal" stroke="currentColor" stroke-linejoin="round" />
|
||||
<circle r=".989" cy="10.404" cx="14.746" fill="currentColor" stroke="none" />
|
||||
<circle cx="9.637" cy="11.305" r="1.477" fill="currentColor" stroke="none" /></svg>
|
||||
{{- else if (eq .name "github") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path
|
||||
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22">
|
||||
</path>
|
||||
</svg>
|
||||
{{- else if (eq .name "gitlab") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path
|
||||
d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z">
|
||||
</path>
|
||||
</svg>
|
||||
{{- else if (eq .name "hackerrank") -}}
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
preserveAspectRatio="xMidYMid meet" viewBox="0 0 50 35" fill="currentColor" stroke-width="0" stroke="currentColor">
|
||||
<g>
|
||||
<path
|
||||
d="M0 32.95L3.86 32.95L7.73 32.95L7.73 27.23L7.73 21.52L11.59 21.52L15.45 21.52L15.45 27.23L15.45 32.95L19.31 32.95L23.18 32.95L23.18 17.5L23.18 2.05L19.31 2.05L15.45 2.05L15.45 7.77L15.45 13.48L11.59 13.48L7.73 13.48L7.73 7.77L7.73 2.05L3.86 2.05L0 2.05L0 17.5L0 32.95Z"
|
||||
id="i2pS2ila1d"></path>
|
||||
<path
|
||||
d="M27.19 32.95L38.63 32.95L50.06 32.95L50.06 17.5L50.06 2.05L38.63 2.05L27.19 2.05L27.19 17.5L27.19 32.95Z"
|
||||
id="dgDKP06E5"></path>
|
||||
</g>
|
||||
</svg>
|
||||
{{- else if (eq .name "hackthebox") -}}
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
preserveAspectRatio="xMidYMid meet" viewBox="0 0 64 64" fill="currentColor" stroke="currentColor">
|
||||
<g>
|
||||
<path
|
||||
d="M4.63 15.53L4.63 31.85L4.63 48.27L18.36 56.14L32 64L45.74 56.14L59.37 48.17L59.37 31.95L59.37 15.63C51.31 10.97 46.83 8.38 45.93 7.86C38.57 3.58 32.3 0 32 0C31.7 0 25.43 3.48 18.07 7.76C16.27 8.8 11.79 11.39 4.63 15.53ZM49.62 17.32C49.12 18.71 33.79 27.77 32 27.77C30.21 27.77 14.88 18.71 14.38 17.32C14.18 16.62 30.01 6.27 31.8 5.97C31.9 5.97 36.08 8.36 40.96 11.15C45.93 14.03 49.82 16.82 49.62 17.32ZM29.01 33.84C29.01 40.11 29.01 43.6 29.01 44.29C29.01 51.36 28.62 54.74 27.92 54.74C27.32 54.74 23.04 52.65 18.46 50.07C17.91 49.75 15.12 48.15 10.1 45.29L10.1 34.04L10.1 22.79C13.57 24.7 15.49 25.77 15.88 25.98C18.96 27.77 23.24 30.26 25.33 31.55C25.82 31.86 27.05 32.62 29.01 33.84ZM36.08 54.74C35.28 54.74 34.99 51.66 35.19 44.09C35.2 43.38 35.3 39.83 35.48 33.44L44.44 28.17L53.4 22.99C53.7 29.08 53.86 32.47 53.9 33.14C54.2 38.72 54.3 43.7 54.1 44.29C53.8 45.49 37.77 54.74 36.08 54.74Z">
|
||||
</path>
|
||||
</g>
|
||||
</svg>
|
||||
{{- else if (eq .name "instagram") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect>
|
||||
<path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path>
|
||||
<line x1="17.5" y1="6.5" x2="17.5" y2="6.5"></line>
|
||||
</svg>
|
||||
{{- else if (eq .name "lastfm") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
||||
<path
|
||||
d="M10.599 17.211l-.881-2.393s-1.433 1.596-3.579 1.596c-1.9 0-3.249-1.652-3.249-4.296 0-3.385 1.708-4.596 3.388-4.596 2.418 0 3.184 1.568 3.845 3.578l.871 2.751c.871 2.672 2.523 4.818 7.285 4.818 3.41 0 5.722-1.045 5.722-3.801 0-2.227-1.276-3.383-3.635-3.935l-1.757-.384c-1.217-.274-1.577-.771-1.577-1.597 0-.936.736-1.487 1.952-1.487 1.323 0 2.028.495 2.147 1.679l2.749-.33c-.225-2.479-1.937-3.494-4.745-3.494-2.479 0-4.897.936-4.897 3.934 0 1.873.902 3.058 3.185 3.605l1.862.443c1.397.33 1.863.916 1.863 1.713 0 1.021-.992 1.441-2.869 1.441-2.779 0-3.936-1.457-4.597-3.469l-.901-2.75c-1.156-3.574-3.004-4.896-6.669-4.896C2.147 5.327 0 7.879 0 12.235c0 4.179 2.147 6.445 6.003 6.445 3.108 0 4.596-1.457 4.596-1.457v-.012z" />
|
||||
</svg>
|
||||
{{- else if (eq .name "linkedin") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path>
|
||||
<rect x="2" y="9" width="4" height="12"></rect>
|
||||
<circle cx="4" cy="4" r="2"></circle>
|
||||
</svg>
|
||||
{{- else if (eq .name "mixcloud") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke-width="2">
|
||||
<path
|
||||
d="M21.95 19.062c-.154 0-.31-.045-.445-.135-.369-.25-.465-.75-.225-1.11.738-1.094 1.125-2.381 1.125-3.719s-.387-2.625-1.125-3.721c-.249-.368-.145-.866.216-1.106.375-.249.87-.146 1.108.214.917 1.365 1.396 2.97 1.396 4.62 0 1.648-.479 3.254-1.396 4.619-.135.239-.39.359-.645.359l-.009-.021zM19.66 17.768c-.153 0-.308-.045-.445-.139-.369-.239-.463-.734-.215-1.094.489-.721.747-1.545.747-2.43 0-.855-.258-1.695-.747-2.431-.248-.36-.154-.854.215-1.095s.857-.15 1.106.225c.669.99 1.021 2.145 1.021 3.314 0 1.201-.352 2.34-1.021 3.315-.146.24-.406.36-.661.36v-.025zm-3.73-7.153c-.314-3.197-3.016-5.699-6.3-5.699-2.721 0-5.13 1.748-5.995 4.283C1.588 9.501 0 11.269 0 13.4c0 2.344 1.912 4.254 4.26 4.254h10.908c1.964 0 3.566-1.594 3.566-3.557 0-1.706-1.2-3.129-2.805-3.48v-.002zm-.762 5.446H4.263c-1.466 0-2.669-1.191-2.669-2.658 0-1.465 1.193-2.658 2.669-2.658.71 0 1.381.285 1.886.781.3.314.811.314 1.125 0 .3-.301.3-.811 0-1.125-.555-.542-1.231-.931-1.965-1.111.75-1.665 2.43-2.774 4.305-2.774 2.609 0 4.74 2.129 4.74 4.738 0 .512-.075 1.006-.24 1.486-.135.42.09.869.51 1.02.074.03.165.045.24.045.33 0 .645-.211.75-.54.105-.315.18-.63.225-.96.734.285 1.26 1.005 1.26 1.83 0 1.096-.885 1.979-1.965 1.979l.034-.053z" />
|
||||
</svg>
|
||||
{{- else if (eq .name "paypal") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path
|
||||
d="M7.144 19.532l1.049-5.751c.11-.606.691-1.002 1.304-.948 2.155.192 6.877.1 8.818-4.002 2.554-5.397-.59-7.769-6.295-7.769H7.43a1.97 1.97 0 0 0-1.944 1.655L2.77 19.507a.857.857 0 0 0 .846.994h2.368a1.18 1.18 0 0 0 1.161-.969zM7.967 22.522a.74.74 0 0 0 .666.416h2.313c.492 0 .923-.351 1.003-.837l.759-4.601c.095-.523.597-.866 1.127-.819 1.86.166 5.567-.118 6.85-3.821.554-1.6.705-2.954.408-4.018"
|
||||
style="font-variation-settings:normal" stroke="currentColor" stroke-linejoin="miter" /></svg>
|
||||
{{- else if (eq .name "qq") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path transform="scale(0.04) translate(75 40)" stroke-width="50"
|
||||
d="M433.754 420.445c-11.526 1.393-44.86-52.741-44.86-52.741 0 31.345-16.136 72.247-51.051 101.786 16.842 5.192 54.843 19.167 45.803 34.421-7.316 12.343-125.51 7.881-159.632 4.037-34.122 3.844-152.316 8.306-159.632-4.037-9.045-15.25 28.918-29.214 45.783-34.415-34.92-29.539-51.059-70.445-51.059-101.792 0 0-33.334 54.134-44.859 52.741-5.37-.65-12.424-29.644 9.347-99.704 10.261-33.024 21.995-60.478 40.144-105.779C60.683 98.063 108.982.006 224 0c113.737.006 163.156 96.133 160.264 214.963 18.118 45.223 29.912 72.85 40.144 105.778 21.768 70.06 14.716 99.053 9.346 99.704z">
|
||||
</path>
|
||||
</svg>
|
||||
{{- else if (eq .name "rss") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 11a9 9 0 0 1 9 9" />
|
||||
<path d="M4 4a16 16 0 0 1 16 16" />
|
||||
<circle cx="5" cy="19" r="1" />
|
||||
</svg>
|
||||
{{- else if (eq .name "soundcloud") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
||||
<path
|
||||
d="M1.175 12.225c-.051 0-.094.046-.101.1l-.233 2.154.233 2.105c.007.058.05.098.101.098.05 0 .09-.04.099-.098l.255-2.105-.27-2.154c0-.057-.045-.1-.09-.1m-.899.828c-.06 0-.091.037-.104.094L0 14.479l.165 1.308c0 .055.045.094.09.094s.089-.045.104-.104l.21-1.319-.21-1.334c0-.061-.044-.09-.09-.09m1.83-1.229c-.061 0-.12.045-.12.104l-.21 2.563.225 2.458c0 .06.045.12.119.12.061 0 .105-.061.121-.12l.254-2.474-.254-2.548c-.016-.06-.061-.12-.121-.12m.945-.089c-.075 0-.135.06-.15.135l-.193 2.64.21 2.544c.016.077.075.138.149.138.075 0 .135-.061.15-.15l.24-2.532-.24-2.623c0-.075-.06-.135-.135-.135l-.031-.017zm1.155.36c-.005-.09-.075-.149-.159-.149-.09 0-.158.06-.164.149l-.217 2.43.2 2.563c0 .09.075.157.159.157.074 0 .148-.068.148-.158l.227-2.563-.227-2.444.033.015zm.809-1.709c-.101 0-.18.09-.18.181l-.21 3.957.187 2.563c0 .09.08.164.18.164.094 0 .174-.09.18-.18l.209-2.563-.209-3.972c-.008-.104-.088-.18-.18-.18m.959-.914c-.105 0-.195.09-.203.194l-.18 4.872.165 2.548c0 .12.09.209.195.209.104 0 .194-.089.21-.209l.193-2.548-.192-4.856c-.016-.12-.105-.21-.21-.21m.989-.449c-.121 0-.211.089-.225.209l-.165 5.275.165 2.52c.014.119.104.225.225.225.119 0 .225-.105.225-.225l.195-2.52-.196-5.275c0-.12-.105-.225-.225-.225m1.245.045c0-.135-.105-.24-.24-.24-.119 0-.24.105-.24.24l-.149 5.441.149 2.503c.016.135.121.24.256.24s.24-.105.24-.24l.164-2.503-.164-5.456-.016.015zm.749-.134c-.135 0-.255.119-.255.254l-.15 5.322.15 2.473c0 .15.12.255.255.255s.255-.12.255-.27l.15-2.474-.165-5.307c0-.148-.12-.27-.271-.27m1.005.166c-.164 0-.284.135-.284.285l-.103 5.143.135 2.474c0 .149.119.277.284.277.149 0 .271-.12.284-.285l.121-2.443-.135-5.112c-.012-.164-.135-.285-.285-.285m1.184-.945c-.045-.029-.105-.044-.165-.044s-.119.015-.165.044c-.09.054-.149.15-.149.255v.061l-.104 6.048.115 2.449v.008c.008.06.03.135.074.18.058.061.142.104.234.104.08 0 .158-.044.209-.09.058-.06.091-.135.091-.225l.015-.24.117-2.203-.135-6.086c0-.104-.061-.193-.135-.239l-.002-.022zm1.006-.547c-.045-.045-.09-.061-.15-.061-.074 0-.149.016-.209.061-.075.061-.119.15-.119.24v.029l-.137 6.609.076 1.215.061 1.185c0 .164.148.314.328.314.181 0 .33-.15.33-.329l.15-2.414-.15-6.637c0-.12-.074-.221-.165-.277m8.934 3.777c-.405 0-.795.086-1.139.232-.24-2.654-2.46-4.736-5.188-4.736-.659 0-1.305.135-1.889.359-.225.09-.27.18-.285.359v9.368c.016.18.15.33.33.345h8.185C22.681 17.218 24 15.914 24 14.28s-1.319-2.952-2.938-2.952" />
|
||||
</svg>
|
||||
{{- else if (eq .name "shutterstock") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect ry="5" rx="5" height="20" width="20" y="2" x="2" />
|
||||
<path d="M7.728 11.725V9.032c0-1.025.824-1.85 1.849-1.85h2.815m3.88 5.093v2.693a1.845 1.845 0 0 1-1.849 1.85h-2.815"
|
||||
stroke-linecap="square" stroke-linejoin="miter" /></svg>
|
||||
{{- else if (eq .name "slack") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M22.08 9C19.81 1.41 16.54-.35 9 1.92S-.35 7.46 1.92 15 7.46 24.35 15 22.08 24.35 16.54 22.08 9z"></path>
|
||||
<line x1="12.57" y1="5.99" x2="16.15" y2="16.39"></line>
|
||||
<line x1="7.85" y1="7.61" x2="11.43" y2="18.01"></line>
|
||||
<line x1="16.39" y1="7.85" x2="5.99" y2="11.43"></line>
|
||||
<line x1="18.01" y1="12.57" x2="7.61" y2="16.15"></line>
|
||||
</svg>
|
||||
{{- else if (eq .name "sourcerer") -}}
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300.000000 360.000000"
|
||||
preserveAspectRatio="xMidYMid meet" fill="currentColor" stroke="currentColor">
|
||||
<g transform="translate(0.000000,360.000000) scale(0.100000,-0.100000)">
|
||||
<path
|
||||
d="M1120 3584 c-207 -30 -409 -98 -562 -191 -386 -232 -562 -581 -493 -974 42 -240 129 -385 320 -534 95 -74 165 -111 306 -160 179 -62 279 -82 781 -155 535 -77 624 -97 735 -169 33 -21 64 -44 67 -50 5 -8 116 -11 368 -11 l361 0 -5 43 c-14 120 -132 310 -255 409 -216 174 -438 246 -998 323 -589 81 -723 109 -861 184 -159 86 -218 265 -140 425 35 72 126 155 218 200 262 128 737 121 999 -15 190 -99 296 -250 314 -449 4 -41 12 -81 18 -87 11 -15 603 -19 626 -4 22 14 8 222 -23 343 -91 356 -368 646 -741 778 -123 43 -268 77 -403 95 -142 19 -499 18 -632 -1z" />
|
||||
<path
|
||||
d="M163 1279 c-45 -13 -63 -44 -63 -106 l0 -53 -50 0 -50 0 0 -40 0 -40 50 0 50 0 0 -185 0 -185 45 0 45 0 0 185 0 185 75 0 75 0 0 -185 0 -185 45 0 45 0 0 225 0 225 -121 0 -120 0 3 38 c3 37 3 37 51 40 l47 3 0 45 0 44 -47 -1 c-27 0 -62 -5 -80 -10z" />
|
||||
<path
|
||||
d="M2639 1279 c-96 -15 -184 -82 -224 -173 -34 -75 -39 -125 -21 -196 44 -170 202 -268 365 -226 143 37 234 152 234 296 0 185 -169 328 -354 299z" />
|
||||
<path
|
||||
d="M466 595 c-36 -33 -46 -65 -46 -145 0 -80 10 -112 46 -145 38 -36 120 -36 158 0 36 33 46 65 46 146 0 122 -35 169 -126 169 -40 0 -57 -5 -78 -25z m122 -75 c17 -34 11 -135 -10 -157 -23 -23 -66 -9 -79 25 -14 34 -7 126 11 147 19 23 62 15 78 -15z" />
|
||||
<path
|
||||
d="M677 315 c-103 -168 -187 -307 -187 -310 0 -3 20 -5 44 -5 l44 0 158 257 c87 142 170 277 186 300 15 23 28 46 28 52 0 6 -19 11 -43 11 l-44 0 -186 -305z" />
|
||||
<path
|
||||
d="M1392 605 c-137 -38 -227 -156 -227 -295 1 -82 16 -127 66 -190 159 -201 470 -131 535 119 18 72 13 122 -20 196 -33 73 -69 111 -139 144 -77 37 -145 45 -215 26z m196 -112 c59 -36 102 -114 102 -183 0 -70 -43 -147 -103 -184 -68 -42 -138 -46 -210 -13 -115 53 -159 179 -101 295 58 116 200 155 312 85z" />
|
||||
<path
|
||||
d="M1922 608 c-9 -9 -12 -90 -12 -305 l0 -293 23 -5 c12 -3 150 -4 307 -3 l285 3 3 299 c2 233 -1 301 -10 308 -22 13 -582 10 -596 -4z" />
|
||||
<path
|
||||
d="M826 319 c-42 -33 -56 -71 -56 -149 0 -121 36 -170 125 -170 90 0 128 49 129 165 0 118 -43 175 -132 175 -25 0 -49 -8 -66 -21z m99 -63 c27 -19 34 -126 11 -161 -18 -27 -56 -34 -74 -12 -28 34 -26 142 4 172 19 19 35 19 59 1z" />
|
||||
</g>
|
||||
</svg>
|
||||
{{- else if (eq .name "stackoverflow") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path
|
||||
d="M2.913 16.041v6.848h17.599v-6.848M7.16 18.696h8.925M7.65 13.937l8.675 1.8M9.214 9.124l8.058 3.758M12.086 4.65l6.849 5.66M15.774 1.111l5.313 7.162" />
|
||||
</svg>
|
||||
{{- else if (eq .name "steam") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
||||
<path
|
||||
d="M11.979 0C5.678 0 .511 4.86.022 11.037l6.432 2.658c.545-.371 1.203-.59 1.912-.59.063 0 .125.004.188.006l2.861-4.142V8.91c0-2.495 2.028-4.524 4.524-4.524 2.494 0 4.524 2.031 4.524 4.527s-2.03 4.525-4.524 4.525h-.105l-4.076 2.911c0 .052.004.105.004.159 0 1.875-1.515 3.396-3.39 3.396-1.635 0-3.016-1.173-3.331-2.727L.436 15.27C1.862 20.307 6.486 24 11.979 24c6.627 0 11.999-5.373 11.999-12S18.605 0 11.979 0zM7.54 18.21l-1.473-.61c.262.543.714.999 1.314 1.25 1.297.539 2.793-.076 3.332-1.375.263-.63.264-1.319.005-1.949s-.75-1.121-1.377-1.383c-.624-.26-1.29-.249-1.878-.03l1.523.63c.956.4 1.409 1.5 1.009 2.455-.397.957-1.497 1.41-2.454 1.012H7.54zm11.415-9.303c0-1.662-1.353-3.015-3.015-3.015-1.665 0-3.015 1.353-3.015 3.015 0 1.665 1.35 3.015 3.015 3.015 1.663 0 3.015-1.35 3.015-3.015zm-5.273-.005c0-1.252 1.013-2.266 2.265-2.266 1.249 0 2.266 1.014 2.266 2.266 0 1.251-1.017 2.265-2.266 2.265-1.253 0-2.265-1.014-2.265-2.265z" />
|
||||
</svg>
|
||||
{{- else if (eq .name "telegram") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path
|
||||
d="M21.198 2.433a2.242 2.242 0 0 0-1.022.215l-8.609 3.33c-2.068.8-4.133 1.598-5.724 2.21a405.15 405.15 0 0 1-2.849 1.09c-.42.147-.99.332-1.473.901-.728.968.193 1.798.919 2.286 1.61.516 3.275 1.009 4.654 1.472.509 1.793.997 3.592 1.48 5.388.16.36.506.494.864.498l-.002.018s.281.028.555-.038a2.1 2.1 0 0 0 .933-.517c.345-.324 1.28-1.244 1.811-1.764l3.999 2.952.032.018s.442.311 1.09.355c.324.022.75-.04 1.116-.308.37-.27.613-.702.728-1.196.342-1.492 2.61-12.285 2.997-14.072l-.01.042c.27-1.006.17-1.928-.455-2.474a1.654 1.654 0 0 0-1.034-.407z" />
|
||||
</svg>
|
||||
{{- else if (eq .name "twitch") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path>
|
||||
</svg>
|
||||
{{- else if (eq .name "twitter") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path
|
||||
d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z">
|
||||
</path>
|
||||
</svg>
|
||||
{{- else if (eq .name "youtube") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path
|
||||
d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z">
|
||||
</path>
|
||||
<polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon>
|
||||
</svg>
|
||||
{{- else if .name -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
||||
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
{{- end -}}
|
||||
@@ -1,84 +0,0 @@
|
||||
{{- $headers := findRE "<h[1-6].*?>(.|\n])+?</h[1-6]>" .Content -}}
|
||||
{{- $has_headers := ge (len $headers) 1 -}}
|
||||
{{- if $has_headers -}}
|
||||
|
||||
{{- $largest := 6 -}}
|
||||
{{- range $headers -}}
|
||||
{{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
|
||||
{{- $headerLevel := len (seq $headerLevel) -}}
|
||||
{{- if lt $headerLevel $largest -}}
|
||||
{{- $largest = $headerLevel -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}}
|
||||
|
||||
{{- $.Scratch.Set "bareul" slice -}}
|
||||
<ul>
|
||||
{{- range seq (sub $firstHeaderLevel $largest) -}}
|
||||
<ul>
|
||||
{{- $.Scratch.Add "bareul" (sub (add $largest .) 1) -}}
|
||||
{{- end -}}
|
||||
{{- range $i, $header := $headers -}}
|
||||
{{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
|
||||
{{- $headerLevel := len (seq $headerLevel) -}}
|
||||
|
||||
{{/* get id="xyz" */}}
|
||||
{{- $id := index (findRE "(id=\"(.*?)\")" $header 9) 0 }}
|
||||
|
||||
{{- /* strip id="" to leave xyz, no way to get regex capturing groups in hugo */ -}}
|
||||
{{- $cleanedID := replace (replace $id "id=\"" "") "\"" "" }}
|
||||
{{- $header := replaceRE "<h[1-6].*?>((.|\n])+?)</h[1-6]>" "$1" $header -}}
|
||||
|
||||
{{- if ne $i 0 -}}
|
||||
{{- $prevHeaderLevel := index (findRE "[1-6]" (index $headers (sub $i 1)) 1) 0 -}}
|
||||
{{- $prevHeaderLevel := len (seq $prevHeaderLevel) -}}
|
||||
{{- if gt $headerLevel $prevHeaderLevel -}}
|
||||
{{- range seq $prevHeaderLevel (sub $headerLevel 1) -}}
|
||||
<ul>
|
||||
{{/* the first should not be recorded */}}
|
||||
{{- if ne $prevHeaderLevel . -}}
|
||||
{{- $.Scratch.Add "bareul" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
</li>
|
||||
{{- if lt $headerLevel $prevHeaderLevel -}}
|
||||
{{- range seq (sub $prevHeaderLevel 1) -1 $headerLevel -}}
|
||||
{{- if in ($.Scratch.Get "bareul") . -}}
|
||||
</ul>
|
||||
{{/* manually do pop item */}}
|
||||
{{- $tmp := $.Scratch.Get "bareul" -}}
|
||||
{{- $.Scratch.Delete "bareul" -}}
|
||||
{{- $.Scratch.Set "bareul" slice}}
|
||||
{{- range seq (sub (len $tmp) 1) -}}
|
||||
{{- $.Scratch.Add "bareul" (index $tmp (sub . 1)) -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
</ul>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<li>
|
||||
<a href="#{{- $cleanedID -}}">{{- $header | safeHTML -}}</a>
|
||||
{{- else -}}
|
||||
<li>
|
||||
<a href="#{{- $cleanedID -}}">{{- $header | safeHTML -}}</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<!-- {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}} -->
|
||||
{{- $firstHeaderLevel := $largest }}
|
||||
{{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) -}}
|
||||
</li>
|
||||
{{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}}
|
||||
{{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) -}}
|
||||
</ul>
|
||||
{{- else -}}
|
||||
</ul>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
@@ -1,72 +0,0 @@
|
||||
|
||||
<!-- Author: Parsia Hakimian https://github.com/parsiya/Hugo-Shortcodes -->
|
||||
<!-- port of Octopress blockquote plugin http://octopress.org/docs/plugins/blockquote/ to Hugo
|
||||
see readme for usage -->
|
||||
|
||||
<!-- reset scratch variables at the start -->
|
||||
{{ $.Scratch.Set "bl_author" false }}
|
||||
{{ $.Scratch.Set "bl_source" false }}
|
||||
{{ $.Scratch.Set "bl_link" false }}
|
||||
{{ $.Scratch.Set "bl_title" false }}
|
||||
|
||||
{{ if .IsNamedParams }}
|
||||
{{ $.Scratch.Set "bl_author" (.Get "author") }}
|
||||
{{ $.Scratch.Set "bl_source" (.Get "source") }}
|
||||
{{ $.Scratch.Set "bl_link" (.Get "link") }}
|
||||
{{ $.Scratch.Set "bl_title" (.Get "title") }}
|
||||
{{ else }}
|
||||
<!-- for the positional version if any -->
|
||||
{{ end }}
|
||||
|
||||
<!-- if title is not set explicitly then we need to beautify the link
|
||||
if length of link is more than 32 chars, we will cut it off by 32 and
|
||||
then drop everything after the last / if any and put it in into title -->
|
||||
|
||||
{{ with $.Scratch.Get "bl_title" }}
|
||||
<!-- do nothing -->
|
||||
{{ else }}
|
||||
{{ with $.Scratch.Get "bl_link" }} <!-- if link is given -->
|
||||
{{ range last 1 (split ($.Scratch.Get "bl_link" ) "://") }} <!-- split by :// and then only take the items after it to remove protocol:// -->
|
||||
{{ $.Scratch.Set "title_without_protocol" . }}
|
||||
{{ end }}
|
||||
{{ range last 1 (split ($.Scratch.Get "title_without_protocol" ) "www.") }} <!-- also remove the www. at the start if any. we are using a second split because all URLS may not start with it -->
|
||||
{{ $.Scratch.Set "title_without_protocol" . }}
|
||||
{{ end }}
|
||||
{{ $.Scratch.Set "bl_title" ($.Scratch.Get "title_without_protocol") }}
|
||||
|
||||
<!-- if link is longer than 32 bytes we should trim it -->
|
||||
{{ if (gt (len ($.Scratch.Get "title_without_protocol") ) 32) }}
|
||||
{{ $title := (slicestr ($.Scratch.Get "title_without_protocol") 0 32) }} <!-- get the first 32 characters of title_without_protocol -->
|
||||
{{ $split_by_fw_slash := split $title "/" }} <!-- now split on / because we want to stop after the last forward slash -->
|
||||
{{ $count := (sub (len $split_by_fw_slash) 1) }} <!-- we want everything but the last part so we adjust the count accordingly -->
|
||||
|
||||
{{ $.Scratch.Set "tempstring" "" }} <!-- temp variable to hold the concatinated string -->
|
||||
{{ range first $count $split_by_fw_slash }} <!-- loop through all parts except last and concat them (add / between halves) -->
|
||||
{{ $.Scratch.Set "tempstring" ( . | printf "%s%s/" ($.Scratch.Get "tempstring") | printf "%s" ) }}
|
||||
{{ end }}
|
||||
{{ $.Scratch.Set "bl_title" ( printf "%s..." ($.Scratch.Get "tempstring") | printf "%s" ) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<blockquote>
|
||||
<p>{{ .Inner | markdownify }}</p>
|
||||
<footer>
|
||||
<strong>{{ with $.Scratch.Get "bl_author" }}{{ . }}{{ end }}</strong>
|
||||
{{ with $.Scratch.Get "bl_source" }}
|
||||
<cite>{{ . }}</cite>
|
||||
{{ else }}
|
||||
{{ with $.Scratch.Get "bl_link" }}
|
||||
<cite>
|
||||
<a href="{{ . }}" title="{{ . }}">{{ $.Scratch.Get "bl_title" }}</a> <!-- can't have new lines here -->
|
||||
</cite>
|
||||
{{ else }}
|
||||
{{ with $.Scratch.Get "bl_title" }}
|
||||
<cite>
|
||||
{{ $.Scratch.Get "bl_title" }}</a>
|
||||
</cite>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</footer>
|
||||
</blockquote>
|
||||
@@ -1,12 +0,0 @@
|
||||
{{ if .Get "content" }}
|
||||
{{ if .Get "summary" }}
|
||||
{{ else }}
|
||||
{{ warnf "missing value for param 'summary': %s" .Position }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "missing value for param 'content': %s" .Position }}
|
||||
{{ end }}
|
||||
<p><details {{ if (eq (.Get "openByDefault") true) }} open=true {{ end }}>
|
||||
<summary markdown="span">{{ .Get "summary" | markdownify }}</summary>
|
||||
{{ .Get "content" | markdownify }}
|
||||
</details></p>
|
||||
@@ -1,2 +0,0 @@
|
||||
<!-- raw html -->
|
||||
{{.Inner}}
|
||||
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 15 KiB |
@@ -1 +0,0 @@
|
||||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
||||
@@ -1,22 +0,0 @@
|
||||
# theme.toml template for a Hugo theme
|
||||
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
|
||||
|
||||
name = "PaperMod"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE"
|
||||
description = "A simple, clean, flexible Hugo theme"
|
||||
homepage = "https://github.com/adityatelange/hugo-PaperMod"
|
||||
tags = ["Responsive", "Simple", "Clean", "Light", "White", "Dark", "Blog", "PaperMod"]
|
||||
features = ["Responsive", "One Column", "Blog"]
|
||||
min_version = "0.57.1"
|
||||
|
||||
[author]
|
||||
name = "Aditya Telange"
|
||||
homepage = "https://github.com/adityatelange/"
|
||||
|
||||
# If porting an existing theme
|
||||
[original]
|
||||
name = "Paper"
|
||||
author = "nanxiaobei"
|
||||
homepage = "https://github.com/nanxiaobei"
|
||||
repo = "https://github.com/nanxiaobei/hugo-paper/"
|
||||