Skip to content

Commit fd09eea

Browse files
authored
webpack -> vite (#2)
* webpack->vite * add favicon * webpack -> vite * pre-commit + typos * simplify * add husky * revert: react-snap * update ci * fix image * update readme * update cmd * update readme * readme * rename default branch * project-page
1 parent 7c70485 commit fd09eea

27 files changed

+5926
-8387
lines changed

.github/workflows/build.yaml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,28 @@ name: build
22
on:
33
push:
44
branches:
5-
- main
5+
- project-page
66
pull_request:
77
branches:
8-
- main
8+
- project-page
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
node-version: ['18.x', '20.x']
1512
steps:
1613
- uses: actions/checkout@v4
17-
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v3
14+
- name: Use Node.js
15+
uses: actions/setup-node@v4
1916
with:
20-
node-version: ${{ matrix.node-version }}
17+
node-version: '22.13.1'
2118
- name: Cache node_modules
2219
uses: actions/cache@v3
23-
id: npm_cache_id
2420
with:
2521
path: '**/node_modules'
2622
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
27-
- name: install
28-
run: |
29-
npm install
30-
- name: build
31-
run: |
32-
npm run build
23+
restore-keys: |
24+
${{ runner.os }}-node-
25+
- name: Install dependencies
26+
run: npm ci
27+
- name: Build
28+
run: npm run build
3329
continue-on-error: true

.github/workflows/deploy.yaml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: deploy
22
on:
33
push:
44
branches:
5-
- main
5+
- project-page
66

77
permissions:
88
contents: read
@@ -14,19 +14,24 @@ jobs:
1414
runs-on: ubuntu-22.04
1515
steps:
1616
- uses: actions/checkout@v4
17-
- name: Use Node.js 20
17+
- name: Use Node.js
1818
uses: actions/setup-node@v4
1919
with:
20-
node-version: 20
21-
- name: install
22-
run: |
23-
npm install
24-
- name: build
25-
run: |
26-
npm run build
20+
node-version: '22.x'
21+
- name: Cache node_modules
22+
uses: actions/cache@v3
23+
with:
24+
path: '**/node_modules'
25+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
26+
restore-keys: |
27+
${{ runner.os }}-node-
28+
- name: Install dependencies
29+
run: npm ci
30+
- name: Build
31+
run: npm run build
2732
continue-on-error: true
28-
- name: upload
29-
uses: actions/upload-pages-artifact@v2
33+
- name: Upload artifact
34+
uses: actions/upload-pages-artifact@v3
3035
with:
3136
path: build
3237
deploy:

.github/workflows/lint.yaml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
1-
name: eslint
1+
name: lint
22

33
on:
44
push:
55
branches:
6-
- main
6+
- project-page
77
pull_request:
88
branches:
9-
- main
9+
- project-page
1010
jobs:
1111
lint:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v2
14+
- uses: actions/checkout@v4
15+
- name: Use Node.js
16+
uses: actions/setup-node@v4
1617
with:
17-
node-version: '20.11.0'
18-
- uses: actions/cache@v3
19-
id: npm_cache_id
18+
node-version: '22.x'
19+
- name: Cache node_modules
20+
uses: actions/cache@v3
2021
with:
2122
path: '**/node_modules'
2223
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
23-
- name: install
24-
if: steps.cache.outputs.cache-hit != 'true'
25-
run: npm install
26-
- name: eslint
24+
restore-keys: |
25+
${{ runner.os }}-node-
26+
- name: Install dependencies
27+
run: npm ci
28+
- name: ESLint
2729
run: npm run lint
28-
- name: prettier
29-
run: npm run format:check
30+
- name: Prettier
31+
run: npm run format
32+
- name: Typos
33+
runt: typos

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run lint-staged

README.md

Lines changed: 105 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,132 @@
1-
# Academic Projectpage Template
2-
[![build](https://github.com/denkiwakame/academic-project-template/actions/workflows/build.yaml/badge.svg)](https://github.com/denkiwakame/academic-project-template/actions/workflows/build.yaml) [![build](https://github.com/denkiwakame/academic-project-template/actions/workflows/lint.yaml/badge.svg)](https://github.com/denkiwakame/academic-project-template/actions/workflows/lint.yaml)
1+
# 🎨 Academic Project Page Template
2+
3+
[![build](https://github.com/denkiwakame/academic-project-template/actions/workflows/build.yaml/badge.svg)](https://github.com/denkiwakame/academic-project-template/actions/workflows/build.yaml) [![lint](https://github.com/denkiwakame/academic-project-template/actions/workflows/lint.yaml/badge.svg)](https://github.com/denkiwakame/academic-project-template/actions/workflows/lint.yaml)
34
[![license](https://img.shields.io/badge/LICENSE-CC--BY--SA4.0-important.svg)](https://creativecommons.org/licenses/by-sa/4.0/)
4-
- An academic project page template powered by [React](https://ja.reactjs.org/) + [UIKit](https://getuikit.com/), w/ markdown and KaTeX support !
5-
- **Demo**: ⛅[default-theme](https://denkiwakame.github.io/academic-project-template)
65

7-
## Prerequisites
8-
- Before you begin, ensure you have met the following requirements:
9-
### 🪟WSL 🐧Linux 🍎MacOS
10-
#### Install nodejs>=20 using [node version manager](https://volta.sh/)
11-
```bash
12-
$ curl https://get.volta.sh/ | bash
13-
# restart your shell...
14-
$ volta install node@20.11.0
15-
$ volta pin node@20.11.0
16-
17-
$ node --version
18-
v20.11.0
19-
$ npm --version
20-
10.2.4
21-
```
22-
#### Install puppeteer dependencies
23-
- react-snap uses Headless Chromium through puppeteer to [pre-render React apps](https://blog.logrocket.com/pre-rendering-react-app-react-snap/).
6+
## ✨ Features
7+
8+
- 🚀 Built with [React](https://react.dev/) + [UIKit](https://getuikit.com/)
9+
- 📝 Markdown support with full styling capabilities
10+
- ➗ Mathematical equations with KaTeX
11+
- 🎨 Customizable themes
12+
- 🔄 Auto-deployment with GitHub Actions
13+
- 📱 Fully responsive design
14+
15+
🌐 **Demo**: [default-theme](https://denkiwakame.github.io/academic-project-template)
16+
17+
## 🚦 Prerequisites
18+
19+
### System Requirements
20+
21+
Supported platforms:
22+
23+
- 🪟 Windows (WSL)
24+
- 🐧 Linux
25+
- 🍎 macOS
26+
27+
### 📦 Node.js Setup
28+
29+
Recommended: Install Node.js using [Volta](https://volta.sh/)
2430

2531
```bash
26-
sudo apt install -y libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb libgbm-dev fonts-ipafont
32+
# Install Volta
33+
curl https://get.volta.sh/ | bash
34+
35+
# After restarting your shell...
36+
volta install node@22.13.1
37+
volta pin node@22.13.1
38+
39+
# Verify installation
40+
node --version # v22.13.1
41+
npm --version # 10.9.2
2742
```
2843

29-
## Usage
30-
### Installation
31-
- Clone this repository
44+
## 🛠️ Development Guide
45+
46+
### 📥 Installation
3247

3348
```sh
34-
$ npm install
49+
npm install
3550
```
36-
### Build
51+
52+
### 💻 Development Server
53+
3754
```sh
38-
$ npm run clean
39-
$ npm run build
40-
$ npm run serve
55+
npm run dev
4156
```
4257

43-
### Develop
58+
### 🏗️ Build
59+
4460
```sh
45-
$ npm run serve
61+
npm run clean
62+
npm run build
63+
npm run preview
4664
```
4765

48-
### Customize
49-
- You can change styles without writing css. Modify [UIKit variables](https://github.com/uikit/uikit/blob/bc6dd1851652e5b77387a1efefc16cea6e3d165b/src/scss/variables.scss) at `src/scss/theme.scss`
50-
- You can extend `*.jsx` files using these assets or custom React Components.
51-
- UIKit Components https://getuikit.com/docs/introduction
52-
- React-Icons https://react-icons.github.io/react-icons/
66+
#### 🤖 Puppeteer Dependencies (for react-snap pre-rendering)
5367

54-
### Structure
68+
Required packages for Headless Chrome (pre-rendering):
69+
70+
```bash
71+
sudo apt install -y libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb libgbm-dev fonts-ipafont
5572
```
56-
template.yaml # template arguments
73+
74+
## 🎨 Customization
75+
76+
- 💅 Customize styles without writing CSS: modify [UIKit variables](https://github.com/uikit/uikit/blob/develop/src/scss/variables.scss) in `src/scss/theme.scss`
77+
- 🧩 Extend components with:
78+
- [UIKit Components](https://getuikit.com/docs/introduction)
79+
- [React Icons](https://react-icons.github.io/react-icons/)
80+
81+
## 📁 Project Structure
82+
83+
```
84+
template.yaml # Configuration file
85+
index.html # Root HTML
5786
src/
58-
├── components # React components loaded in index.jsx
59-
│   ├── authors.jsx
60-
│   ├── citation.jsx
61-
│   ├── footer.jsx
62-
│   ├── header.jsx
63-
│   ├── method.jsx
64-
│   ├── abstract.jsx
65-
│   ├── body.jsx
66-
│   └── video.jsx
67-
├── html
68-
│   └── index.html
69-
├── media # media files to be relocated to assets/ by file-loader
70-
│   ├── placeholder.png
71-
│   ├── demo.mp4
72-
│   └── teaser.png
73-
├── js
74-
│   └── styles.js # embed styles to js
75-
├── pages
76-
│   └── index.jsx # template root
77-
└── scss # color theme zoo
87+
├── components/ # React components
88+
├── js/
89+
│ └── styles.js # Style settings
90+
├── pages/
91+
│ └── index.jsx # Main template
92+
└── scss/ # Theme settings
7893
└── theme.scss
94+
public/
95+
└── media/ # Media files
7996
```
8097

81-
### Template
82-
- fillin values at `template.yaml`
83-
- fillin `null` for N/A contents (e.g. `method: null`)
98+
## ⚙️ Configuration
99+
100+
Configure your project in `template.yaml`, leaving the N/A fields as "null".
84101

85102
```yaml
86103
theme: default # default || dark
87-
organization: Pixel Genius Labs
88-
twitter: '@denkivvakame'
89-
title: 'Academic Project Page Template: Do Whatever the Hack You Want with This Template'
104+
organization: 'Your Lab'
105+
title: 'Project Title'
90106
resources:
91-
paper: https://openreview.net/
92-
arxiv: https://arxiv.org
93-
code: https://github.com/denkiwakame/academic-project-template
94-
video: https://www.youtube.com/embed/onbnb_D1wC8?si=xJczUv716Lt5aO4l&start=1150
95-
huggingface: https://huggingface.co/
96-
description: academic projectpage template that supports markdown and KaTeX
97-
image: https://denkiwakame.github.io/academic-project-template/assets/teaser.png
98-
url: https://denkiwakame.github.io/academic-project-template
99-
speakerdeck: # speakerdeck slide ID
100-
authors:
101-
- name: Wakame Denki*
102-
affiliation: [1, 2]
103-
url: http://denkiwakame.github.io/
104-
position: intern
105-
- name: Jane Doe
106-
affiliation: [1]
107-
position: Researcher
108-
url: https://thispersondoesnotexist.com/
109-
- name: John Smith
110-
affiliation: [1]
111-
position: Researcher
112-
url: https://thispersondoesnotexist.com/
113-
affiliations:
114-
- Pixel Genius Labs
115-
- NeuroNauts Academy
116-
meta:
117-
- '*work done while she was interning at Pixel Genius Lab.'
118-
bibtex: >
119-
@article{doe2024superai,
120-
author = {Jane Doe and John Smith},
121-
title = {Unleashing the Power of Super AI: Transforming the Future of Technology},
122-
journal = {Journal of Superintelligent Systems},
123-
year = {2024},
124-
volume = {99},
125-
number = {1},
126-
pages = {1-42},
127-
month = {January},
128-
keywords = {Super AI, Machine Learning, Artificial Intelligence, Technological Innovation},
129-
doi = {10.9999/jsis.2024.001},
130-
url = {https://www.example.com/superai-article},
131-
note = {This paper sets the benchmark for future AI research and applications.}
132-
}
133-
134-
teaser: teaser.png
135-
abstract: |
136-
This is a versatile template designed to satisfy your research project page needs, all while harnessing the power of **UIKit** and **React**. Built on the foundations of simplicity and flexibility, this template allows you to focus on expressing your ideas without the hassle of directly handling CSS—thanks to customizable SASS variables.
137-
With markdown as your canvas and $\KaTeX$ for precise equations, crafting clear and engaging project page becomes effortless. Whether you're unraveling complex theories or presenting your findings, this template aims to support your scholarly endeavors with grace and ease.
138-
*Need to edit HTML directly?* Fear not! In addition to markdown, you can also directly write HTML with ease. Feel empowered to craft your content exactly as you envision it, whether through markdown's simplicity or the precision of HTML.
139-
140-
body:
141-
...
107+
paper: https://example.com/paper
108+
code: https://github.com/your/repo
109+
# ... other configurations
142110
```
143111

144-
### Release your project page automatically bt GitHub Actions
145-
- Navigate to `https://github.com/{your-github-repo-path}/settings/pages`
146-
- Select `GitHub Actions` at **Build and Deployment > Source**
147-
- `$ git remote add origin {your-github-repo-path}`
148-
- `$ git push origin main`
149-
- See also: [GitHub Documentation](https://docs.github.com/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) and [actions/deploy-pages](https://github.com/actions/deploy-pages)
112+
## 🚀 Release Your Project Page
113+
114+
### Automatic Deployment with GitHub Actions
115+
116+
1. Go to your repository's Settings > Pages
117+
2. Under Build and Deployment > Source, select `GitHub Actions`
118+
3. Configure your remote repository:
119+
120+
```bash
121+
git remote add origin your-repo-url
122+
git push origin project-page
123+
```
124+
125+
📚 For more details:
126+
127+
- [GitHub Pages Documentation](https://docs.github.com/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)
128+
- [actions-deploy-pages](https://github.com/actions/deploy-pages)
129+
130+
## 📄 License
131+
132+
[CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)

0 commit comments

Comments
 (0)