Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
ccb5e6b
chore: update daisyui to v5.7.16
notakeith Aug 5, 2026
dbbbe02
perf: lazy load MathJax and ionicons
notakeith Aug 5, 2026
9d441b3
cleanup: remove legacy theme leftovers
notakeith Aug 5, 2026
2b9b5d5
refactor: remove Alpine.js
notakeith Aug 5, 2026
b4a49e8
cleanup: remove orphaned unused partials
notakeith Aug 5, 2026
699ea9d
cleanup: drop dead CSS (list.css, disqus rule, flip-container, dream-…
notakeith Aug 5, 2026
1d462be
fix: append site title suffix on 404 page
notakeith Aug 5, 2026
512bf3e
fix: single-page title cleanup and sidebar layout (no shift when hidden)
notakeith Aug 5, 2026
db760ed
refactor: unify listing pages on CSS grid, drop redundant title blocks
notakeith Aug 5, 2026
699d365
refactor: consolidate page scripts into site.js/post.js, drop Alpine.…
notakeith Aug 5, 2026
d7456c4
fix: unify lecture ordering across list/sidebar/prev-next/numbering, …
notakeith Aug 5, 2026
5c72470
perf: preconnect and non-blocking font loading for logo
notakeith Aug 5, 2026
a40d1b8
perf: lazy-load search index, rewrite search JS and results markup
notakeith Aug 5, 2026
e1978b5
style: extract logo, copy-button and search-result CSS into input.css
notakeith Aug 5, 2026
8fd2f31
fix: modernize ai-widget colors to daisyUI v5 custom properties
notakeith Aug 5, 2026
ab11020
chore: remove AI comments from partials
notakeith Aug 5, 2026
4d17434
chore: remove AI comments from assets
notakeith Aug 5, 2026
86accec
fix: correct Hugo language settings
notakeith Aug 5, 2026
f73517c
perf: remove unused styles in summary partial
notakeith Aug 5, 2026
5cf7081
perf: improve CI/CD performance with caching and tectonic
notakeith Aug 6, 2026
c5b7141
feat: auto-generate contributors list in CI/CD
notakeith Aug 6, 2026
812ed5c
fix: improve section sorting by date and weight
notakeith Aug 6, 2026
2bc30b3
fix: correct sorting in course-view
notakeith Aug 6, 2026
6f580fe
feat: implement tooltip function
notakeith Aug 6, 2026
cc19744
feat: implement note-badges for courses with tooltips
notakeith Aug 6, 2026
8ac2532
refactor: replace random accent color with selection
notakeith Aug 6, 2026
d8fe499
feat: redesign UI and add new Hugo shortcodes
notakeith Aug 6, 2026
a217121
refactor: unify CSS architecture and sidebar styles
notakeith Aug 6, 2026
f15897f
chore: remove pins
notakeith Aug 6, 2026
135e547
feat: enhance authors component with avatars and expandable list
notakeith Aug 6, 2026
26fcac6
perf: implement lazy loading for context-menu and ai-widget
notakeith Aug 6, 2026
2655544
fix: use correct anki href
notakeith Aug 6, 2026
f7fa152
feat: add contributors section with avatars and commit stats
notakeith Aug 6, 2026
3dfd5f4
refactor: use avatar partial for author avatars
notakeith Aug 6, 2026
9f73213
feat(ci): add content validation with archetype-based schema
notakeith Aug 6, 2026
3537ee6
feat(content): add descriptions and improve titles for cpp-sem1
notakeith Aug 6, 2026
37db4e4
feat(content): add descriptions and improve titles for cpp-sem2
notakeith Aug 6, 2026
5b028f6
feat(content): add descriptions and improve titles for databases
notakeith Aug 6, 2026
ced37b4
feat(content): add descriptions and improve titles for interpreter
notakeith Aug 6, 2026
3513774
feat(content): add descriptions and improve titles for java
notakeith Aug 6, 2026
cf71cc9
feat(content): add descriptions and improve titles for math-stats
notakeith Aug 6, 2026
8e5df05
feat(content): add descriptions and improve titles for operation-systems
notakeith Aug 6, 2026
d2bc27f
fix: restore avatar stacking with negative margin
notakeith Aug 6, 2026
9c6a58f
chore: add contributors.json to gitignore
notakeith Aug 6, 2026
d8587ca
chore: add Changelog.md
notakeith Aug 6, 2026
1f16130
chore: rename lecture images to sequential naming
notakeith Aug 7, 2026
70663d7
fix: add missing images to cpp-sem2/lecture-07
notakeith Aug 7, 2026
3f9694b
fix: cover text alignment and padding
notakeith Aug 7, 2026
926130d
feat: add subject-groups and authors utilities
notakeith Aug 7, 2026
7dd76fb
feat: add teacher-switch component
notakeith Aug 7, 2026
a09e147
refactor: rewrite section-card to use subject groups
notakeith Aug 7, 2026
3b86474
refactor: adapt list.html to use subject groups and teacher-switch
notakeith Aug 7, 2026
fbf2033
refactor: rebuild index.json with subject grouping
notakeith Aug 7, 2026
5a0fce8
refactor: update semester-view and author to use subject groups
notakeith Aug 7, 2026
c881c18
style: adjust note-badge colors for consistency
notakeith Aug 7, 2026
b9f5dea
fix: add missing site.js for teacher-switch
notakeith Aug 7, 2026
8d006d2
fix: update search.js for new index.json structure
notakeith Aug 7, 2026
0dfaa8a
style: add subject card and teacher-switch styles
notakeith Aug 7, 2026
00d8786
feat: migrate to KaTeX from MathJax
notakeith Aug 7, 2026
1af6e6d
feat: replace CDN dependencies with local assets
notakeith Aug 7, 2026
d43cc7b
fix: replace depricated site.Language.LanguageCode to .Language.Locale
notakeith Aug 7, 2026
f7f345b
fix: replace depricated site.Data to .Data
notakeith Aug 7, 2026
00d8a15
chore: remove mistakenly committed render-blockquote-copy.html
notakeith Aug 7, 2026
8649bf9
feat: add academicYear field to courses
notakeith Aug 7, 2026
6997820
feat: add academicYear for lectures
notakeith Aug 7, 2026
a9564ee
chore: remove dream theme dependencies
notakeith Aug 7, 2026
9842f42
chore: remove AI-generated comments
notakeith Aug 7, 2026
edd6194
feat: add author and academicYear to archetypes
notakeith Aug 7, 2026
f9d2c22
chore: add authors to lecture front matter
notakeith Aug 7, 2026
f9c9b31
docs: update README, CHANGELOG, and CONTRIBUTING
notakeith Aug 7, 2026
67b0136
fix: hugo version in pr.yaml
notakeith Aug 7, 2026
6a4a708
fix: remove harmful steps in ci/cd runner for pull request checks
notakeith Aug 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
239 changes: 138 additions & 101 deletions .github/workflows/gohugo.yml
Original file line number Diff line number Diff line change
@@ -1,160 +1,197 @@
name: Deploy Hugo site to Pages

on:
push:
branches: ["main"]
paths-ignore:
- "README.md"
- "LICENSE"
- ".gitignore"
- "docs/**"
workflow_dispatch:
inputs:
force_regen:
description: "Пересобрать все артефакты, игнорируя кеш"
type: boolean
default: false

permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false

defaults:
run:
shell: bash

env:
HUGO_VERSION: "0.161.1"
PANDOC_VERSION: "3.10.1"
TECTONIC_VERSION: "0.15.0"

jobs:
build:
build-deploy:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.161.1
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true

steps:
- name: Install Hugo CLI
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: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install Dart Sass
- name: Определить, нужна ли генерация артефактов
id: changes
run: |
sudo apt-get update -q
sudo apt-get install -y -q sass
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]] \
|| ! git rev-parse --verify -q HEAD^ >/dev/null; then
echo "content=true" >> "$GITHUB_OUTPUT"; exit 0
fi
FILES=$(git diff --name-only HEAD^ HEAD)
echo "Изменённые файлы:"; echo "$FILES"
if grep -qE '^(content/|scripts/|\.github/workflows/)' <<< "$FILES"; then
echo "content=true" >> "$GITHUB_OUTPUT"
else
echo "content=false" >> "$GITHUB_OUTPUT"
fi

- name: Собрать контрибьюторов
env:
GITHUB_TOKEN: ${{ github.token }}
run: python3 scripts/collect-contributors.py

- name: Снапшот контрибьюторов в артефакты прогона
uses: actions/upload-artifact@v4
with:
name: contributors-${{ github.run_number }}
path: data/contributors.json
retention-days: 90

- name: Cache apt-пакеты
- name: Restore артефактов генераторов
id: gen-cache
uses: actions/cache/restore@v4
with:
path: |
.cache
static/covers
static/posts
key: gen-${{ github.sha }}
restore-keys: gen-

- name: Решить, запускать ли генераторы
id: gen
run: |
NEED=false
[[ "${{ steps.changes.outputs.content }}" == "true" ]] && NEED=true
# кеш вообще не восстановился — артефактов нет, надо генерить
[[ -z "${{ steps.gen-cache.outputs.cache-matched-key }}" ]] && NEED=true
[[ "${{ inputs.force_regen }}" == "true" ]] && NEED=true
echo "run=$NEED" >> "$GITHUB_OUTPUT"
echo "Генераторы: $NEED"

- name: Cache CLI-бинарников
id: bins
uses: actions/cache@v4
with:
path: /var/cache/apt/archives/*.deb
key: apt-xetex-v1-${{ runner.os }}
path: ~/.local/bin
key: bins-${{ runner.os }}-h${{ env.HUGO_VERSION }}-p${{ env.PANDOC_VERSION }}-t${{ env.TECTONIC_VERSION }}

- name: Install pandoc + XeLaTeX
- name: Скачать hugo / pandoc / tectonic
if: steps.bins.outputs.cache-hit != 'true'
run: |
sudo apt-get install -y -q \
pandoc \
texlive-xetex \
texlive-lang-cyrillic \
fonts-dejavu
set -euo pipefail
mkdir -p ~/.local/bin && cd "$(mktemp -d)"

- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
curl -sSL "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" \
| tar xz hugo && mv hugo ~/.local/bin/

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
curl -sSL "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz" \
| tar xz --strip-components=2 "pandoc-${PANDOC_VERSION}/bin/pandoc" && mv pandoc ~/.local/bin/

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
curl -sSL "https://github.com/tectonic-typesetting/tectonic/releases/download/tectonic%40${TECTONIC_VERSION}/tectonic-${TECTONIC_VERSION}-x86_64-unknown-linux-musl.tar.gz" \
| tar xz tectonic && mv tectonic ~/.local/bin/

- name: Install Python dependencies
run: pip install Pillow pyyaml genanki
chmod +x ~/.local/bin/*

- name: Cache fonts
uses: actions/cache@v4
with:
path: .cache/fonts
key: covers-fonts-v1
- name: PATH
run: echo "$HOME/.local/bin" >> "$GITHUB_PATH"

- name: Cache cover markers
- name: Cache бандла tectonic
if: steps.gen.outputs.run == 'true'
uses: actions/cache@v4
with:
path: .cache/covers
key: covers-markers-${{ github.sha }}
restore-keys: covers-markers-
path: ~/.cache/Tectonic
key: tectonic-bundle-${{ env.TECTONIC_VERSION }}-v1

- name: Cache PDF хеши
uses: actions/cache@v4
- name: Setup Python
if: steps.gen.outputs.run == 'true'
uses: actions/setup-python@v5
with:
path: |
.cache/pdf
static/posts/*/resources/*.pdf
key: pdf-v1-${{ hashFiles('content/posts/**/*.md') }}
restore-keys: pdf-v1-
python-version: "3.12"
cache: pip
cache-dependency-path: scripts/requirements.txt

- name: Cache AI merged хеши
uses: actions/cache@v4
with:
path: |
.cache/ai
static/posts/*/resources/*_merged.md
key: ai-v1-${{ hashFiles('content/posts/**/*.md') }}
restore-keys: ai-v1-
- name: Python deps
if: steps.gen.outputs.run == 'true'
run: pip install -r scripts/requirements.txt

- name: Cache Anki хеши
uses: actions/cache@v4
- name: Генерация (covers / anki / merged / pdf)
if: steps.gen.outputs.run == 'true'
run: |
python scripts/generate-covers.py
python scripts/generate-anki.py
python scripts/merge-md-for-ai.py
python scripts/generate-pdf.py --jobs "$(nproc)"

- name: Save артефактов генераторов
if: steps.gen.outputs.run == 'true'
uses: actions/cache/save@v4
continue-on-error: true
with:
path: |
.cache/anki
static/posts/*/resources/*.apkg
static/posts/*/*/resources/*.apkg
key: anki-v1-${{ hashFiles('content/posts/**/*.md', 'content/posts/**/*.csv') }}
restore-keys: anki-v1-

- name: Generate OG covers
run: python scripts/generate-covers.py

- name: Generate Anki decks
run: python scripts/generate-anki.py

- name: Generate merged MD for AI
run: python scripts/merge-md-for-ai.py

- name: Generate PDF конспекты
run: python scripts/generate-pdf.py
.cache
static/covers
static/posts
key: gen-${{ github.sha }}

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

- name: Install Node.js dependencies and build CSS
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm

- name: Build CSS
run: |
npm ci
npm ci --prefer-offline --no-audit --fund=false
npm run css

- name: Build with Hugo
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
run: |
hugo \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
run: hugo --gc --minify --baseURL "${{ steps.pages.outputs.base_url }}/"

- name: Verify build
run: |
[ -f public/index.html ] || exit 1
grep -q "<body" public/index.html || (echo "Index.html пустой!"; exit 1)
ls public/covers/*/*.png > /dev/null 2>&1 || \
(echo "Обложки не попали в public/covers/!"; exit 1)
echo "Содержимое index.html проверено."
echo "Обложки на месте."
[ -s public/index.html ] || { echo "index.html пустой"; exit 1; }
grep -q "<body" public/index.html || { echo "index.html без body"; exit 1; }
ls public/covers/*/*.png >/dev/null 2>&1 || { echo "Обложки не попали в public/covers/"; exit 1; }

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
99 changes: 99 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Проверка Pull Request.
#
# Ничего не публикует — только говорит, соберётся ли сайт и не сломает ли
# правка что-нибудь ещё. Деплой остаётся в отдельном workflow на main.
#
# Задачи разнесены намеренно: автор PR должен видеть, что именно не так,
# а не «один красный крестик».

name: PR

on:
pull_request:
branches: [main]

# Новый пуш в ту же ветку отменяет предыдущий прогон.
concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true

permissions:
contents: read

env:
HUGO_VERSION: 0.161.1

jobs:
# ── 1. Front matter и структура папок ──────────────────────────────────
content:
name: Конспекты
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- run: pip install pyyaml

- name: Проверить структуру и front matter
run: python scripts/check-content.py

# ── 2. Собирается ли сайт ──────────────────────────────────────────────
build:
name: Сборка
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # нужна полная история для контрибьюторов
submodules: recursive

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm

- name: Установить Hugo
run: |
wget -qO hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
sudo dpkg -i hugo.deb

# Аватарки и пережатые картинки переживают прогоны — иначе каждая
# сборка заново ходит на github.com.
- name: Кеш ресурсов Hugo
uses: actions/cache@v4
with:
path: |
resources/_gen
/tmp/hugo_cache
key: hugo-${{ runner.os }}-${{ hashFiles('content/**/*.md', 'hugo.toml') }}
restore-keys: hugo-${{ runner.os }}-

- run: npm ci
- run: npm run build

- name: Собрать контрибьюторов
run: python scripts/collect-contributors.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# --printPathWarnings ловит коллизии адресов: две лекции с одним
# слагом молча перетирают друг друга, если на них не смотреть.
- name: Hugo build
run: hugo --gc --minify --printPathWarnings --baseURL "/"

- name: Отчёт о размере
run: |
echo "### Размер сборки" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
du -sh public >> $GITHUB_STEP_SUMMARY
find public -name '*.html' | wc -l | xargs echo "HTML страниц:" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY

- uses: actions/upload-artifact@v4
with:
name: site
path: public
retention-days: 7
Loading
Loading