-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
298e4e4
commit 92716d2
Showing
189 changed files
with
12,494 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[BUG]" | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- | ||
## READ BEFORE OPENING ISSUES | ||
Please fill the template below | ||
- **DO NOT** ask for instructions. | ||
- Search for previous issues/ pull requests | ||
--> | ||
|
||
**Describe the bug** | ||
<!-- A clear and concise description of what the bug is. --> | ||
|
||
- Device/Os: [e.g. Android 10] | ||
- Type: [e.g. Desktop/Mobile] | ||
- Browser and version [e.g. Chrome 86.0]: | ||
- Hugo Version [ >=0.83.0 expected]: | ||
- Theme Version [e.g. v4.0, master, or commit-id ]: | ||
|
||
**Steps to reproduce the behavior:** | ||
<!-- | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
--> | ||
|
||
**Expected behavior**: | ||
<!-- A clear and concise description of what you expected to happen. --> | ||
|
||
**Screenshots** | ||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
**Additional context** | ||
<!--Add any other context about the problem here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
name: New Blank Issue | ||
about: Anything other than bug report | ||
title: "" | ||
labels: "" | ||
assignees: "" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 7 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 3 | ||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- pinned | ||
- keep | ||
# Label to use when marking an issue as stale | ||
staleLabel: stale | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# https://github.com/actions/starter-workflows/blob/main/pages/hugo.yml | ||
name: Deploy Hugo site to Pages | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- "README.md" | ||
branches: | ||
- master | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Configure Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: 'latest' | ||
extended: true | ||
|
||
- name: Build | ||
run: | | ||
hugo \ | ||
--minify --verbose -D \ | ||
--buildFuture \ | ||
--environment production \ | ||
--themesDir ../.. --theme hugo-PaperModX \ | ||
--baseURL "${{ steps.pages.outputs.base_url }}/" | ||
working-directory: exampleSite | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./exampleSite/public | ||
|
||
# Deployment job | ||
deploy: | ||
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@v1 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"search.exclude": { | ||
"**/public": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 nanxiaobei and adityatelange | ||
Copyright (c) 2021 adityatelange | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
run-default: | ||
cd exampleSite && hugo server -D --gc -p 13131 --config config.default.yml | ||
|
||
run-profile-mode: | ||
cd exampleSite && hugo server -D --gc -p 13131 --config config.profileMode.yml | ||
|
||
chroma-css: | ||
hugo gen chromastyles --style=onedark > assets/css/lib/chroma-dark.css | ||
hugo gen chromastyles --style=tango > assets/css/lib/chroma-light.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
# PaperModX | ||
|
||
PaperModX is a forked version of [PaperMod](https://github.com/adityatelange/hugo-PaperMod), | ||
it aims at adding new features and improving code quality, | ||
makes it easier to read and modify by anyone with basic knowledge of Hugo and HTML. | ||
|
||
Features and changes: | ||
- Table of Contents (ToC) floating on the side | ||
- InstantClick integration | ||
- Social icons from [Simple Icons](https://simpleicons.org/) | ||
- Opinionated UI enhancements | ||
|
||
## Getting started | ||
|
||
You can use [reorx/papermodx-example](https://github.com/reorx/papermodx-example) as a boilerplate to create a new Hugo site with PaperModX theme. For detailed instructions please see the README of papermodx-example repo. | ||
|
||
## Table of Contents (ToC) floating on the side | ||
|
||
By adding config: | ||
|
||
```yaml | ||
params: | ||
TocSide: 'left' # or 'right' | ||
``` | ||
ToC will float on the left/right side of the page. | ||
You can take a look at how `'right'` feels like in [Installation | Update](https://reorx.github.io/hugo-PaperModX/docs/installation/). | ||
The ToC box is responsive, it only shows on the side when minimum screen size is 1440px. | ||
This feature is enabled on this site. | ||
## InstantClick integration | ||
By adding config: | ||
```yaml | ||
params: | ||
EnableInstantClick: true | ||
``` | ||
[InstantClick](http://instantclick.io/) will be enabled, | ||
making navigation behaves like Single Page Application. | ||
Note that `/search` pages are omitted from InstantClick | ||
to prevent conflicts from search's JavaScript, | ||
this may be changed in the future after refactoring those scripts. | ||
|
||
Another thing to notice is smooth scrolling will be disabled | ||
if InstantClick is enabled, because they both listen click | ||
event on every `<a>` tags. IMO smooth scrolling is not very useful | ||
so it has to give way to InstantCllick. | ||
|
||
This feature is enabled on this site. | ||
|
||
|
||
## Give links an accent color. | ||
|
||
Though PaperModX is designed to be minimal, accent color is still essential. | ||
It's a good way to show personality and make your site feels more delightful. | ||
|
||
The default color is a purple vibe, | ||
you can customize the colors of link, link underline and their hover variants | ||
by override the following css variables in `assets/css/extended/custom.css` of your site. | ||
|
||
```css | ||
:root { | ||
--link-color: var(--primary); | ||
--link-hover-color: #573eaa; | ||
--link-underline-shadow: 0 1px 0 var(--link-color); | ||
--link-hover-underline-color: #573eaa; | ||
--link-hover-underline-shadow: 0 2px 0 var(--link-hover-underline-color); | ||
} | ||
``` | ||
|
||
|
||
## Customize pagniator size | ||
|
||
In section pages, if you want the paginator size be different from the | ||
[global config](https://gohugo.io/templates/pagination/#configure-pagination), | ||
you can add `paginate` in the frontmatter to customize. | ||
|
||
```yaml | ||
--- | ||
paginate: 10 | ||
--- | ||
``` | ||
|
||
|
||
## Menus external link | ||
|
||
You can add `external: true` to a menu item's params to mark it as an external link, | ||
this will add a small icon to the end, and make the link open in new tab when clicked. | ||
|
||
```yaml | ||
menu: | ||
main: | ||
- name: "@Author" | ||
url: "https://reorx.com" | ||
params: | ||
external: true | ||
``` | ||
|
||
|
||
## Highlight code with Chroma, no bullshit | ||
|
||
PaperMod uses highlight.js to highlight code blocks. | ||
In PaperModX, we use Chroma which is the recommended way in Hugo's | ||
[official docs](https://gohugo.io/content-management/syntax-highlighting/#:~:text=Hugo%20uses%20Chroma%20as%20its%20code%20highlighter%3B%20it%20is%20built%20in%20Go%20and%20is%20really%2C%20really%20fast), | ||
thus changing theme is easily supported. | ||
|
||
By default the themes are `github` for light and `dracula` for dark, | ||
you can change it by adding `chroma-light.css` and `chroma-dark.css` | ||
in site's `assets/css/lib` directory. | ||
|
||
|
||
## Social icons from Simple Icons | ||
|
||
Add social icons with `-simple` suffix from [Simple Icons](https://simpleicons.org/). | ||
|
||
Available icons: | ||
- github-simple | ||
- rss-simple | ||
- telegram-simple | ||
- twitter-simple | ||
- pinboard-simple | ||
|
||
The icons are moved from `layouts/partials/svg.html` to `data/svg.toml`, | ||
makes it easier to maintain, it's now possible to have an index page | ||
to show all the icons, check it out at: [Icons Preview](https://reorx.github.io/hugo-PaperModX/docs/icons_preview/) | ||
|
||
|
||
## Opinionated UI enhancements | ||
|
||
- Distinguish home page width and post page width, post page is wider | ||
(800px) for better readability, you can change it by `--post-width` in `theme-vars.css`. | ||
- Menu links are always bold, this feels more consistent when clicking around. Active links have deeper color. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.not-found { | ||
position: absolute; | ||
left: 0; | ||
right: 0; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 80%; | ||
font-size: 160px; | ||
font-weight: 700; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.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: 22px 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-count, | ||
.archive-meta { | ||
color: var(--secondary); | ||
font-size: 14px; | ||
} |
Oops, something went wrong.