Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
b61e0ad
Delete .github/workflows/master_programming-quotes-api.yml
norwd Oct 15, 2025
5a78368
Delete package.json
norwd Oct 15, 2025
61c31f4
Delete package-lock.json
norwd Oct 15, 2025
de84269
Delete eslint.config.mjs
norwd Oct 15, 2025
7382ad8
Delete .gitignore
norwd Oct 15, 2025
b5d6f0f
Delete .eslintrc.json
norwd Oct 15, 2025
f5f8c89
Delete README.md
norwd Oct 15, 2025
a26dade
Delete src/app.js
norwd Oct 15, 2025
a3f9dd0
Delete src/auth directory
norwd Oct 15, 2025
70a2a26
Delete src/commons directory
norwd Oct 15, 2025
e311df0
Delete src/middleware directory
norwd Oct 15, 2025
c955112
Delete src/users directory
norwd Oct 15, 2025
00cabdb
Delete src/quotes directory
norwd Oct 15, 2025
ea206b7
Create .nojekyll
norwd Oct 15, 2025
2e4792f
Create LICENSE
norwd Oct 16, 2025
ad5ba12
Create build.yml
norwd Oct 16, 2025
fda9e47
Create deploy.yml
norwd Oct 16, 2025
427ebdf
Create header.html
norwd Oct 16, 2025
fa67187
Create main.css
norwd Oct 16, 2025
a038336
Correct humans.md generation
norwd Oct 16, 2025
016eeab
Fix syntax error
norwd Oct 16, 2025
5b8b8dc
Fix syntax error
norwd Oct 16, 2025
7995824
Fix syntax error
norwd Oct 16, 2025
e70e89f
Update build.yml
norwd Oct 16, 2025
82fab34
Update build.yml
norwd Oct 16, 2025
d0521f7
Create README.md
norwd Oct 16, 2025
fd851fb
Remove quotes from known fascist
norwd Oct 16, 2025
d629c9b
Create `qotd.json`
norwd Oct 16, 2025
2f6d55f
Update deploy.yml
norwd Oct 16, 2025
146b3be
Create `random.json`
norwd Oct 16, 2025
c27e088
Create json files with markdown derivatives before html generation
norwd Oct 16, 2025
fef5c93
Update build.yml
norwd Oct 16, 2025
bedf1db
Add explicitly English quotes
norwd Oct 16, 2025
04418b7
Create `/quotes/{lang}.json`
norwd Oct 16, 2025
79af7a4
Update documentation
norwd Oct 16, 2025
c1b4733
Update build.yml
norwd Oct 16, 2025
a676fc7
Move `/qotd` and `/random` to makefile
norwd Oct 16, 2025
eb80a55
Fix syntax error
norwd Oct 16, 2025
55e43e7
Rework dependency order
norwd Oct 16, 2025
8b23dbc
Update README.md
norwd Oct 16, 2025
114894f
Add markdown vars
norwd Oct 16, 2025
89e64b9
Make index from README
norwd Oct 16, 2025
4dc128f
Update build.yml
norwd Oct 16, 2025
8f958df
Move language files into Makefile
norwd Oct 16, 2025
a7a824f
Fix doubleups
norwd Oct 17, 2025
ca5c0a6
Generate markdown for large quotes
norwd Oct 17, 2025
ad74e07
Update build.yml
norwd Oct 17, 2025
29d937f
Update build.yml
norwd Oct 17, 2025
31cca98
Update build.yml
norwd Oct 17, 2025
6353a5f
Update README.md
norwd Oct 17, 2025
7d13f6b
Update build.yml
norwd Oct 17, 2025
7aa6ec2
Fix `$$`
norwd Oct 17, 2025
462eff8
Update build.yml
norwd Oct 17, 2025
5ce3aaa
Update build.yml
norwd Oct 17, 2025
e96de7d
Create Makefile
norwd Oct 17, 2025
fa85c3b
Update Makefile
norwd Oct 17, 2025
d0eaa0b
Make Makefile self executing
norwd Oct 17, 2025
1361892
Execute Makefile from source
norwd Oct 17, 2025
752690d
Merge branch 'master' of https://github.com/norwd/quotes
norwd Oct 17, 2025
cf826b0
Create config.mk
norwd Oct 17, 2025
c86bcb8
Add `OID_ENDPOINTS.mk`
norwd Oct 17, 2025
e9577a4
Merge branch 'master' of https://github.com/norwd/quotes
norwd Oct 17, 2025
e40cdb2
Make OID specific files generated one-by-one
norwd Oct 17, 2025
88cf5a1
Generate md/html/txt files for individual quotes by OID
norwd Oct 17, 2025
8b7201e
Ignore mk configs
norwd Oct 17, 2025
fa7ed57
Move authors.yaml creation into Makefile
norwd Oct 17, 2025
9d60a8c
Escape dollar sign
norwd Oct 17, 2025
9cbae9f
Update build.yml
norwd Oct 17, 2025
f6c333f
Fix attribution error due to shallow clone
norwd Oct 19, 2025
9ba802f
Move header out of root
norwd Oct 19, 2025
f918d82
Ignore src/ in webroot
norwd Oct 19, 2025
8e5da68
Merge branch 'master' of https://github.com/norwd/quotes
norwd Oct 19, 2025
1366043
Debug tidy error
norwd Oct 19, 2025
c634b89
Fix tidy error on partial file
norwd Oct 19, 2025
f398777
Use tee for authors.yaml generation
norwd Oct 19, 2025
9ea93c6
Add generation for authors endpoint
norwd Oct 19, 2025
b9e683c
Reduce number of commands executed for tidy
norwd Oct 19, 2025
10b1809
Add clean target
norwd Oct 19, 2025
6311ff4
Generate config for author specific quote files
norwd Oct 19, 2025
28ba860
Add auth endpoints to array-type endpoints
norwd Oct 19, 2025
40bb1b0
Fix ID for Edsger W. Dijkstra
norwd Oct 19, 2025
7b5ccac
Add target for author specific endpoints
norwd Oct 19, 2025
cc0b937
Add link to humman readable quotes by author
norwd Oct 19, 2025
d25ce8a
Update README.md
norwd Oct 19, 2025
c895918
Fix typos
norwd Oct 19, 2025
fad1f83
Kreu quotes-eo.json
norwd Oct 19, 2025
12dc302
Merge pull request #1 from norwd/patch-1
norwd Oct 19, 2025
d26ad2c
Traduku pli citaĵojn de Dijkstra
norwd Oct 20, 2025
b3003fb
Include quote ID in per-author endpoint
norwd Oct 30, 2025
b6ecc77
Merge pull request #3 from norwd/norwd-patch-1
norwd Oct 30, 2025
4954525
Traduku pli citaĵojn de Dijkstra
norwd Dec 9, 2025
b5e6d63
Merge branch 'master' into merge-eo-quotes
norwd Feb 3, 2026
e5cce95
Korektigu `quotes-eo.json`
norwd Feb 3, 2026
de07cc2
Korektu `quotes-eo.json`
norwd Feb 3, 2026
0f64827
Traduku pli citaĵojn de Dijkstra (#5)
norwd Feb 3, 2026
366905e
Merge branch 'master' into patch-1
norwd Apr 2, 2026
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
78 changes: 0 additions & 78 deletions .eslintrc.json

This file was deleted.

144 changes: 144 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: "Build GitHub Pages"
run-name: "Build GitHub Pages"

on:
workflow_call:
push:
branches-ignore: [main,master]

permissions:
contents: read

env:
GH_TOKEN: ${{ github.token }}

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: "Checkout"
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: "Install tools"
run: sudo apt install tidy pandoc git-extras

- name: "Install templates"
run: |
mkdir -p ~/.pandoc/templates
curl -sSL 'https://github.com/tajmone/pandoc-goodies/raw/refs/heads/master/templates/html5/github/GitHub.html5' -o ~/.pandoc/templates/GitHub.html5

- name: "Retrieve Code of Conduct"
run: curl --header "${MEDIA_TYPE_HEADER}" --header "${AUTH_TOKEN_HEADER}" --create-dirs --output code-of-conduct.md "${CONTENTS_ENDPOINT}/CODE_OF_CONDUCT.md"
env:
CONTENTS_ENDPOINT: '${{ github.api_url }}/repos/${{ github.repository_owner }}/.github/contents'
MEDIA_TYPE_HEADER: "Accept: application/vnd.github.raw"
AUTH_TOKEN_HEADER: "Authorization: Bearer ${{ github.token }}"

- name: "Retrieve Security Policy"
run: curl --header "${MEDIA_TYPE_HEADER}" --header "${AUTH_TOKEN_HEADER}" --create-dirs --output security/policy.md "${CONTENTS_ENDPOINT}/SECURITY.md"
env:
CONTENTS_ENDPOINT: '${{ github.api_url }}/repos/${{ github.repository_owner }}/.github/contents'
MEDIA_TYPE_HEADER: "Accept: application/vnd.github.raw"
AUTH_TOKEN_HEADER: "Authorization: Bearer ${{ github.token }}"

- name: "Retrieve Contribution Guidlines"
run: curl --header "${MEDIA_TYPE_HEADER}" --header "${AUTH_TOKEN_HEADER}" --create-dirs --output contributing.md "${CONTENTS_ENDPOINT}/CONTRIBUTING.md"
env:
CONTENTS_ENDPOINT: '${{ github.api_url }}/repos/${{ github.repository_owner }}/.github/contents'
MEDIA_TYPE_HEADER: "Accept: application/vnd.github.raw"
AUTH_TOKEN_HEADER: "Authorization: Bearer ${{ github.token }}"

- id: latest-release
name: "Get Details of Latest Release"
run: gh release view --json "${JQ_PROPS}" --jq "${JQ_QUERY}" | tee -a "${GITHUB_OUTPUT}"
env:
GH_REPO: '${{ github.repository }}'
JQ_PROPS: 'tagName'
JQ_QUERY: '"tag_name=" + (.tagName | tostring)'

- name: "Generate a changelog.md file"
run: gh api "${ENDPOINT}" --template "${TEMPLATE}" | tee changelog.md
env:
ENDPOINT: '/repos/${{ github.repository }}/releases'
TEMPLATE: |
---
lang: en
title: Changelog
...

{{ range . -}}

## [{{.name}}]({{ .html_url }})

{{- if .draft -}}
{{ " " }}![This is a draft release.](https://img.shields.io/badge/DRAFT-grey)
{{- else if .prerelease -}}
{{ " " }}![This is a pre-release.](https://img.shields.io/badge/PRE--RELEASE-orange)
{{- else if eq .tag_name "${{ steps.latest-release.outputs.tag_name }}" -}}
{{ " " }}![This is the latest release.](https://img.shields.io/badge/LATEST-green)
{{- end }}

{{ .body }}

{{ if .assets -}}

### Asset Downloads

{{- "\n" -}}

{{ range .assets }}
- [{{ or .label .name }}]({{ .browser_download_url }})
{{- end }}

{{ end }}

{{- end }}

{{- /* noop */ -}}

- name: "Generate a humans.md file"
run: gh api "${ENDPOINT}" --template "${TEMPLATE}" | sh | tee humans.md
env:
ENDPOINT: '/repos/${{ github.repository }}/contributors'
TEMPLATE: |
echo "# Humans to Thank"
echo
echo "A huge thanks to all and colaborators who have contributed on GitHub!"
echo
echo "## Contributors to [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }})"
echo
{{range .}}
gh api '/users/{{ .login }}' --jq '"- " + (.name // .login) + " aka [@" + .login + "](" + .html_url + ")"'
{{end}}

- name: "Generate additional make configs for /quotes/{id} endpoints"
run: jq --raw-output "${JQ_QUERY}" data/quotes.json | tee OID_ENDPOINTS.mk
env:
JQ_QUERY: '.[]._id["$oid"] | "OID_ENDPOINTS := $(OID_ENDPOINTS) \(.).json"'

- name: "Generate additional make configs for /quotes/{author} endpoints"
run: jq --raw-output "${JQ_QUERY}" data/quotes.json | tee AUTH_ENDPOINTS.mk
env:
JQ_QUERY: 'unique_by(.author)[] | "AUTH_ENDPOINTS := $(AUTH_ENDPOINTS) \( .author | gsub("\\(.+\\)$$"; "") | gsub("[^a-zA-Z]+"; "_") ).json"'

- name: "Execute Makefile"
run: make

- name: "Tidy the HTML"
run: find . -name '*.html' -not -path './.git*/*' -not -path './src*/*' | xargs tidy -indent --wrap 0 --output-html yes --warn-proprietary-attributes no -quiet -modify

- name: "Archive Pages Artifact"
uses: actions/upload-artifact@v4
with:
name: pages
path: |
.
!CNAME
!Makefile
!*.mk
!.nojekyll
!.git*/**
!src/**
99 changes: 99 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: "Deploy GitHub Pages"
run-name: "Deploy GitHub Pages"

on:

schedule:
- cron: '0 5/12 * * *'

push:
branches: [main,master]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

env:
GH_TOKEN: ${{ github.token }}

jobs:
build:
name: "Build GitHub Pages"
uses: ./.github/workflows/build.yml

deploy:
if: github.ref_name == 'main' || github.ref_name == 'master'
name: "Deploy GitHub Pages"
needs: build
runs-on: ubuntu-latest

concurrency:
group: "pages"
cancel-in-progress: false

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- id: configure-pages
name: "Setup Pages"
uses: actions/configure-pages@v5

- name: "Setup Environment"
run: |
tee "${GITHUB_ENV}" << EOF
BASE_URL=${{ steps.configure-pages.outputs.base_url }}
PAGES_ORIGIN=${{ steps.configure-pages.outputs.origin }}
PAGES_HOST=${{ steps.configure-pages.outputs.host }}
BASE_PATH=${{ steps.configure-pages.outputs.base_path }}
EOF

- name: "Unarchive Pages Artifact"
uses: actions/download-artifact@v5
with:
name: pages

- name: "Generate a security.txt file"
run: |
tee security.txt << EOF
Contact: ${BASE_URL}/contact
Policy: ${BASE_URL}/security/policy
Acknowledgments: ${BASE_URL}/humans
Canonical: ${BASE_URL}/security.txt
Expires: $(date -u +"%Y-12-31T23:59:59.999Z")
EOF

- name: "Generate a robots.txt file"
run: |
tee robots.txt << EOF
# Block AI Crawlers (see: https://github.com/ai-robots-txt)
$(gh release download --repo ai-robots-txt/ai.robots.txt --pattern 'robots.txt' --output -)

# List of pages and files
Sitemap: ${BASE_URL}/sitemap.txt
EOF

- name: "Generate a version.txt file"
run: |
tee version.txt << EOF
Deployed: $(date --universal +'%FT%TZ')
Version: v0.0.${{ github.run_number }}.$((${{ github.run_attempt }} - 1))
Source: ${{ github.server_url }}/${{ github.repository }}/tree/$(echo "${{ github.sha }}" | head -c 7)
EOF

- name: "Generate a sitemap.txt file"
run: |
touch sitemap.txt # this ensures that the sitemap detects itself
find . -type f -printf "${BASE_URL}/%P\n" | sed -e 's/\(\.html\)*$//g' | sort --unique | tee -a sitemap.txt

- name: "Create a Pages Artifact"
uses: actions/upload-pages-artifact@v4
with:
path: .

- name: "Deploy Pages"
uses: actions/deploy-pages@v4
63 changes: 0 additions & 63 deletions .github/workflows/master_programming-quotes-api.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .gitignore

This file was deleted.

1 change: 1 addition & 0 deletions .nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading