From 0130e78a591fd18c805e3d56352971676194ede3 Mon Sep 17 00:00:00 2001 From: Henning Ulfarsson Date: Thu, 25 Sep 2025 15:31:46 +0000 Subject: [PATCH] Modernize Jekyll setup with GitHub Actions CI/CD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Upgrade Jekyll from 3.8.5 to 4.4.0 - Upgrade Ruby from 2.6.10 to 3.3.9 with rbenv - Add modern GitHub Actions workflow for automated deployment - Update Gemfile with latest gem versions and modern plugins - Fix Liquid syntax warnings in Python code blocks - Update .gitignore for modern Ruby/Jekyll development - Add .ruby-version for consistent team development 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/jekyll.yml | 65 +++++++++++++ .gitignore | 22 ++++- .ruby-version | 1 + Gemfile | 37 ++++---- WARP.md | 142 ++++++++++++++++++++++++++++ _programs/2019-6-17-comb.md | 4 + _programs/PT-Website.code-workspace | 8 ++ 7 files changed, 256 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/jekyll.yml create mode 100644 .ruby-version create mode 100644 WARP.md create mode 100644 _programs/PT-Website.code-workspace diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml new file mode 100644 index 0000000..099a214 --- /dev/null +++ b/.github/workflows/jekyll.yml @@ -0,0 +1,65 @@ +name: Build and Deploy Jekyll Site + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3.9' + + - name: Install dependencies + run: | + gem install jekyll -v 4.4.0 + gem install minima jekyll-feed jekyll-sitemap jekyll-seo-tag webrick + + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + + - name: Build with Jekyll + # Outputs to the './_site' directory by default + run: jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + env: + JEKYLL_ENV: production + + - name: Upload artifact + # Automatically uploads an artifact from the './_site' directory by default + uses: actions/upload-pages-artifact@v3 + + # Deployment job + 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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6f860c8..8f6e64c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,22 @@ -_site -.sass-cache +# Jekyll +_site/ +.sass-cache/ .jekyll-cache/ .jekyll-metadata + +# Ruby +.bundle/ +vendor/ +*.gem +Gemfile.lock + +# OS generated files .DS_Store -vendor \ No newline at end of file +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Note: .ruby-version is intentionally tracked to ensure consistent Ruby version \ No newline at end of file diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..aa00c92 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.3.9 \ No newline at end of file diff --git a/Gemfile b/Gemfile index 42b6af7..1576400 100644 --- a/Gemfile +++ b/Gemfile @@ -1,29 +1,26 @@ source "https://rubygems.org" -# Hello! This is where you manage which Jekyll version is used to run. -# When you want to use a different version, change it below, save the -# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: -# -# bundle exec jekyll serve -# -# This will help ensure the proper Jekyll version is running. -# Happy Jekylling! -# gem "jekyll", "~> 3.8.5" +# Jekyll core +gem "jekyll", "~> 4.4.0" -# This is the default theme for new Jekyll sites. You may change this to anything you like. -gem "minima", "~> 2.0" +# Theme +gem "minima", "~> 2.5" -# If you want to use GitHub Pages, remove the "gem "jekyll"" above and -# uncomment the line below. To upgrade, run `bundle update github-pages`. -gem "github-pages", group: :jekyll_plugins - -# If you have any plugins, put them here! +# Jekyll plugins group :jekyll_plugins do - gem "jekyll-feed", "~> 0.6" + gem "jekyll-feed", "~> 0.17" + gem "jekyll-sitemap", "~> 1.4" + gem "jekyll-seo-tag", "~> 2.8" end -# Windows does not include zoneinfo files, so bundle the tzinfo-data gem -gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] +# Required for Jekyll 4.x with Ruby 3.x +gem "webrick", "~> 1.7" + +# Platform-specific gems +platforms :mingw, :x64_mingw, :mswin, :jruby do + gem "tzinfo", ">= 1", "< 3" + gem "tzinfo-data" +end # Performance-booster for watching directories on Windows -gem "wdm", "~> 0.1.0" if Gem.win_platform? +gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] diff --git a/WARP.md b/WARP.md new file mode 100644 index 0000000..2d7ec58 --- /dev/null +++ b/WARP.md @@ -0,0 +1,142 @@ +# WARP.md + +This file provides guidance to WARP (warp.dev) when working with code in this repository. + +## Project Overview + +This is a Jekyll-based academic research website for the Permuta Triangle research group, focused on the combinatorics of permutation patterns. The site showcases research papers, programs, projects, and team members in the field of permutation theory and combinatorial mathematics. + +## Development Environment Setup + +### Prerequisites +- Ruby (version compatible with Jekyll) +- Bundler gem manager +- Jekyll static site generator + +### Installation +```bash +# Install required gems +bundle install + +# Serve the site locally for development +bundle exec jekyll serve + +# Build the site for production +bundle exec jekyll build +``` + +Note: If you encounter bundler version issues, run: +```bash +gem install bundler:2.0.2 +# or +bundle update --bundler +``` + +## Site Architecture + +### Jekyll Collections +The site uses Jekyll collections to organize different types of content: + +- `_authors/` - Research group members and collaborators +- `_papers/` - Academic papers and publications +- `_programs/` - Software projects (Permuta, Tilings, ComboPal) +- `_projects/` - Research projects +- `_talks/` - Conference presentations and talks +- `_posts/` - Blog posts and news updates + +### Key Configuration +- **Theme**: Minima +- **Plugins**: jekyll-feed, github-pages +- **Collections**: All collections have `output: true` for individual pages +- **Layouts**: Custom layouts for each collection type (paper.html, author.html, etc.) + +### Content Structure + +#### Authors +Author files in `_authors/` use frontmatter: +- `status` - member, student, collaborator +- `short_name` - used for references in papers +- `first_name`, `name` - display names +- `position` - academic position + +#### Papers +Paper files in `_papers/` include: +- `title` - paper title +- `journal` - publication venue +- `authors` - array of author short_names +- `projects` - related research projects +- Content includes abstract, updates, download links, presentations + +#### Programs +Software project documentation in `_programs/` for: +- **Permuta** - Python library for permutation patterns +- **Tilings** - Library for gridded permutations and tilings +- **ComboPal** - Combinatorial pattern analysis tool + +### Navigation and Data +- `_data/navigation.yml` - Site navigation menu +- `_includes/navigation.html` - Navigation component +- Cross-references between collections using author short_names + +## Common Development Tasks + +### Adding New Content + +**New Paper:** +```bash +# Create file: _papers/YYYY-MM-DD-shortname.md +# Follow existing frontmatter format with authors array +``` + +**New Author:** +```bash +# Create file: _authors/shortname.md +# Set status: member/student/collaborator +# Use short_name consistently across papers +``` + +**New Program/Software:** +```bash +# Create file: _programs/YYYY-MM-DD-name.md +# Include repo links and installation instructions +``` + +### Local Development +```bash +# Start development server with live reload +bundle exec jekyll serve --livereload + +# Build and check links +bundle exec jekyll build +# Site builds to _site/ directory +``` + +### Asset Management +- Images: `/assets/img/` (paper figures, author photos) +- PDFs: `/assets/talks/` (presentation slides) +- CVs: `/assets/cvs/` (curriculum vitae files) + +## Related Codebases + +This research group maintains several related software projects: +- **Permuta** (`/Users/henningu/github_repos/Permuta`) - Python permutation library +- **Tilings** (`/Users/henningu/github_repos/Tilings`) - Gridded permutation library +- **CayleyPerms** (`/Users/henningu/github_repos/CayleyPerms`) - Related permutation tools + +These codebases are often referenced in the `_programs/` collection and may be linked from papers and research descriptions. + +## Content Guidelines + +- Use author `short_name` consistently across all collections +- Papers should include arXiv and journal links when available +- Include presentation materials and update sections for ongoing research +- Programs should have clear installation and usage examples +- Maintain consistent date formatting: YYYY-MM-DD in filenames + +## GitHub Pages Deployment + +The site is configured for GitHub Pages deployment using: +- `github-pages` gem in Gemfile +- Jekyll compatible plugins only +- Assets served from `/assets/` directory +- Custom 404 page available \ No newline at end of file diff --git a/_programs/2019-6-17-comb.md b/_programs/2019-6-17-comb.md index 29a8df3..da3333c 100644 --- a/_programs/2019-6-17-comb.md +++ b/_programs/2019-6-17-comb.md @@ -121,10 +121,12 @@ same class appears multiple times. ... def __str__(self): ... if self.just_prefix: ... return "The word {}".format(self.prefix) +{% raw %} ... return ("Words over {{{}}} avoiding {{{}}} with prefix {}" ... "".format(", ".join(l for l in self.alphabet), ... ", ".join(p for p in self.patterns), ... self.prefix if self.prefix else '""')) +{% endraw %} ... ... def __repr__(self): ... return "AvoidingWithPrefix({}, {}, {}".format(repr(self.prefix), @@ -210,9 +212,11 @@ rules, and as such should be implemented as generators. ... # or has prefix pa for some a in Σ. ... ends_with_a = AvoidingWithPrefix(prefix + a, patterns, alphabet) ... comb_classes.append(ends_with_a) +{% raw %} ... yield BatchRule(("The next letter in the prefix is one of {{{}}}" ... "".format(", ".join(l for l in alphabet))), ... comb_classes) +{% endraw %} ``` The classes that we will verify are those that consist of just the diff --git a/_programs/PT-Website.code-workspace b/_programs/PT-Website.code-workspace new file mode 100644 index 0000000..aa49418 --- /dev/null +++ b/_programs/PT-Website.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "/Users/henningu/Documents/Work/pt" + } + ], + "settings": {} +} \ No newline at end of file