Skip to content

Commit 2a492aa

Browse files
committed
Format & GitHub Workflow
1 parent 140e739 commit 2a492aa

9 files changed

Lines changed: 111 additions & 17 deletions

File tree

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This repo is an Astro 5 + MDX site with optional React "islands," Tailwind CSS v
5555
- Code blocks are styled by `astro-expressive-code`; don't manually theme them—follow the existing configuration in `astro.config.ts`.
5656
- To add a new interactive component:
5757
1. Create it under `src/components/` (Astro or React).
58-
2. Import it in `src/paper.mdx`.
59-
3. For React, add `client:*` (e.g., `client:idle`) at the usage site.
58+
1. Import it in `src/paper.mdx`.
59+
1. For React, add `client:*` (e.g., `client:idle`) at the usage site.
6060

6161
If anything here seems off or incomplete (tests aren’t defined, additional pages, alt deploys), tell me what’s missing and I’ll refine these instructions.

.github/workflows/astro.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,25 @@
33
# To get started with Astro see: https://docs.astro.build/en/getting-started/
44
#
55
name: Deploy Astro site to Pages
6-
76
on:
87
# Runs on pushes targeting the default branch
98
push:
10-
branches: ["main"]
11-
9+
branches: ["website"]
1210
# Allows you to run this workflow manually from the Actions tab
1311
workflow_dispatch:
14-
1512
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1613
permissions:
1714
contents: read
1815
pages: write
1916
id-token: write
20-
2117
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
2218
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2319
concurrency:
2420
group: "pages"
2521
cancel-in-progress: false
26-
2722
env:
2823
BUILD_PATH: "." # default value when not using subfolders
2924
# BUILD_PATH: subfolder
30-
3125
jobs:
3226
build:
3327
name: Build
@@ -76,7 +70,6 @@ jobs:
7670
uses: actions/upload-pages-artifact@v3
7771
with:
7872
path: ${{ env.BUILD_PATH }}/dist
79-
8073
deploy:
8174
environment:
8275
name: github-pages

.github/workflows/pre-commit.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: pre-commit
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- '*'
7+
- '*/*'
8+
- '**'
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-python@v3
15+
- uses: pre-commit/action@v3.0.0

.pre-commit-config.yaml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
# See https://pre-commit.com for more information
3+
# See https://pre-commit.com/hooks.html for more hooks
4+
5+
# Don't run pre-commit on files under any thirdparty/, third_party/, third-party/, etc. sub-folders
6+
# But will run on directories like third/.../../party/, etc.
7+
exclude: (?i)^(.*third[^/]*party/.*|.*\.trt)$
8+
9+
repos:
10+
- repo: https://github.com/sirosen/check-jsonschema # check-jsonschema is a github actions and workflows verifier.
11+
rev: 0.37.1
12+
hooks:
13+
- id: check-github-actions
14+
- id: check-github-workflows
15+
16+
- repo: https://github.com/pre-commit/mirrors-prettier
17+
rev: v4.0.0-alpha.8
18+
hooks:
19+
- id: prettier
20+
types_or: [css, scss, json, javascript, html]
21+
exclude: (?i)(.*main.*scss)$
22+
23+
- repo: https://github.com/google/yamlfmt
24+
rev: v0.21.0
25+
hooks:
26+
- id: yamlfmt
27+
exclude: (?i)(.pre-commit-config.yaml)$
28+
29+
- repo: https://github.com/jonasbb/pre-commit-latex-hooks
30+
rev: v1.5.0
31+
hooks:
32+
- id: american-eg-ie
33+
- id: cleveref-capitalization
34+
- id: consistent-spelling
35+
args:
36+
[
37+
"--emph=et al.",
38+
"--emph=a priori",
39+
"--emph=a posteriori",
40+
'--regex=naive=\bna(i|\\"i)ve',
41+
]
42+
- id: csquotes
43+
- id: ensure-labels-for-sections
44+
args:
45+
[
46+
# If present only check that there is a \label{} but not the value
47+
"--ignore-label-content",
48+
]
49+
- id: no-space-in-cite
50+
- id: tilde-cite
51+
- id: unique-labels
52+
# args:
53+
# [
54+
# # If present only check for uniqueness within each file.
55+
# # Can be useful if a repository contains multiple main files.
56+
# "--individual",
57+
# ]
58+
- id: cleveref-instead-of-autoref
59+
60+
- repo: https://github.com/cmhughes/latexindent.pl.git
61+
rev: V4.0
62+
hooks:
63+
- id: latexindent
64+
65+
- repo: https://github.com/executablebooks/mdformat # mdformat is a markdown formatter.
66+
rev: 1.0.0
67+
hooks:
68+
- id: mdformat
69+
70+
- repo: https://github.com/pre-commit/pre-commit-hooks # pre-commit-hooks is a collection of additional pre-commit hooks.
71+
rev: v6.0.0
72+
hooks:
73+
# - id: requirements-txt-fixer # fixes requirements.txt and requirements-dev.txt.
74+
# - id: check-added-large-files # prevents giant files from being committed.
75+
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystem.
76+
- id: check-merge-conflict # checks for files that contain merge conflict strings.
77+
- id: check-yaml # checks yaml files for parseable syntax.
78+
args:
79+
- --allow-multiple-documents
80+
- --unsafe
81+
# - id: check-executables-have-shebangs # ensures that (non-binary) executables have a shebang.
82+
# - id: check-shebang-scripts-are-executable # ensures that (non-binary) files with a shebang are executable.
83+
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline.
84+
- id: fix-byte-order-marker # removes utf-8 byte order marker.
85+
- id: mixed-line-ending # replaces or checks mixed line ending.
86+
- id: trailing-whitespace # trims trailing whitespace.

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# As of 2025-10-18, Prettier only supports MDX v1.0.
22
# See https://github.com/prettier/prettier/issues/12209 for updates.
3-
*.mdx
3+
*.mdx

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ This is a template to help you build a professional project page for your resear
3131
## Usage
3232

3333
1. Click ["Use this template"](https://github.com/new?template_name=academic-project-astro-template&template_owner=RomanHauksson) to make a copy of this repository in your GitHub account.
34-
2. Enable GitHub Pages for the repository. Click on the **Settings** tab, then go to **Pages** (under the **Code and automation** section). Using the dropdown, change **Source** from "Deploy from a branch" to "GitHub Actions".
34+
1. Enable GitHub Pages for the repository. Click on the **Settings** tab, then go to **Pages** (under the **Code and automation** section). Using the dropdown, change **Source** from "Deploy from a branch" to "GitHub Actions".
3535

3636
At this point, whenever you push to the `main` branch, the GitHub Actions workflow in `.github/workflows/astro.yml` will automatically build a static website and deploy it to `https://<username>.github.io/<repository>/`. No other configuration is necessary!
3737

3838
To edit the content, you _could_ simply edit [`./src/paper.mdx`](./src/paper.mdx) in your browser in the GitHub interface, without downloading or setting anything else up. But if you want to preview your changes faster, I recommend editing it locally:
3939

4040
3. Clone the repository.
4141

42-
4. [Install Node.js](https://nodejs.org/en/download/) if you haven't already. Make sure you're using version 24 or later, which you can check by running
42+
1. [Install Node.js](https://nodejs.org/en/download/) if you haven't already. Make sure you're using version 24 or later, which you can check by running
4343

4444
```bash
4545
node --version
@@ -67,7 +67,7 @@ While the development server is running, you can open `http://localhost:4321` in
6767

6868
8. Edit the content in [`./src/paper.mdx`](./src/paper.mdx). Every time you save a file, the development server will automatically reload `http://localhost:4321` to display the updated version of the page.
6969

70-
9. Push your changes to the GitHub repository to trigger a new deployment with your changes.
70+
1. Push your changes to the GitHub repository to trigger a new deployment with your changes.
7171

7272
Alternatively, you can build the site locally, and copy the output to wherever you'd like to host the site. Running the following command will create a static website stored in `./dist/`.
7373

bibliography.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ @inproceedings{vaswani2017attention
66
pages = {5998--6008},
77
year = {2017},
88
url = {https://proceedings.neurips.cc/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf}
9-
}
9+
}

public/google78f44d7a1045c1da.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-site-verification: google78f44d7a1045c1da.html
1+
google-site-verification: google78f44d7a1045c1da.html

src/paper.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,4 @@ Displaying the BibTeX entry for your paper in a code block makes it easy to copy
205205

206206
## Bibliography
207207

208-
[^ref]
208+
[^ref]

0 commit comments

Comments
 (0)