mirror of
https://github.com/BBaoVanC/bbaovanc.com.git
synced 2025-07-04 19:17:34 -05:00
Compare commits
81 Commits
test
...
categories
Author | SHA1 | Date | |
---|---|---|---|
346a01d6d3
|
|||
f3cf22ae33
|
|||
dde5162907
|
|||
90d640bd12
|
|||
904d8928b7
|
|||
827a049946
|
|||
db65e9fc23
|
|||
bd9d294fc1
|
|||
9de4d26b6a
|
|||
f14c1568f7 | |||
1e650ed79b
|
|||
ba9c62ed4f
|
|||
c3632c40ce | |||
02201e806f
|
|||
d27f095c1a
|
|||
2b38b143b1
|
|||
26ccc90cff
|
|||
d5ef788e78
|
|||
8e2673b4ff
|
|||
c58164f1f2
|
|||
4fb9dbaa30
|
|||
359bfbf1b6
|
|||
d011efd2a1
|
|||
98ef3386f5
|
|||
a170885ff8
|
|||
17af722f4d
|
|||
62c62b344c
|
|||
f50665786b
|
|||
57fac4d945
|
|||
f6602dfff0
|
|||
db6fc9e977
|
|||
86a90f907a
|
|||
3838d2d44a
|
|||
ac05117647
|
|||
355d180f6c
|
|||
0bc3f3145e
|
|||
cbe6a1e12a
|
|||
e1dd193bf1
|
|||
0bb3dce6e9
|
|||
6ad002b319
|
|||
1e20d0e943
|
|||
375b90fb07
|
|||
81fa2f6b41
|
|||
fb7b5913c0
|
|||
d8134587e9
|
|||
4db3d24349
|
|||
4017855c29
|
|||
859537be01
|
|||
164565cecb
|
|||
5d08b75f71
|
|||
5782a6a002
|
|||
e21a4b948e
|
|||
9de124a586
|
|||
4a4361dcb5
|
|||
a449933ffe
|
|||
a57715c4fa
|
|||
3ec98f019c
|
|||
fd4a7a7bc2
|
|||
1f263b3a3a
|
|||
c24cdee46c
|
|||
2a79a86fd6
|
|||
97bc1980eb
|
|||
cef1103070
|
|||
1332c16841
|
|||
b124d89391
|
|||
0d432e200c
|
|||
5286bb029f | |||
31e25c2578
|
|||
1033b84687
|
|||
b9a95983b9
|
|||
b14a46d48b
|
|||
99b03ea7ba
|
|||
9c6a2a059d | |||
e10c3a1150
|
|||
9e0d2a9d8f
|
|||
576124d42d
|
|||
7b8f47b56b
|
|||
cab56bd859
|
|||
672bfae812
|
|||
ca40973701 | |||
b2d3bd99f3
|
101
.github/workflows/audit.yml
vendored
Normal file
101
.github/workflows/audit.yml
vendored
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
name: Audit
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lighthouse:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkount
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Install Caddy
|
||||||
|
run: |
|
||||||
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo tee /etc/apt/trusted.gpg.d/caddy-stable.asc
|
||||||
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install caddy
|
||||||
|
sudo systemctl disable --now caddy
|
||||||
|
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v2
|
||||||
|
with:
|
||||||
|
hugo-version: latest
|
||||||
|
extended: true
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: hugo --printI18nWarnings --printPathWarnings --baseURL https://localhost
|
||||||
|
|
||||||
|
- name: Compress
|
||||||
|
run: time ./compress.sh
|
||||||
|
|
||||||
|
- name: Audit using Lighthouse
|
||||||
|
uses: treosh/lighthouse-ci-action@v9
|
||||||
|
with:
|
||||||
|
uploadArtifacts: true
|
||||||
|
configPath: ./lighthouserc.yaml
|
||||||
|
runs: 3
|
||||||
|
serverBaseUrl: https://lhci.bbaovanc.com/
|
||||||
|
# this should be safe since it only allows adding (not deleting) data
|
||||||
|
serverToken: 926a24f2-90e4-48b1-809f-055b9408cf4b
|
||||||
|
|
||||||
|
|
||||||
|
audit:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v2
|
||||||
|
with:
|
||||||
|
hugo-version: latest
|
||||||
|
extended: true
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
HUGO_MINIFY_TDEWOLFF_HTML_KEEPCOMMENTS=true HUGO_ENABLEMISSINGTRANSLATIONPLACEHOLDERS=true hugo --printI18nWarnings --printPathWarnings
|
||||||
|
|
||||||
|
# For the following steps, see
|
||||||
|
# https://discourse.gohugo.io/t/audit-your-published-site-for-problems/35184
|
||||||
|
|
||||||
|
- name: Audit - raw HTML
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
! grep -inorE "<\!-- raw HTML omitted -->" public/
|
||||||
|
|
||||||
|
- name: Audit - ZgotmplZ (unsafe URL content)
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
! grep -inorE "ZgotmplZ" public/
|
||||||
|
|
||||||
|
#- name: Audit - missing translations
|
||||||
|
# if: always()
|
||||||
|
# run: |
|
||||||
|
# ! grep -inorE "\[i18n\]" public/
|
||||||
|
|
||||||
|
- name: Audit - nil values in printf
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
! grep -inorE "\(<nil>\)" public/
|
||||||
|
|
||||||
|
- name: Audit - nil values in printf without safeHTML
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
! grep -inorE "(<nil>)" public/
|
||||||
|
|
||||||
|
- name: Audit - HAHAHUGO
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
! grep -inorE "hahahugo" public/
|
18
.github/workflows/deploy.yml
vendored
18
.github/workflows/deploy.yml
vendored
@ -19,13 +19,6 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup SSH
|
|
||||||
uses: kielabokkie/ssh-key-and-known-hosts-action@v1
|
|
||||||
with:
|
|
||||||
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
|
|
||||||
ssh-host: srv.bbaovanc.com
|
|
||||||
ssh-port: 2222
|
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
@ -33,12 +26,19 @@ jobs:
|
|||||||
extended: true
|
extended: true
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: hugo --i18n-warnings --path-warnings
|
run: hugo --printI18nWarnings --printPathWarnings
|
||||||
|
|
||||||
- name: Compress
|
- name: Compress
|
||||||
run: |
|
run: |
|
||||||
time sudo ./compress.sh
|
time sudo ./compress.sh
|
||||||
|
|
||||||
|
- name: Setup SSH
|
||||||
|
uses: kielabokkie/ssh-key-and-known-hosts-action@v1
|
||||||
|
with:
|
||||||
|
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||||
|
ssh-host: srv.bbaovanc.com
|
||||||
|
ssh-port: 2222
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: up9cloud/action-rsync@v1
|
uses: up9cloud/action-rsync@v1
|
||||||
env:
|
env:
|
||||||
@ -50,4 +50,4 @@ jobs:
|
|||||||
VERBOSE: true
|
VERBOSE: true
|
||||||
KEY: ${{secrets.DEPLOY_SSH_KEY}}
|
KEY: ${{secrets.DEPLOY_SSH_KEY}}
|
||||||
TARGET: /var/www/bbaovanc.com/public/
|
TARGET: /var/www/bbaovanc.com/public/
|
||||||
ARGS_MORE: --checksum
|
ARGS: -avPzc --delete-delay --exclude=/.git/ --exclude=/.github/
|
||||||
|
22
.github/workflows/pull_request.yml
vendored
22
.github/workflows/pull_request.yml
vendored
@ -29,13 +29,6 @@ jobs:
|
|||||||
ref: ${{ github.head_ref }}
|
ref: ${{ github.head_ref }}
|
||||||
no_override: false
|
no_override: false
|
||||||
|
|
||||||
- name: Setup SSH
|
|
||||||
uses: kielabokkie/ssh-key-and-known-hosts-action@v1
|
|
||||||
with:
|
|
||||||
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
|
|
||||||
ssh-host: srv.bbaovanc.com
|
|
||||||
ssh-port: 2222
|
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
@ -43,12 +36,19 @@ jobs:
|
|||||||
extended: true
|
extended: true
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: hugo --i18n-warnings --path-warnings --baseURL "https://demo.bbaovanc.com/pull_request/${{ github.event.number }}"
|
run: hugo --printI18nWarnings --printPathWarnings --baseURL "https://demo.bbaovanc.com/pull_request/${{ github.event.number }}"
|
||||||
|
|
||||||
- name: Compress
|
- name: Compress
|
||||||
run: |
|
run: |
|
||||||
time sudo ./compress.sh
|
time sudo ./compress.sh
|
||||||
|
|
||||||
|
- name: Setup SSH
|
||||||
|
uses: kielabokkie/ssh-key-and-known-hosts-action@v1
|
||||||
|
with:
|
||||||
|
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||||
|
ssh-host: srv.bbaovanc.com
|
||||||
|
ssh-port: 2222
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: up9cloud/action-rsync@v1
|
uses: up9cloud/action-rsync@v1
|
||||||
env:
|
env:
|
||||||
@ -59,8 +59,8 @@ jobs:
|
|||||||
MODE: push
|
MODE: push
|
||||||
VERBOSE: true
|
VERBOSE: true
|
||||||
KEY: ${{secrets.DEPLOY_SSH_KEY}}
|
KEY: ${{secrets.DEPLOY_SSH_KEY}}
|
||||||
TARGET: /var/www/demo.bbaovanc.com/pull_request/test/${{ github.event.number }}/
|
TARGET: /var/www/demo.bbaovanc.com/pull_request/${{ github.event.number }}/
|
||||||
ARGS_MORE: --checksum
|
ARGS: -avPzc --delete-delay --exclude=/.git/ --exclude=/.github/
|
||||||
|
|
||||||
- name: Finish deployment
|
- name: Finish deployment
|
||||||
uses: bobheadxi/deployments@v0.6.0
|
uses: bobheadxi/deployments@v0.6.0
|
||||||
@ -88,7 +88,7 @@ jobs:
|
|||||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||||
issue-number: ${{ github.event.number }}
|
issue-number: ${{ github.event.number }}
|
||||||
body: |
|
body: |
|
||||||
test test test test test test test test test test
|
A preview of this pull request is ready!
|
||||||
See it at https://demo.bbaovanc.com/pull_request/${{ github.event.number }}/
|
See it at https://demo.bbaovanc.com/pull_request/${{ github.event.number }}/
|
||||||
View the deploy log at https://github.com/BBaoVanC/bbaovanc.com/actions/runs/${{ github.run_id}}
|
View the deploy log at https://github.com/BBaoVanC/bbaovanc.com/actions/runs/${{ github.run_id}}
|
||||||
Please note that currently the comment system is only operational on real deploys on bbaovanc.com. If you see an error, it's probably not your fault.
|
Please note that currently the comment system is only operational on real deploys on bbaovanc.com. If you see an error, it's probably not your fault.
|
||||||
|
@ -1,69 +1,28 @@
|
|||||||
# Contributing to bobatheme
|
# Contributing to bobatheme
|
||||||
|
|
||||||
## Where to put stuff
|
## Where to put questions/issues/etc
|
||||||
|
|
||||||
### Discussions
|
Please use the [proper section on
|
||||||
|
bobaforum](https://forum.bbaovanc.com/t/my-website) for issues, questions, or
|
||||||
The best place to ask questions or have discussions is the (relatively new)
|
discussions.
|
||||||
discussions feature on GitHub, available
|
|
||||||
[here](https://github.com/BBaoVanC/bbaovanc.com/discussions). It's not too big
|
|
||||||
of an issue though because discussions and issues can easily be converted
|
|
||||||
between eachother.
|
|
||||||
|
|
||||||
### Issues
|
|
||||||
|
|
||||||
Issues should be used only for, well, issues. Ignore all the placeholder ones
|
|
||||||
prefixed with "Translate:" and tagged with the "translation" tag as they are
|
|
||||||
placeholders used in the projects tab. I might mark them as closed in the future
|
|
||||||
to clean it up but I'll worry about that later.
|
|
||||||
|
|
||||||
### Translations
|
|
||||||
|
|
||||||
Discussion relating to translations should either go as comments or reviews on
|
|
||||||
the pull request adding the translation, or as a discussion under the
|
|
||||||
[Translations category](https://github.com/BBaoVanC/bbaovanc.com/discussions/categories/translations).
|
|
||||||
|
|
||||||
## Writing translations
|
|
||||||
|
|
||||||
Translations should aim to get the meaning as close as possible to original
|
|
||||||
document. The changes in a translation pull request *should*:
|
|
||||||
|
|
||||||
- only update one page (multiple pages should be split into separate pull
|
|
||||||
requests)
|
|
||||||
- only contain changes for a single new file (no changes unrelated to
|
|
||||||
translation)
|
|
||||||
- thoroughly compared to the original text in order to get the same meaning
|
|
||||||
across
|
|
||||||
|
|
||||||
## Pull requests
|
|
||||||
|
|
||||||
### Commit messages
|
|
||||||
|
|
||||||
It's not too big of a deal what you put in your commit messages, but try to give
|
|
||||||
each commit a rough description of what it changes. I'll use squash merges most
|
|
||||||
of the time anyways.
|
|
||||||
|
|
||||||
### Description
|
|
||||||
|
|
||||||
If the pull request doesn't require any extra information in addition to the
|
|
||||||
title, you can probably leave the description blank. Otherwise you can put some
|
|
||||||
information, just try to keep it concise; it's better to read a couple sentences
|
|
||||||
than an entire essay with the same amount of information.
|
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
## Automatic deploy previews with Netlify
|
Just in case you need it.
|
||||||
|
|
||||||
Netlify will automatically build each pull request into a public deploy preview,
|
## Automatic deploy previews with GitHub Actions
|
||||||
and will link it in a comment.
|
|
||||||
|
My GitHub Actions workflows will automatically build each pull request into a
|
||||||
|
public deploy preview on demo.bbaovanc.com, and will link it in a comment.
|
||||||
|
|
||||||
## Manual (local) building
|
## Manual (local) building
|
||||||
|
|
||||||
You can also build the site yourself using Hugo, including a live local preview.
|
You can also build the site yourself using Hugo, including a live local preview.
|
||||||
|
|
||||||
1. Make sure you install the latest version of Hugo, or at least the
|
1. Make sure you install the latest version of Hugo, or hopefully at least the
|
||||||
`min_version` listed in
|
`min_version` listed in
|
||||||
[theme.toml](https://github.com/BBaoVanC/bobatheme/blob/master/theme.toml#L11).
|
[theme.toml](https://github.com/BBaoVanC/bobatheme/blob/master/theme.toml#L11).
|
||||||
|
Let me know if that minimum version isn't enough and I'll fix it.
|
||||||
2. Clone the repo
|
2. Clone the repo
|
||||||
3. Make sure to download and checkout the submodules (use `git submodule update
|
3. Make sure to download and checkout the submodules (use `git submodule update
|
||||||
--init --recursive`). The `--recursive` flag is especially important because
|
--init --recursive`). The `--recursive` flag is especially important because
|
||||||
|
9
Caddyfile
Normal file
9
Caddyfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# vim: ft=caddyfile
|
||||||
|
|
||||||
|
https://localhost {
|
||||||
|
header Cache-Control no-cache
|
||||||
|
root * public/
|
||||||
|
file_server {
|
||||||
|
precompressed br gzip
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,8 @@
|
|||||||
# bbaovanc.com
|
# bbaovanc.com
|
||||||
|
|
||||||
My personal website, generated using [Hugo](https://gohugo.io)
|
My personal website, generated using [Hugo](https://gohugo.io)
|
||||||
|
|
||||||
|
## Discussions
|
||||||
|
|
||||||
|
Use [bobaforum](https://forum.bbaovanc.com) for questions, ideas, discussions,
|
||||||
|
etc. relating to me or my website.
|
||||||
|
3
assets/js/share-event.js
Normal file
3
assets/js/share-event.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
function share_event(service) {
|
||||||
|
plausible("Share", {props: {Network: service}});
|
||||||
|
}
|
56
config.yaml
56
config.yaml
@ -4,7 +4,7 @@ defaultContentLanguage: en
|
|||||||
copyright: '© 2021 bbaovanc <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>'
|
copyright: '© 2021 bbaovanc <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>'
|
||||||
sectionPagesMenu: main
|
sectionPagesMenu: main
|
||||||
enableRobotsTXT: true
|
enableRobotsTXT: true
|
||||||
paginate: 5
|
paginate: 10
|
||||||
enableGitInfo: true
|
enableGitInfo: true
|
||||||
|
|
||||||
taxonomies:
|
taxonomies:
|
||||||
@ -16,13 +16,27 @@ author:
|
|||||||
markup: # this just keeps the bobatheme markup styling
|
markup: # this just keeps the bobatheme markup styling
|
||||||
_merge: deep
|
_merge: deep
|
||||||
|
|
||||||
|
related:
|
||||||
|
includeNewer: true
|
||||||
|
indices:
|
||||||
|
#- name: keywords
|
||||||
|
# weight: 100
|
||||||
|
#- name: categories
|
||||||
|
# weight: 80
|
||||||
|
- name: tags
|
||||||
|
weight: 80
|
||||||
|
- name: date
|
||||||
|
weight: 10
|
||||||
|
threshold: 80
|
||||||
|
toLower: true
|
||||||
|
|
||||||
params:
|
params:
|
||||||
# these are for the OpenGraph/Twitter embeds in Hugo
|
# these are for the OpenGraph/Twitter embeds in Hugo
|
||||||
description: My personal website
|
description: My personal website
|
||||||
|
|
||||||
# these are for favicons in bobatheme (unset by default)
|
# these are for favicons in bobatheme (disabled by default)
|
||||||
faviconICO: favicon.ico
|
faviconSVG: favicon.svg
|
||||||
faviconPNG: favicon.png
|
appleTouchPNG: apple-touch-icon.png
|
||||||
|
|
||||||
# show reading time (enabled by default)
|
# show reading time (enabled by default)
|
||||||
readingtime: true
|
readingtime: true
|
||||||
@ -31,6 +45,26 @@ params:
|
|||||||
gitFileURL: https://github.com/BBaoVanC/bbaovanc.com/blob/master
|
gitFileURL: https://github.com/BBaoVanC/bbaovanc.com/blob/master
|
||||||
gitFileIcon: code
|
gitFileIcon: code
|
||||||
|
|
||||||
|
# display a "Latest Posts" section on the homepage below its content
|
||||||
|
homepageLatestPosts: true
|
||||||
|
|
||||||
|
# social media share icons
|
||||||
|
shareButtons:
|
||||||
|
twitter: true
|
||||||
|
facebook: true
|
||||||
|
linkedin: true
|
||||||
|
reddit: true
|
||||||
|
telegram: true
|
||||||
|
|
||||||
|
# show "Latest Posts" section at bottom of content pages
|
||||||
|
latestPostsOnContent: true
|
||||||
|
|
||||||
|
|
||||||
|
footer: >-
|
||||||
|
See the [anonymous and privacy-friendly
|
||||||
|
analytics](https://plausible.bbaovanc.com/bbaovanc.com) for this site,
|
||||||
|
powered by [Plausible](https://plausible.io).
|
||||||
|
|
||||||
# see https://gohugo.io/about/hugo-and-gdpr/#all-privacy-settings
|
# see https://gohugo.io/about/hugo-and-gdpr/#all-privacy-settings
|
||||||
# you probably want to keep this default
|
# you probably want to keep this default
|
||||||
privacy:
|
privacy:
|
||||||
@ -41,10 +75,12 @@ languages:
|
|||||||
languageName: English
|
languageName: English
|
||||||
title: bbaovanc's Website
|
title: bbaovanc's Website
|
||||||
weight: 1
|
weight: 1
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
- identifier: forum
|
||||||
|
name: Forum
|
||||||
|
url: https://forum.bbaovanc.com
|
||||||
|
|
||||||
es:
|
- identifier: status-page
|
||||||
languageName: Español
|
name: Status Page
|
||||||
title: sitio web de bbaovanc
|
url: https://status.bbaovanc.com
|
||||||
weight: 2
|
|
||||||
params:
|
|
||||||
description: Mi sitio web personal
|
|
||||||
|
@ -3,22 +3,31 @@
|
|||||||
title: Home
|
title: Home
|
||||||
|
|
||||||
description: >-
|
description: >-
|
||||||
This is my website, home to my blog and other personal pages. It's powered by
|
This is my personal website, home to my blog. It's powered by my own custom
|
||||||
my own custom theme named bobatheme, available at
|
theme named bobatheme, which is available at
|
||||||
https://github.com/BBaoVanC/bobatheme.
|
https://github.com/BBaoVanC/bobatheme.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## My Website
|
## My Website
|
||||||
|
|
||||||
This is my website. Pretty self-explanatory.
|
This is my personal website. I wrote it myself from scratch using [my own
|
||||||
|
theme][bobatheme-github] and a static site generator named [Hugo][hugo-website].
|
||||||
|
I occasionally write blog posts under the [blog section][blog-section].
|
||||||
|
|
||||||
## A fresh new theme
|
[bobatheme-github]: https://github.com/BBaoVanC/bobatheme
|
||||||
|
[hugo-website]: https://gohugo.io
|
||||||
|
[blog-section]: {{< ref "/blog/" >}}
|
||||||
|
|
||||||
My website uses my own custom theme named
|
## Topics I write about
|
||||||
[bobatheme](https://github.com/BBaoVanC/bobatheme). Although it's not quite
|
|
||||||
finished yet, the current style will probably stay for the forseeable future.
|
|
||||||
|
|
||||||
## Another website
|
I write mostly about technology, including:
|
||||||
|
|
||||||
|
- Linux
|
||||||
|
- Open Source Software
|
||||||
|
- Programming
|
||||||
|
- Web Development
|
||||||
|
|
||||||
|
## My other website
|
||||||
|
|
||||||
I also run another website: https://boba.best.
|
I also run another website: https://boba.best.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
title: bbaovanc
|
title: bbaovanc
|
||||||
|
issoUserID: 284513e38f5c
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
title: Blog
|
|
||||||
|
|
||||||
description: >-
|
|
||||||
El hogar de mi blog.
|
|
||||||
|
|
||||||
---
|
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
title: Allow non root processes to bind to privileged ports in Linux
|
title: Allow non root processes to bind to privileged ports in Linux
|
||||||
date: 2021-03-28T21:29:52-05:00
|
date: 2021-03-28T21:29:52-05:00
|
||||||
|
lastmod: 2022-05-02T01:05:44-05:00
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
comments: true
|
||||||
|
|
||||||
@ -11,20 +12,24 @@ authors:
|
|||||||
aliases:
|
aliases:
|
||||||
- posts/allow-non-root-processes-to-bind-to-privileged-ports/
|
- posts/allow-non-root-processes-to-bind-to-privileged-ports/
|
||||||
|
|
||||||
tags:
|
categories:
|
||||||
- guide
|
- guides
|
||||||
- linux
|
- linux
|
||||||
|
|
||||||
|
tags:
|
||||||
|
- gitea
|
||||||
|
- systemd
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
In Linux, processes cannot bind to privileged ports (<=1024) unless they are
|
In Linux, processes cannot bind to privileged ports (<=1024) unless they are
|
||||||
running as root. Here's how to allow any process to bind to privileged ports.
|
running as root. Here's how to allow any process to bind to privileged ports.
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
In Linux, processes cannot bind to privileged ports (<=1024) unless they are
|
In Linux, processes cannot bind to privileged ports (<=1024) unless they are
|
||||||
running as root. I learned about this when I was trying to add SSH cloning to my
|
running as root. I learned about this when I was trying to add SSH cloning to my
|
||||||
[Gitea](https://gitea.io) instance. This can be bypassed by giving
|
[Gitea](https://gitea.io) instance. This can be bypassed by giving
|
||||||
`CAP_NET_BIND_SERVICE` capabilities to either the systemd service, or the
|
`CAP_NET_BIND_SERVICE` capabilities to either the systemd service, or the
|
||||||
@ -34,9 +39,9 @@ executable itself.
|
|||||||
|
|
||||||
### Using systemd (preferred)
|
### Using systemd (preferred)
|
||||||
|
|
||||||
The best way is to tell systemd to give `CAP_NET_BIND_SERVICE`
|
The best way is to tell systemd to give `CAP_NET_BIND_SERVICE` capabilities to
|
||||||
capabilities to the service. In fact, the Gitea systemd service has two
|
the service. In fact, the Gitea systemd service has two
|
||||||
lines[^1] that are commented out:
|
lines[^systemd-set-capabilities] that are commented out:
|
||||||
|
|
||||||
```systemd
|
```systemd
|
||||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||||
@ -48,7 +53,7 @@ Uncommenting these two lines was all I had to do for Gitea.
|
|||||||
### Using `setcap`
|
### Using `setcap`
|
||||||
|
|
||||||
You can add `CAP_NET_BIND_SERVICE` to the executable directly using `setcap`,
|
You can add `CAP_NET_BIND_SERVICE` to the executable directly using `setcap`,
|
||||||
allowing it to bind to any port. Run the following command[^2]:
|
allowing it to bind to any port. Run the following command[^setcap-command]:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
setcap 'cap_net_bind_service=+ep' /path/to/program
|
setcap 'cap_net_bind_service=+ep' /path/to/program
|
||||||
@ -57,7 +62,7 @@ setcap 'cap_net_bind_service=+ep' /path/to/program
|
|||||||
Note that this means that anyone with permission to run this program will be
|
Note that this means that anyone with permission to run this program will be
|
||||||
able to run it and bind to any privileged ports.
|
able to run it and bind to any privileged ports.
|
||||||
|
|
||||||
Other caveats[^2]:
|
Other caveats[^caveats-quote]:
|
||||||
|
|
||||||
> 1. You will need at least a 2.6.24 kernel
|
> 1. You will need at least a 2.6.24 kernel
|
||||||
> 2. This won't work if your file is a script. (ie, uses a #! line to launch an
|
> 2. This won't work if your file is a script. (ie, uses a #! line to launch an
|
||||||
@ -70,6 +75,10 @@ Other caveats[^2]:
|
|||||||
> privileges like setcap or suid. So if your program uses its own .../lib/,
|
> privileges like setcap or suid. So if your program uses its own .../lib/,
|
||||||
> you might have to look into another option like port forwarding.
|
> you might have to look into another option like port forwarding.
|
||||||
|
|
||||||
[^1]: https://github.com/go-gitea/gitea/blob/3416e2a82586fca4cd452b93237b979300f55d62/contrib/systemd/gitea.service#L69
|
|
||||||
and https://stackoverflow.com/a/47065825
|
[^systemd-set-capabilities]: See [these two lines in the Gitea systemd service
|
||||||
[^2]: https://stackoverflow.com/a/414258
|
file](https://github.com/go-gitea/gitea/blob/3416e2a82586fca4cd452b93237b979300f55d62/contrib/systemd/gitea.service#L69)
|
||||||
|
and [this Stack Overflow answer](https://stackoverflow.com/a/47065825).
|
||||||
|
|
||||||
|
[^setcap-command]: https://stackoverflow.com/a/414258
|
||||||
|
[^caveats-quote]: https://stackoverflow.com/a/414258
|
||||||
|
97
content/blog/blog-post-newsletter/index.md
Normal file
97
content/blog/blog-post-newsletter/index.md
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: Newsletter for my blog posts
|
||||||
|
date: 2022-04-30T01:00:14-05:00
|
||||||
|
lastmod: 2022-04-30T01:00:14-05:00
|
||||||
|
toc: true
|
||||||
|
comments: true
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- bbaovanc
|
||||||
|
|
||||||
|
categories:
|
||||||
|
- meta
|
||||||
|
- newsletter
|
||||||
|
|
||||||
|
tags:
|
||||||
|
- bobanews
|
||||||
|
- listmonk
|
||||||
|
- mailing-list
|
||||||
|
- newsletter
|
||||||
|
|
||||||
|
# this will be shown for the article in list pages and in the page metadata
|
||||||
|
# it can be either an image or video (this might change in the future, however)
|
||||||
|
resources:
|
||||||
|
- name: feature
|
||||||
|
src: listmonk-bobatheme-template.webp
|
||||||
|
title: My custom newsletter template based on my website's custom theme.
|
||||||
|
|
||||||
|
- name: listmonk-splash
|
||||||
|
src: listmonk-splash.webp
|
||||||
|
title: >-
|
||||||
|
Dashboard on listmonk ---
|
||||||
|
[source](https://listmonk.app/static/images/splash.png)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
I created a newsletter for blog posts on my website so you can sign up for email
|
||||||
|
notifications when I post new ones, so I have more than just an RSS feed.
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
**See the ["Signing Up" section]({{< ref "#signing-up" >}}) for instructions on
|
||||||
|
how to sign up for the newsletter.**
|
||||||
|
|
||||||
|
## Choosing the right mailing list manager
|
||||||
|
|
||||||
|
For my newsletter manager, I chose [listmonk](https://listmonk.app/). As I was
|
||||||
|
searching for self-hosted newsletter managers, it caught my eye because of how
|
||||||
|
modern and beautiful its interface looks. In fact, it was the only self-hosted
|
||||||
|
newsletter/mailing list manager I looked at that doesn't have an overall old and
|
||||||
|
ugly interface. Additionally, it has a live demo, so I was able to test it out
|
||||||
|
and see if it would be able to meet my (relatively low) requirements.
|
||||||
|
|
||||||
|
{{< figure src="listmonk-splash" >}}
|
||||||
|
|
||||||
|
I also tried out [GNU Mailman 3](https://www.list.org/) about a year ago.
|
||||||
|
However, I could not get it to integrate cleanly with my email
|
||||||
|
server[^mailman-mailcow]. listmonk can operate over SMTP, just like any other
|
||||||
|
program that sends mail. That makes the setup much less complicated, and I was
|
||||||
|
also able to set up the [official Docker
|
||||||
|
image](https://listmonk.app/docs/installation/#docker) using Docker Compose
|
||||||
|
setup just like the other programs I use.
|
||||||
|
|
||||||
|
If you're interested, the Docker Compose configuration files I ended up writing
|
||||||
|
are available at [configs/listmonk on my Gitea
|
||||||
|
instance](https://git.bbaovanc.com/configs/listmonk).
|
||||||
|
|
||||||
|
## Newsletter formatting
|
||||||
|
|
||||||
|
I ended up writing my own template for listmonk from scratch, based on the CSS
|
||||||
|
used in [bobatheme](https://github.com/BBaoVanC/bobatheme), the theme that my
|
||||||
|
website uses. Here's a screenshot of how it currently looks:
|
||||||
|
|
||||||
|
{{< figure src="feature" >}}
|
||||||
|
|
||||||
|
## Signing up
|
||||||
|
|
||||||
|
You can sign up to get emails about new posts on the [newsletter signup form
|
||||||
|
here](https://lists.bbaovanc.com/subscription/form). Make sure the box next to
|
||||||
|
the list labeled `bbaovanc.com Blog Posts` is checked. You'll need to provide an
|
||||||
|
email address, and optionally a nickname (or your real name if you want).
|
||||||
|
|
||||||
|
Right now there's only one list with public signup enabled, but that may change
|
||||||
|
if you're reading this in the future. In that case, you can sign up for as many
|
||||||
|
or as few lists as you want.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[^mailman-mailcow]: Mailman requires access to the mail server over
|
||||||
|
[LMTP](https://en.wikipedia.org/wiki/Local_Mail_Transfer_Protocol). However,
|
||||||
|
giving it access to my mail server over LMTP is not very easy because of the
|
||||||
|
setup that [Mailcow](https://mailcow.email) (my email server) uses. There *is*
|
||||||
|
an existing project called
|
||||||
|
[dockerized-mailcow-mailman](https://github.com/g4rf/dockerized-mailcow-mailman),
|
||||||
|
but it uses the Apache web server to serve the frontend. I'm not familiar with
|
||||||
|
Apache, and also I don't really want to complicate my Mailcow setup switching
|
||||||
|
to an almost completely different setup just for one little program.
|
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
content/blog/blog-post-newsletter/listmonk-splash.webp
Normal file
BIN
content/blog/blog-post-newsletter/listmonk-splash.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
@ -2,16 +2,20 @@
|
|||||||
|
|
||||||
title: Caddy is literally the best webserver
|
title: Caddy is literally the best webserver
|
||||||
date: 2021-11-13T00:43:35-06:00
|
date: 2021-11-13T00:43:35-06:00
|
||||||
|
lastmod: 2022-05-02T00:54:43-05:00
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
comments: true
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- bbaovanc
|
- bbaovanc
|
||||||
|
|
||||||
tags:
|
categories:
|
||||||
- linux
|
- linux
|
||||||
- webserver
|
- sysadmin
|
||||||
|
|
||||||
|
tags:
|
||||||
- caddy
|
- caddy
|
||||||
|
- webserver
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- name: feature
|
- name: feature
|
||||||
@ -37,14 +41,14 @@ for general use.
|
|||||||
## Built-in automatic HTTPS
|
## Built-in automatic HTTPS
|
||||||
|
|
||||||
Caddy can fetch certificates from Let's Encrypt and ZeroSSL out of the box.
|
Caddy can fetch certificates from Let's Encrypt and ZeroSSL out of the box.
|
||||||
HTTPS is enabled by default for eligible domains[^1], unless you explicitly tell
|
HTTPS is enabled by default for eligible domains[^hostname-requirements], unless
|
||||||
it not to.
|
you explicitly tell it not to.
|
||||||
|
|
||||||
### Incredible cipher security
|
### Incredible cipher security
|
||||||
|
|
||||||
Caddy has incredible defaults for TLS/SSL ciphers. Any site you host on Caddy
|
Caddy has incredible defaults for TLS/SSL ciphers. Any site you host on Caddy
|
||||||
gets a perfect score from [Qualys SSL Labs](https://www.ssllabs.com/ssltest/)
|
gets a perfect score from [Qualys SSL Labs](https://www.ssllabs.com/ssltest/)
|
||||||
out of the box.[^2]
|
out of the box.[^caddy-qualys-score]
|
||||||
|
|
||||||
## Dead simple configuration files: Caddy vs NGINX
|
## Dead simple configuration files: Caddy vs NGINX
|
||||||
|
|
||||||
@ -194,7 +198,7 @@ templates](https://pkg.go.dev/text/template). This means you can make simple
|
|||||||
dynamic content while only using Caddy!
|
dynamic content while only using Caddy!
|
||||||
|
|
||||||
In fact, the [official Caddy website](https://caddyserver.com) is generated
|
In fact, the [official Caddy website](https://caddyserver.com) is generated
|
||||||
entirely using Caddy's and Go templates![^3]
|
entirely using Caddy's and Go templates![^caddy-templating]
|
||||||
|
|
||||||
#### Error pages using HTTP Cats
|
#### Error pages using HTTP Cats
|
||||||
|
|
||||||
@ -217,12 +221,14 @@ border around the image.
|
|||||||
{{< figure src="caddy-browse" >}}
|
{{< figure src="caddy-browse" >}}
|
||||||
|
|
||||||
|
|
||||||
[^1]: The rules for what domains have automatic HTTPS by default are
|
[^hostname-requirements]: For the rules on what domains have automatic HTTPS by
|
||||||
[here](https://caddyserver.com/docs/automatic-https#hostname-requirements)
|
default, see ["Hostname requirements" on the Caddy
|
||||||
|
documentation](https://caddyserver.com/docs/automatic-https#hostname-requirements).
|
||||||
|
|
||||||
[^2]: SSL Labs caps the score to an A if HSTS isn't enabled. After enabling it,
|
[^caddy-qualys-score]: SSL Labs caps the score to an A if HSTS isn't enabled.
|
||||||
then you get a perfect A+ score. See
|
After enabling it, then you get a perfect A+ score. See [my website's
|
||||||
https://www.ssllabs.com/ssltest/analyze.html?d=bbaovanc.com&latest
|
score](https://www.ssllabs.com/ssltest/analyze.html?d=bbaovanc.com&latest)
|
||||||
([archived](https://archive.today/4JJDN)) for an example (bbaovanc.com).
|
([archived](https://archive.today/4JJDN)) for an example (bbaovanc.com).
|
||||||
|
|
||||||
[^3]: See more info [on the Caddy docs](https://caddyserver.com/docs/caddyfile/directives/templates#examples)
|
[^caddy-templating]: See more info about templating [on the Caddy
|
||||||
|
docs](https://caddyserver.com/docs/caddyfile/directives/templates#examples)
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
title: Checkra1n GUI on other Linux distros
|
title: Checkra1n GUI on other Linux distros
|
||||||
date: 2021-03-25T21:19:51-05:00
|
date: 2021-03-25T21:19:51-05:00
|
||||||
|
lastmod: 2021-10-16T21:25:38-05:00
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
comments: true
|
||||||
|
|
||||||
@ -11,11 +12,13 @@ authors:
|
|||||||
aliases:
|
aliases:
|
||||||
- posts/checkra1n-gui-on-other-distros/
|
- posts/checkra1n-gui-on-other-distros/
|
||||||
|
|
||||||
tags:
|
categories:
|
||||||
- guide
|
- guides
|
||||||
- linux
|
|
||||||
- archlinux
|
|
||||||
- jailbreak
|
- jailbreak
|
||||||
|
- linux
|
||||||
|
|
||||||
|
tags:
|
||||||
|
- arch-linux
|
||||||
- checkra1n
|
- checkra1n
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
# this is the title it generated. not even joking
|
# this is the title it generated. not even joking
|
||||||
title: Copilot
|
title: Copilot
|
||||||
date: 2021-11-07T16:17:15-06:00
|
date: 2021-11-07T16:17:15-06:00
|
||||||
|
lastmod: 2021-11-07T16:17:15-06:00
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
comments: true
|
||||||
|
|
||||||
@ -10,11 +11,15 @@ authors:
|
|||||||
- GitHub Copilot
|
- GitHub Copilot
|
||||||
- bbaovanc
|
- bbaovanc
|
||||||
|
|
||||||
tags:
|
categories:
|
||||||
- github-copilot
|
- github-copilot
|
||||||
|
|
||||||
|
tags:
|
||||||
|
- copilot
|
||||||
|
- github
|
||||||
|
|
||||||
series:
|
series:
|
||||||
- GitHub Copilot Experiments
|
- github-copilot-experiments
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
title: Put `(edited)` in the middle of a message in Discord
|
title: How to put `(edited)` in the middle of a message in Discord
|
||||||
date: 2021-03-25T18:48:34-05:00
|
date: 2021-03-25T18:48:34-05:00
|
||||||
toc: false
|
lastmod: 2022-04-08T23:29:41-05:00
|
||||||
|
toc: true
|
||||||
comments: true
|
comments: true
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
@ -11,10 +12,15 @@ authors:
|
|||||||
aliases:
|
aliases:
|
||||||
- posts/edited-in-middle-of-message-discord/
|
- posts/edited-in-middle-of-message-discord/
|
||||||
|
|
||||||
tags:
|
categories:
|
||||||
- tutorial
|
|
||||||
- discord
|
- discord
|
||||||
|
- guides
|
||||||
|
- tips-and-tricks
|
||||||
|
|
||||||
|
tags:
|
||||||
- discord-tricks
|
- discord-tricks
|
||||||
|
- right-to-left-embedding
|
||||||
|
- rle-character
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- name: feature
|
- name: feature
|
||||||
@ -23,23 +29,46 @@ resources:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
With a bit of trickery using the RLE character (U+202B), you can get the
|
You might have seen a trick on Discord where the little `(edited)` caption
|
||||||
`(edited)` text on a message to be somewhere other than at the end of the
|
appears in the middle of a message instead of at the end. With a small hack
|
||||||
message.
|
involving the [right-to-left embedding character
|
||||||
|
(U+202B)](https://unicode-explorer.com/c/202B), the `(edited)` text can be moved
|
||||||
|
to any location inside the message.
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
|
|
||||||
## Tutorial
|
## Tutorial
|
||||||
|
|
||||||
1. Copy the "right-to-left embedding" character
|
Before you start, copy the "right-to-left embedding" character
|
||||||
([U+202B](https://unicode-explorer.com/c/202B)) to your clipboard.
|
([U+202B](https://unicode-explorer.com/c/202B)) to your clipboard.
|
||||||
2. Open editing box of a message
|
|
||||||
3. Delete all text inside
|
|
||||||
4. Paste the character
|
|
||||||
5. Type the text you want on the right of `(edited)`
|
|
||||||
6. Press space and paste the character
|
|
||||||
7. Type the text you want on the left of `(edited)`
|
|
||||||
|
|
||||||
*This post was adapted from [gitea:bbaovanc/discord-tricks][1]*
|
### Method 1
|
||||||
|
|
||||||
|
With this method you write a placeholder message, and then replace it completely
|
||||||
|
with a new message containing the `(edited)` text inside it all at once.
|
||||||
|
|
||||||
|
1. Send a message with some random text (this text will be replaced entirely)
|
||||||
|
2. Start editing the message you just created and delete all the text inside
|
||||||
|
3. Type the text you want on the left of `(edited)`.
|
||||||
|
4. Type a space, then paste the character twice, and type another space.
|
||||||
|
5. Type the text you want on the right of `(edited)`.
|
||||||
|
6. Save the message.
|
||||||
|
|
||||||
|
You can also start at step 3 instead, send the message, and then perform any
|
||||||
|
edit on the message afterwards to add the `(edited)` text.
|
||||||
|
|
||||||
|
### Method 2
|
||||||
|
|
||||||
|
This method works by adding `(edited)` to the end of an existing message, and
|
||||||
|
then extra text to the right.
|
||||||
|
|
||||||
|
1. Send a message containing the text you want on the left of `(edited)`.
|
||||||
|
2. Start editing the message you just created
|
||||||
|
3. At the end of the message, type a space, then paste the character twice, and
|
||||||
|
type another space.
|
||||||
|
4. Type the text you want on the right of `(edited)`.
|
||||||
|
5. Save the message.
|
||||||
|
|
||||||
|
*This post was adapted from [bbaovanc/discord-tricks][1]*
|
||||||
|
|
||||||
[1]: https://git.bbaovanc.com/bbaovanc/discord-tricks
|
[1]: https://git.bbaovanc.com/bbaovanc/discord-tricks
|
||||||
|
@ -1,18 +1,24 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
title: GitHub Copilot experiments
|
title: Experimenting with GitHub Copilot
|
||||||
date: 2021-11-06T23:56:47-05:00
|
date: 2021-11-06T23:56:47-05:00
|
||||||
|
lastmod: 2021-11-08T21:46:39-06:00
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
comments: true
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- bbaovanc
|
- bbaovanc
|
||||||
|
|
||||||
tags:
|
categories:
|
||||||
- github-copilot
|
- github-copilot
|
||||||
|
|
||||||
|
tags:
|
||||||
|
- copilot
|
||||||
|
- github
|
||||||
|
- programming
|
||||||
|
|
||||||
series:
|
series:
|
||||||
- GitHub Copilot Experiments
|
- github-copilot-experiments
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- name: feature
|
- name: feature
|
||||||
|
@ -12,10 +12,13 @@ aliases:
|
|||||||
- /blog/posts/sed-text-substitution-in-discord/
|
- /blog/posts/sed-text-substitution-in-discord/
|
||||||
- /blog/posts/text-substitution-in-discord-using-sed/
|
- /blog/posts/text-substitution-in-discord-using-sed/
|
||||||
|
|
||||||
tags:
|
categories:
|
||||||
- tutorial
|
|
||||||
- discord
|
- discord
|
||||||
|
- tips-and-tricks
|
||||||
|
|
||||||
|
tags:
|
||||||
- discord-tricks
|
- discord-tricks
|
||||||
|
- sed
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- name: feature
|
- name: feature
|
||||||
|
@ -2,17 +2,20 @@
|
|||||||
|
|
||||||
title: The redesign of my website
|
title: The redesign of my website
|
||||||
date: 2021-10-18T14:03:05-05:00
|
date: 2021-10-18T14:03:05-05:00
|
||||||
|
lastmod: 2021-10-27T09:51:43-05:00
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
comments: true
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- bbaovanc
|
- bbaovanc
|
||||||
|
|
||||||
tags:
|
categories:
|
||||||
- announcement
|
|
||||||
- blog
|
|
||||||
- hugo
|
|
||||||
- bobatheme
|
- bobatheme
|
||||||
|
- meta
|
||||||
|
|
||||||
|
tags:
|
||||||
|
- hugo
|
||||||
|
- web-design
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- name: feature
|
- name: feature
|
||||||
|
@ -2,18 +2,23 @@
|
|||||||
|
|
||||||
title: Using Github Copilot to write a blog post
|
title: Using Github Copilot to write a blog post
|
||||||
date: 2021-11-07T16:17:15-06:00
|
date: 2021-11-07T16:17:15-06:00
|
||||||
|
lastmod: 2021-11-08T21:46:39-06:00
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
comments: true
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- bbaovanc
|
- bbaovanc
|
||||||
|
|
||||||
tags:
|
categories:
|
||||||
- github-copilot
|
- github-copilot
|
||||||
- blog
|
|
||||||
|
tags:
|
||||||
|
- copilot
|
||||||
|
- github
|
||||||
|
- markdown
|
||||||
|
|
||||||
series:
|
series:
|
||||||
- GitHub Copilot Experiments
|
- github-copilot-experiments
|
||||||
|
|
||||||
# this will be shown for the article in list pages and in the page metadata
|
# this will be shown for the article in list pages and in the page metadata
|
||||||
# it can be either an image or video (this might change in the future, however)
|
# it can be either an image or video (this might change in the future, however)
|
||||||
|
@ -2,16 +2,20 @@
|
|||||||
|
|
||||||
title: Youtube URL structures you should know
|
title: Youtube URL structures you should know
|
||||||
date: 2021-10-30T21:20:38-05:00
|
date: 2021-10-30T21:20:38-05:00
|
||||||
|
lastmod: 2022-05-02T00:59:25-05:00
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
comments: true
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- bbaovanc
|
- bbaovanc
|
||||||
|
|
||||||
tags:
|
categories:
|
||||||
- youtube
|
|
||||||
- url-structures
|
- url-structures
|
||||||
|
|
||||||
|
tags:
|
||||||
|
- query-parameters
|
||||||
|
- youtube
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- name: feature
|
- name: feature
|
||||||
src: youtube-url.webp
|
src: youtube-url.webp
|
||||||
@ -60,7 +64,7 @@ Here's the video I'll be using as an example:
|
|||||||
|
|
||||||
{{< youtube F6va6tg62qg >}}
|
{{< youtube F6va6tg62qg >}}
|
||||||
|
|
||||||
I embedded that video on my website with this code:[^1]
|
I embedded that video on my website with this code:[^hugo-shortcode]
|
||||||
|
|
||||||
```text
|
```text
|
||||||
{{</* youtube F6va6tg62qg */>}}
|
{{</* youtube F6va6tg62qg */>}}
|
||||||
@ -121,5 +125,9 @@ As far as I know, it's not possible to link to a playlist using `youtu.be`.
|
|||||||
[This Stack Exchange answer](https://webapps.stackexchange.com/a/9881) is a good
|
[This Stack Exchange answer](https://webapps.stackexchange.com/a/9881) is a good
|
||||||
reference for some other YouTube parameters.
|
reference for some other YouTube parameters.
|
||||||
|
|
||||||
[^1]: I use a static site generator called [Hugo](https://gohugo.io) for my
|
[^hugo-shortcode]: I use a static site generator called
|
||||||
website.
|
[Hugo](https://gohugo.io) for my website. It has a built in "shortcode" which
|
||||||
|
is a feature that allows me to embed certain code blocks into a page. One of
|
||||||
|
its shortcodes, named `youtube`, allows me to embed a YouTube video into my
|
||||||
|
post. You can read more info about [shortcodes on the Hugo
|
||||||
|
docs](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes)
|
||||||
|
12
content/categories/bobatheme/_index.md
Normal file
12
content/categories/bobatheme/_index.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: bobatheme
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Posts about bobatheme, my custom [Hugo][hugo-website] theme which I use on this
|
||||||
|
website.
|
||||||
|
|
||||||
|
[hugo-website]: https://gohugo.io
|
||||||
|
|
||||||
|
<!--more-->
|
14
content/categories/discord/_index.md
Normal file
14
content/categories/discord/_index.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: Discord
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
An extremely popular chat platform. You have to live under a rock to not know
|
||||||
|
what Discord is.
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
See also: the [discord-tricks tag][discord-tricks-tag].
|
||||||
|
|
||||||
|
[discord-tricks-tag]: {{< ref "/tags/discord-tricks/" >}}
|
14
content/categories/github-copilot/_index.md
Normal file
14
content/categories/github-copilot/_index.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: GitHub Copilot
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
An extension made by GitHub which provides artificial intelligence powered
|
||||||
|
autocomplete, trained on real open source code. It is intended to give smarter
|
||||||
|
results than a typical autocomplete solution can, such as automatically
|
||||||
|
generating [boilerplate code][boilerplate-code].
|
||||||
|
|
||||||
|
[boilerplate-code]: https://en.wikipedia.org/wiki/Boilerplate_code
|
||||||
|
|
||||||
|
<!--more-->
|
9
content/categories/guides/_index.md
Normal file
9
content/categories/guides/_index.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: Guides
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Any kind of guide or tutorial.
|
||||||
|
|
||||||
|
<!--more-->
|
9
content/categories/jailbreak/_index.md
Normal file
9
content/categories/jailbreak/_index.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: Jailbreak
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Anything related to jailbreaking (iOS or other Apple devices).
|
||||||
|
|
||||||
|
<!--more-->
|
9
content/categories/linux/_index.md
Normal file
9
content/categories/linux/_index.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: Linux
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Anything relating to Linux (the kernel or operating systems).
|
||||||
|
|
||||||
|
<!--more-->
|
9
content/categories/meta/_index.md
Normal file
9
content/categories/meta/_index.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: Meta
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Posts talking about my website.
|
||||||
|
|
||||||
|
<!--more-->
|
15
content/categories/newsletter/_index.md
Normal file
15
content/categories/newsletter/_index.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: Newsletter
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Blog posts related to my newsletter.
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
You can sign up for my newsletter [using this signup form][signup-form]. Make
|
||||||
|
sure that you tick the box labeled `bbaovanc.com Blog Posts`. A nickname (or
|
||||||
|
your real name if you prefer) is optional.
|
||||||
|
|
||||||
|
[signup-form]: https://lists.bbaovanc.com/subscription/form
|
10
content/categories/sysadmin/_index.md
Normal file
10
content/categories/sysadmin/_index.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: Sysadmin
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Anything relating to managing servers (usually relating to Linux). "Sysadmin" is
|
||||||
|
short for "system administrator".
|
||||||
|
|
||||||
|
<!--more-->
|
10
content/categories/tips-and-tricks/_index.md
Normal file
10
content/categories/tips-and-tricks/_index.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: Tips and Tricks
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Random little tips and/or tricks that I want to share. Will probably be mostly
|
||||||
|
short articles (but that's not a bad thing).
|
||||||
|
|
||||||
|
<!--more-->
|
9
content/categories/url-structures/_index.md
Normal file
9
content/categories/url-structures/_index.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: URL Structures
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Posts about URL conventions on certain websites or services.
|
||||||
|
|
||||||
|
<!--more-->
|
@ -3,7 +3,7 @@
|
|||||||
title: Contact
|
title: Contact
|
||||||
menu: main
|
menu: main
|
||||||
toc: false
|
toc: false
|
||||||
comments: false
|
comments: true
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- bbaovanc
|
- bbaovanc
|
||||||
@ -13,5 +13,8 @@ description: >-
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- Email: [contact@bbaovanc.com](mailto:contact@bbaovanc.com)
|
- Email: bbaovanc@bbaovanc.com
|
||||||
- Matrix: [@bbaovanc:boba.best](https://matrix.to/#/@bbaovanc:boba.best)
|
- If needed, encrypt your email with [my PGP
|
||||||
|
key](https://keyserver.ubuntu.com/pks/lookup?search=bbaovanc%40bbaovanc.com&fingerprint=on&op=index)
|
||||||
|
- bobaforum (ask me questions publicly, I guess like a Q&A):
|
||||||
|
https://forum.bbaovanc.com/t/ask-me
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
title: Donate
|
title: Donate
|
||||||
menu: main
|
menu: main
|
||||||
toc: false
|
toc: false
|
||||||
comments: false
|
comments: true
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- bbaovanc
|
- bbaovanc
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
title: Links
|
title: Links
|
||||||
menu: main
|
menu: main
|
||||||
toc: true
|
toc: true
|
||||||
comments: false
|
comments: true
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- bbaovanc
|
- bbaovanc
|
||||||
@ -18,41 +18,58 @@ description: >-
|
|||||||
|
|
||||||
## Other
|
## Other
|
||||||
|
|
||||||
- [GitHub](https://github.com/BBaoVanC/)
|
- [GitHub](https://github.com/BBaoVanC/) - my GitHub profile
|
||||||
- [boba.best](https://boba.best/)
|
- [boba.best](https://boba.best/)
|
||||||
|
|
||||||
## My Website
|
## My Website
|
||||||
|
|
||||||
- [Homepage](https://bbaovanc.com/) - theme:
|
- [bbaovanc.com source code](https://github.com/BBaoVanC/bbaovanc.com)
|
||||||
[bobatheme](https://github.com/BBaoVanC/bobatheme)
|
- [bobatheme](https://github.com/BBaoVanC/bobatheme) - theme for this
|
||||||
- [Blog](https://bbaovanc.com/blog/)
|
website
|
||||||
- [Status Page](https://status.bbaovanc.com/)
|
- [bobaforum](https://forum.bbaovanc.com) - my public forum
|
||||||
- [Searx Instance](https://search.bbaovanc.com/) -
|
- [Searx Instance](https://search.bbaovanc.com/) - privacy-respecting search
|
||||||
[source code](https://github.com/BBaoVanC/searx)
|
engine
|
||||||
- [Gitea Instance](https://git.bbaovanc.com/)
|
- [Gitea Instance](https://git.bbaovanc.com/) - mostly just mirrors of my GitHub
|
||||||
|
repos
|
||||||
|
|
||||||
## My Software
|
## My Projects
|
||||||
|
|
||||||
- [smines](https://github.com/BBaoVanC/smines)
|
- [smines](https://github.com/BBaoVanC/smines) - TUI minesweeper in C, made for
|
||||||
- [imgupload.py](https://github.com/imgupload-py/imgupload.py)
|
practice
|
||||||
- [mojiman](https://github.com/BBaoVanC/mojiman)
|
- [imgupload.py](https://github.com/imgupload-py/imgupload.py) - simple image
|
||||||
- [pynamegen](https://git.bbaovanc.com/bbaovanc/pynamegen)
|
uploading server written with Python Flask
|
||||||
|
- [mojiman](https://github.com/BBaoVanC/mojiman) - program I made to learn Rust
|
||||||
|
- [pynamegen](https://git.bbaovanc.com/bbaovanc/pynamegen) - name generator
|
||||||
|
written in Python
|
||||||
- [libnamegen](https://git.bbaovanc.com/bbaovanc/libnamegen)
|
- [libnamegen](https://git.bbaovanc.com/bbaovanc/libnamegen)
|
||||||
- [liblistloader](https://git.bbaovanc.com/bbaovanc/liblistloader)
|
- [liblistloader](https://git.bbaovanc.com/bbaovanc/liblistloader)
|
||||||
- [libprogress](https://git.bbaovanc.com/bbaovanc/libprogress)
|
- [libprogress](https://git.bbaovanc.com/bbaovanc/libprogress)
|
||||||
- [RokuRemote](https://github.com/BBaoVanC/RokuRemote)
|
- [RokuRemote](https://github.com/BBaoVanC/RokuRemote) - keyboard-based remote
|
||||||
|
control for Roku
|
||||||
|
|
||||||
## My Configurations
|
## My Configurations
|
||||||
|
|
||||||
- [dotfiles](https://github.com/BBaoVanC/dotfiles)
|
- [dotfiles](https://github.com/BBaoVanC/dotfiles) - main repository with my
|
||||||
- [dwm](https://github.com/BBaoVanC/.dwm)
|
configs
|
||||||
- [dwm-flexipatch](https://github.com/BBaoVanC/dwm-flexipatch)
|
- [docker-dotfiles](https://github.com/BBaoVanC/docker-dotfiles) - Docker image
|
||||||
- [dwmblocks](https://github.com/BBaoVanC/dwmblocks)
|
that contains my dotfiles
|
||||||
- [dmenu](https://github.com/BBaoVanC/dmenu)
|
- [onehalf](https://github.com/BBaoVanC/onehalf) - the theme I use on my
|
||||||
|
terminal
|
||||||
|
|
||||||
### Archived
|
### Archived
|
||||||
|
|
||||||
- [dwm](https://github.com/BBaoVanC/dwm)
|
- [dwm](https://github.com/BBaoVanC/.dwm) - outer repo with submodules for my
|
||||||
- [st](https://github.com/BBaoVanC/st)
|
various dwm-related configs
|
||||||
- [slstatus](https://github.com/BBaoVanC/slstatus)
|
- [dwm-flexipatch](https://github.com/BBaoVanC/dwm-flexipatch) - see
|
||||||
- [xmonad](https://github.com/BBaoVanC/.xmonad)
|
https://github.com/bakkeby/dwm-flexipatch
|
||||||
|
- [dwmblocks](https://github.com/BBaoVanC/dwmblocks) - DWM status bar, see
|
||||||
|
https://github.com/torrinfail/dwmblocks
|
||||||
|
- [dmenu](https://github.com/BBaoVanC/dmenu) - dynamic menu, see
|
||||||
|
https://tools.suckless.org/dmenu/
|
||||||
|
- [st](https://github.com/BBaoVanC/st) - simple terminal, see
|
||||||
|
https://st.suckless.org
|
||||||
|
- [slstatus](https://github.com/BBaoVanC/slstatus) - suckless status, see
|
||||||
|
https://tools.suckless.org/slstatus/
|
||||||
|
- [dwm](https://github.com/BBaoVanC/dwm) - dynamic window manager, see
|
||||||
|
https://dwm.suckless.org/
|
||||||
|
- [xmonad](https://github.com/BBaoVanC/.xmonad) - see https://xmonad.org
|
||||||
|
4
demo.sh
4
demo.sh
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh -x
|
#!/bin/sh -x
|
||||||
rm -rf public/
|
rm -rf public/
|
||||||
hugo -D --baseURL "https://demo.bbaovanc.com/test/$1"
|
HUGO_ENABLEMISSINGTRANSLATIONPLACEHOLDERS=true hugo -D --baseURL "https://demo.bbaovanc.com/test/$1"
|
||||||
rsync -atvPzc --delete public/ bbaosrv:/var/www/demo.bbaovanc.com/test/$1/
|
rsync -avPzc --delete-delay public/ bbaosrv:/var/www/demo.bbaovanc.com/test/$1/
|
||||||
|
4
layouts/partials/additional-head.html
Normal file
4
layouts/partials/additional-head.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{{ if eq .Site.BaseURL "https://bbaovanc.com" }}
|
||||||
|
<script defer data-domain="bbaovanc.com" src="https://plausible.bbaovanc.com/js/bobalytics.outbound-links.js"></script>
|
||||||
|
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
|
||||||
|
{{ end }}
|
@ -1,63 +1,113 @@
|
|||||||
{{ if ne .Site.BaseURL "https://bbaovanc.com" }}
|
<!-- idk why this is even required
|
||||||
<i>Comment section is not available during development previews.</i>
|
vim: ft=html
|
||||||
{{ else }}
|
-->
|
||||||
|
<style>
|
||||||
|
#isso-thread > h4 {
|
||||||
|
color: var(--text-normal);
|
||||||
|
}
|
||||||
|
|
||||||
|
#isso-root .isso-comment:not(:first-of-type),
|
||||||
|
.isso-follow-up .isso-comment {
|
||||||
|
border-color: var(--background-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.isso-comment > .isso-text-wrapper > .isso-comment-header .isso-author,
|
||||||
|
.isso-comment > .isso-text-wrapper > .isso-comment-footer,
|
||||||
|
.isso-comment > .isso-text-wrapper > .isso-comment-footer .isso-votes {
|
||||||
|
color: var(--text-normal);
|
||||||
|
opacity: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.isso-comment.isso-is-page-author > .isso-text-wrapper {
|
||||||
|
background-color: var(--background-accent);
|
||||||
|
}
|
||||||
|
.isso-comment.isso-is-page-author > .isso-text-wrapper > .isso-comment-header > .isso-author {
|
||||||
|
color: var(--link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.isso-postbox > .isso-form-wrapper .isso-preview {
|
||||||
|
color: var(--text-normal);
|
||||||
|
background: var(--background-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.isso-comment > .isso-text-wrapper > .isso-comment-footer a,
|
||||||
|
.isso-comment > .isso-text-wrapper > .isso-comment-footer a:hover {
|
||||||
|
color: var(--link-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.isso-comment > .isso-text-wrapper > .isso-comment-footer a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.isso-postbox > .isso-form-wrapper > .isso-auth-section .isso-input-wrapper input,
|
||||||
|
.isso-postbox > .isso-form-wrapper > .isso-auth-section .isso-post-action > input,
|
||||||
|
#isso-thread .isso-textarea,
|
||||||
|
.isso-postbox > .isso-form-wrapper .isso-preview {
|
||||||
|
color: var(--text-normal);
|
||||||
|
background-color: var(--background-2);
|
||||||
|
border-color: var(--background-4) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.isso-postbox > .isso-form-wrapper > .isso-auth-section .isso-post-action > input:hover {
|
||||||
|
background-color: var(--background-4);
|
||||||
|
}
|
||||||
|
.isso-postbox > .isso-form-wrapper > .isso-auth-section .isso-post-action > input:active {
|
||||||
|
background-color: var(--background-5);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 style="margin-bottom: 0;">Comments</h2>
|
||||||
|
<small>
|
||||||
|
<p style="margin: 0;">
|
||||||
|
If you provide an email address, you can enable notifications for
|
||||||
|
replies to your comment. It will not be shown publicly.
|
||||||
|
</p>
|
||||||
|
</small>
|
||||||
|
|
||||||
<noscript>
|
<noscript>
|
||||||
<style>
|
<i>Enable JavaScript to see the comment section.</i>
|
||||||
#comments-hr {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<small>
|
|
||||||
<i>Enable JavaScript to see the comment section.</i>
|
|
||||||
</small>
|
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|
||||||
{{ $url := .Permalink }}
|
{{ $url := .Permalink }}
|
||||||
|
|
||||||
{{ if .IsTranslated }}
|
{{ if .IsTranslated }}
|
||||||
{{ with index .AllTranslations 0 }}
|
{{ with index .AllTranslations 0 }}
|
||||||
{{ $url = .Permalink }}
|
{{ $url = .Permalink }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<script>
|
|
||||||
var remark_config = {
|
|
||||||
host: "https://remark.bbaovanc.com",
|
|
||||||
site_id: "bbaovanc.com",
|
|
||||||
components: [
|
|
||||||
"embed",
|
|
||||||
//"last-comments",
|
|
||||||
//"counter",
|
|
||||||
],
|
|
||||||
url: "{{ $url }}", // make this permalink the main language so all languages have the same comments
|
|
||||||
max_shown_comments: 10,
|
|
||||||
page_title: "{{ .Title }}",
|
|
||||||
locale: "{{ .Language.Lang }}",
|
|
||||||
show_email_subscription: true,
|
|
||||||
simple_view: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (window.matchMedia('(prefers-color-scheme: light)').matches) {
|
<script data-isso-id="{{ $url }}"
|
||||||
remark_config["theme"] = "light";
|
data-isso-default-lang="{{ .Language.Lang }}"
|
||||||
} else {
|
data-isso-css="true"
|
||||||
remark_config["theme"] = "dark";
|
data-isso-max-comments-top="10"
|
||||||
}
|
data-isso-max-comments-nested="5"
|
||||||
</script>
|
data-isso-reveal-on-click="5"
|
||||||
<script>!function(e,n){for(var o=0;o<e.length;o++){var r=n.createElement("script"),c=".js",d=n.head||n.body;"noModule"in r?(r.type="module",c=".mjs"):r.async=!0,r.defer=!0,r.src=remark_config.host+"/web/"+e[o]+c,d.appendChild(r)}}(remark_config.components||["embed"],document);</script>
|
{{/*
|
||||||
|
data-isso-avatar-bg="#111"
|
||||||
|
data-isso-avatar-fg="#9abf88 #5698c4 #e279a3 #9163b6 ..."
|
||||||
|
*/}}
|
||||||
|
data-isso-vote="true"
|
||||||
|
{{/*
|
||||||
|
data-isso-vote-levels=""
|
||||||
|
*/}}
|
||||||
|
data-isso-feed="false"
|
||||||
|
data-isso-require-email="false"
|
||||||
|
data-isso-reply-notifications="true"
|
||||||
|
data-isso-reply-notifications-default-enabled="true"
|
||||||
|
|
||||||
<script>
|
{{ with (.GetTerms "authors") }}
|
||||||
const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: light)');
|
{{ $authorHashes := slice }}
|
||||||
darkModeMediaQuery.addListener((e) => {
|
{{ range . }}
|
||||||
if (e.matches) {
|
{{ with .Params.issoUserID }}
|
||||||
window.REMARK42.changeTheme('light');
|
{{ $authorHashes = $authorHashes | append . }}
|
||||||
} else {
|
{{ end }}
|
||||||
window.REMARK42.changeTheme('dark');
|
{{ end }}
|
||||||
}
|
|
||||||
});
|
data-isso-page-author-hashes="{{ delimit $authorHashes "," }}"
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
src="https://isso.bbaovanc.com/js/embed.min.js">
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="remark42"></div>
|
<section id="isso-thread"></section>
|
||||||
|
|
||||||
{{ end }}
|
|
||||||
|
22
lighthouserc.yaml
Normal file
22
lighthouserc.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
ci:
|
||||||
|
collect:
|
||||||
|
url:
|
||||||
|
- https://localhost/ # homepage
|
||||||
|
- https://localhost/links/ # very simple page
|
||||||
|
|
||||||
|
- https://localhost/blog/ # list page
|
||||||
|
- https://localhost/blog/the-redesign-of-my-website/ # average post, but no footnotes
|
||||||
|
- https://localhost/blog/blog-post-newsletter/ # average post, but WITH footnotes
|
||||||
|
- https://localhost/blog/caddy-is-the-best-webserver/ # another average post with footnotes, WITH code blocks
|
||||||
|
- https://localhost/blog/youtube-url-structures-you-should-know/ # youtube embed
|
||||||
|
- https://localhost/blog/copilot-post/ # lots of code blocks & text
|
||||||
|
- https://localhost/blog/github-copilot-experiments/ # heavy use of images
|
||||||
|
|
||||||
|
- https://localhost/categories/
|
||||||
|
- https://localhost/categories/github-copilot/
|
||||||
|
|
||||||
|
- https://localhost/tags/
|
||||||
|
- https://localhost/tags/discord-tricks/
|
||||||
|
startServerCommand: sudo caddy run
|
||||||
|
settings:
|
||||||
|
chromeFlags: "--ignore-certificate-errors --throttling.cpuSlowdownMultiplier=2.4"
|
Binary file not shown.
Before Width: | Height: | Size: 4.6 KiB |
BIN
static/apple-touch-icon.png
Normal file
BIN
static/apple-touch-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.2 KiB |
Submodule themes/bobatheme updated: 161c68d16c...684769df5a
Reference in New Issue
Block a user