Skip to content

Commit

Permalink
Lint project (#2)
Browse files Browse the repository at this point in the history
* Move to new theme and major updates (#1)

- Update the theme of the website to the typography theme
- Move to GitHub Actions
- Rebuild site
- Clean-up
- General improvements

* turn off umami for dev

* lint project

* update workflows and add linter

* update workflows

* add branches to actions

* update actions

* update theme

* update submodule

* remove gitmodules

* remove submodule

* readd submodule

* update branch

* update submodule

* update theme

* update theme

* add highlight style option

* move data files

* lint, style, and add sidenotes

* update theme

* remove large file

* add lfs

* add rds files to lfs

* update submodule

* update submodule branch

* trigger

* add requirements for nyt books post

* fix conflicts

* readd leaflet
  • Loading branch information
danielroelfs authored Nov 6, 2023
1 parent 5d7f3b0 commit 1043ce7
Show file tree
Hide file tree
Showing 71 changed files with 5,981 additions and 3,604 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.rds filter=lfs diff=lfs merge=lfs -text
28 changes: 28 additions & 0 deletions .github/workflows/lint-project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint project

on:
push:

jobs:
lint-project:
runs-on: ubuntu-latest
steps:
- name: 🛎 Check out repo
uses: actions/checkout@v3
with:
submodules: recursive

- name: 🏗️ Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: 🛠️ Install lintr
run: install.packages("lintr")
shell: Rscript {0}

- name: ✨ Lint root directory
run: lintr::lint_dir()
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
18 changes: 5 additions & 13 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,30 @@ name: Test build

on:
push:
branches:
- update-theme

jobs:
build:

test-build:
runs-on: ubuntu-latest

env:
HUGO_VERSION: 0.116.1

steps:
- name: 🛎 Check out repo
uses: actions/checkout@v3
with:
ref: update-theme
fetch-depth: 1
submodules: recursive

- name: Use Node.js
uses: actions/setup-node@master
with:
node-version: 10.x

- run: npm i -g postcss postcss-cli autoprefixer

- name: 🤵 Install Hugo
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: 🧹 Clean site
run: |
if [ -d "public" ]; then
rm -rf public/*
fi
- name: 🍳 Build site
run: |
hugo --gc --minify
10 changes: 10 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
linters: linters_with_defaults(
line_length_linter(80),
commented_code_linter = NULL
)
exclusions: list(
"content/blog/2021-easy-map-norway/save_splmaps_data.R",
"content/blog/2022-dutch-performance-olympic-speed-skating/index.qmd",
"content/blog/2023-sunrise-sunset-differences/index.qmd",
"renv/"
)
4 changes: 3 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ ignoreFiles = ["\\.qmd$", "\\.ipynb$", "\\.Rmd$", "\\.Rmarkdown$", "_cache$", "i

favicon = "avatar.png"

highlightstyle = "foundation"

iconsource = "simple-icons"

description = "Daniel Roelfs' personal website"
keywords = "blog, personal, coding"

customcss = ["custom_style.css"]

umami = true
umami = false
umamilink = "https://analytics-danielroelfs.netlify.app/script.js"
umamiid = "da48a88a-2e87-4024-8c99-639222aab54d"

Expand Down
3 changes: 3 additions & 0 deletions content/blog/2019-analyzing-bach/data/places.rds
Git LFS file not shown
3 changes: 3 additions & 0 deletions content/blog/2019-analyzing-bach/data/scraped_data.rds
Git LFS file not shown
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
381 changes: 228 additions & 153 deletions content/blog/2019-analyzing-bach/index.md

Large diffs are not rendered by default.

Loading

0 comments on commit 1043ce7

Please sign in to comment.