Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: SEO audit

on:
pull_request:
branches:
- master
schedule:
# Mondays at 06:00 UTC. Search engines change what they reward without any
# commit on our side, so the audit runs on a timer as well as per change.
- cron: "0 6 * * 1"
workflow_dispatch:

permissions:
contents: read

jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Ruby
uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb # v1.257.0
with:
ruby-version: "3.2.0"
bundler-cache: true

# Built exactly as pages.yml builds it. A development build has no
# site.url, which leaves rel=canonical relative and robots.txt without a
# sitemap line, and Lighthouse fails both of those on a site that is
# actually fine in production.
- name: Build site
env:
JEKYLL_ENV: production
run: bundle exec jekyll build --config _config.yml,_config_production.yml

- name: Set up Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"

- name: Run Lighthouse CI
run: npx --yes @lhci/cli@0.14.x autorun --config=.lighthouserc.json

- name: Upload Lighthouse reports
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: lighthouse-reports
path: .lighthouseci/
retention-days: 30
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ _site
.sass-cache
.jekyll-metadata

# lighthouse-ci report output
.lighthouseci

# vim
wap
[._]*.s[a-v][a-z]
Expand Down
29 changes: 29 additions & 0 deletions .lighthouserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"ci": {
"collect": {
"staticDistDir": "./_site",
"url": [
"http://localhost/index.html",
"http://localhost/about/index.html",
"http://localhost/tags/index.html",
"http://localhost/tags/python/index.html",
"http://localhost/2019/01/12/python-3-7-feature-walkthrough.html",
"http://localhost/2017/08/28/how_to_repair_a_broken_grub_in_ubuntu.html",
"http://localhost/book/review/2017/02/28/book-review-introduction-to-the-commandline.html"
],
"numberOfRuns": 1,
"settings": {
"onlyCategories": ["seo"]
}
},
"assert": {
"assertions": {
"categories:seo": ["error", { "minScore": 1 }]
}
},
"upload": {
"target": "filesystem",
"outputDir": "./.lighthouseci"
}
}
}
5 changes: 5 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ twitter_username: jaysinhp
github_username: ultimatecoder

# Build settings
# Build in UTC so a local build produces the same post URLs as CI, which
# runs in UTC. Without this the same commit yields different permalinks
# depending on the machine timezone.
timezone: UTC

markdown: kramdown
theme: minima
plugins:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ should be `args=$1`. I myself has corrected the typographical error in the
book. This change will be published maybe in the next release of this book.

If you are encountering any mistakes while reading, I request you to fix the
change [here](http://write.flossmanuals.net/command-line/introduction/). The
change in [the FLOSS Manuals editing
interface](http://write.flossmanuals.net/command-line/introduction/). The
interface for editing the book is beginner friendly. It took less than 5
minutes to drive the change.

Expand Down
6 changes: 3 additions & 3 deletions _posts/2019-01-13-python-3-7-feature-walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ migrate to the hash-based approach.

I hope you were able to learn something new by reading this post. If you want to
read an in-depth discussion on each feature introduced in Python 3.7, then
please read
[this](https://docs.python.org/3.7/whatsnew/changelog.html#python-3-7-0-final)
official post. Happy hacking!
please read the
[official Python 3.7 changelog](https://docs.python.org/3.7/whatsnew/changelog.html#python-3-7-0-final).
Happy hacking!


###### Proofreaders: [Jason Braganza](https://janusworx.com/), Ninpo, basen_ from #python at Freenode, Ultron from #python-offtopic at Freenode, up|ime from ##English at Freenode
Loading