Skip to content

Commit

Permalink
chore: cleanup and improvements
Browse files Browse the repository at this point in the history
removign content and adding linters

Signed-off-by: Simon Schrottner <[email protected]>
  • Loading branch information
aepfli committed Mar 13, 2023
1 parent f217b7b commit f5f4e04
Show file tree
Hide file tree
Showing 245 changed files with 407 additions and 10,193 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/htmltest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: HtmlTest

on:
push:
branches:
- 'main'
- '[0-9]+.[1-9][0-9]*.x'
pull_request:
branches:
- 'main'
- '[0-9]+.[1-9][0-9]*.x'

jobs:
htmltest:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: true

- name: Cache HTMLTest packages
uses: actions/cache@v3
with:
path: |
docs/tmp/.htmltest
key: ${{ runner.os }}-htmltest

- name: Cache Hugo packages
uses: actions/cache@v3
with:
path: |
docs/tmp/.hugo
key: ${{ runner.os }}-hugo

- name: Check HTML
run: make htmltest
71 changes: 0 additions & 71 deletions .github/workflows/hugo.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/markdown-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Markdown checks

on:
push:
branches:
- 'main'
- '[0-9]+.[1-9][0-9]*.x'
paths:
- '**.md'
pull_request:
branches:
- 'main'
- '[0-9]+.[1-9][0-9]*.x'
paths:
- '**.md'

env:
GO_VERSION: "~1.19"

defaults:
run:
shell: bash

jobs:
markdown-lint:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Run TOC generation
run: |
FILES=`find . -type f -name '*.md' -not -path './.github/*' -not -path './node_modules/*' | sort`
for f in $FILES; do
if grep -q '<!-- tocstop -->' $$f; then
echo "Checking TOC for ${f}";
npx markdown-toc --no-first-h1 --no-stripHeadingTags -i ${f} || exit 1;
else
echo Skipping ${f};
fi;
done
- name: Check TOC
run: |
git diff --exit-code '*.md' || (echo "Table of Contents is out of date. Please update the following files: $(git diff --name-status --exit-code)" && exit 1)
- name: Lint Markdown files
run: make markdownlint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/public/
/data/
/node_modules/
/tmp
8 changes: 8 additions & 0 deletions .htmltest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
CheckDoctype: false
IgnoreDirs:
- favicons
IgnoreURLs:
- "linkedin.com"
- "localhost"
StripQueryString: false
20 changes: 20 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
config:
line-length:
line_length: 120
tables: false
code_blocks: false
no-inline-html:
allowed_elements:
- details
- summary
github-admonition: true
max-one-sentence-per-line: true

customRules:
- "./rules/admonition.js"
- "./rules/max-one-sentence-per-line.js"

ignores:
- "CHANGELOG.md"
- "node_modules"
- "tmp"
Loading

0 comments on commit f5f4e04

Please sign in to comment.