Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update website #24

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
22ce20b
Add markdownlint
FireIsGood Feb 7, 2025
3c1d765
Update README formatting
FireIsGood Feb 7, 2025
b901820
Add license to README
FireIsGood Feb 8, 2025
2328abc
Add prettier
FireIsGood Feb 8, 2025
ddb76f6
Clean up README
FireIsGood Feb 8, 2025
93eed44
Add pagefind script
FireIsGood Feb 8, 2025
660c1fd
Remove unused font readme
FireIsGood Feb 8, 2025
c0c3ba0
Remove nobr shortcode (unused and deprecated
FireIsGood Feb 8, 2025
e896d36
Add markdownlint
FireIsGood Feb 8, 2025
675d8a7
Format and lint everything
FireIsGood Feb 8, 2025
9bed21a
Fix head being dumped into the body
FireIsGood Feb 11, 2025
c51af33
Add favicon
FireIsGood Feb 11, 2025
7b1a84a
Fix hero image centering
FireIsGood Feb 11, 2025
7c72895
Add lang to html
FireIsGood Feb 11, 2025
8507700
Refactor head meta tags
FireIsGood Feb 11, 2025
cd0b320
Change list icon to just HTML entity
FireIsGood Feb 11, 2025
4ee2bfd
Change header size to be consistent with OSU website
FireIsGood Feb 11, 2025
b3181eb
Refactor footer link styles
FireIsGood Feb 11, 2025
f23873e
Fix footer not fitting to bottom
FireIsGood Feb 11, 2025
1bc0668
Change breadcrumb to match CASS
FireIsGood Feb 11, 2025
813b28c
Change logo to match OSU main site
FireIsGood Feb 11, 2025
305dc86
Add 404 page
FireIsGood Feb 11, 2025
67e82bb
Reformat other changes for prettier/markdownlint setup
FireIsGood Feb 13, 2025
aa8f7e7
Improve blog display and fix pagination
FireIsGood Feb 13, 2025
f316633
Fix hosting cards style
FireIsGood Feb 13, 2025
1988c7b
Update blog page title
FireIsGood Feb 13, 2025
e8093cd
Remove unused button
FireIsGood Feb 13, 2025
22352fd
Fix menu unintended margin
FireIsGood Feb 13, 2025
c82f9fc
Improve main menu style
FireIsGood Feb 13, 2025
07ac566
Improve blog header text link semantics
FireIsGood Feb 13, 2025
281e325
Improve all styles
FireIsGood Feb 15, 2025
566c2d1
Add hero links and icons
FireIsGood Feb 15, 2025
477d140
Move font size bump to body for REM calculations
FireIsGood Feb 15, 2025
66854d7
Add left margin to floating people images
FireIsGood Feb 15, 2025
507b75c
Fix blog list page incorrect page title
FireIsGood Feb 17, 2025
627b598
Add page tags
FireIsGood Feb 18, 2025
7a22b51
Fix goldmark raw html warning
FireIsGood Feb 18, 2025
82e9979
Update archetypes
FireIsGood Feb 18, 2025
3302ae3
Update all posts to match new archetype
FireIsGood Feb 18, 2025
69e1a78
Decrease H2 font size to differentiate from H1
FireIsGood Feb 18, 2025
28fed67
Decrease left pad of ul
FireIsGood Feb 18, 2025
9738ed5
Remove unused clearfix
FireIsGood Feb 18, 2025
837b5c9
Add blog tag setup
FireIsGood Feb 18, 2025
234afce
Fix formatting to a proper list
ramereth Feb 20, 2025
cda0166
Fix baseURL breaking hugo server output
FireIsGood Feb 22, 2025
6f9daef
Improve README
FireIsGood Feb 22, 2025
3cb028b
Add markdownlint and Prettier CI
FireIsGood Feb 26, 2025
37640e0
Fix lint command file finding argument
FireIsGood Feb 26, 2025
24317c7
Fix markdownlint errors
FireIsGood Feb 26, 2025
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
public/
pagefind
.hugo_build.lock
node_modules
10 changes: 10 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md
line-length:
line_length: 120
tables: false

# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md033.md
no-inline-html: false

# MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md036.md
no-emphasis-as-heading: false
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"printWidth": 120,
"proseWrap": "always",
"plugins": ["prettier-plugin-go-template"],
"overrides": [
{
"files": ["*.html"],
"options": {
"parser": "go-template"
}
}
]
}
65 changes: 43 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,72 @@
OSUOSL Hugo Static Site
=======================
# OSUOSL Hugo Static Site

Migrated from our static [Pelican site](https://github.com/osuosl/osuosl-pelican)

Based off of the Mainroad theme on https://github.com/Vimux/Mainroad and the previous [OSL theme](https://github.com/osuosl/dougfir-pelican-theme)
Based off of the [Mainroad theme](https://github.com/Vimux/Mainroad) and the previous
[OSL theme](https://github.com/osuosl/dougfir-pelican-theme)

Changes From Pelican
--------------------
## Changes From Pelican

Hugo uses markdown to write its pages, thus the front matter of a page will look slightly different.

The author of a page should be included as an array of ``authors`` within the front matter:
The author of a page should be included as an array of `authors` within the front matter:

```
```md
---
authors: [OSUOSL Admin]
---
```

To add a header image at the top of a blog pst, use the CSS tag ``#blog``:
To add a header image at the top of a blog post, use the CSS tag `#blog`:

```
```md
![Image Alt](/images/image_path#blog)
```

Dependencies
------------
## Dependencies

The search feature is implemented using [Pagefind](https://pagefind.app/) and can be installed with `npx` or by [downloading the binary](https://pagefind.app/docs/installation/#downloading-a-precompiled-binary).
The search feature is implemented using [Pagefind](https://pagefind.app/) and can be run with the npm script `serve` or
by [downloading the binary](https://pagefind.app/docs/installation/#downloading-a-precompiled-binary).

Development
-----------
## Development

To compile and host the site under development on port 1313, use:
To compile and host the site under development on port `1313`, use:

```
$ hugo server
```bash
hugo server
```

Pagefind sources from the `public/` directory hugo compiles when the website is built. To view the website with full functionality:
Pagefind sources from the `public/` directory Hugo compiles when the website is built. To view the website with full
functionality:

First compile it:

```bash
hugo
```
$ hugo

Then run it using Pagefind:

```bash
# NPM script
npm run serve

# Binary
./pagefind --site public --serve
```

Then run it using pagefind:
## Adding Content

Regular pages use the default `/archetypes/default.md` archetype.

Blog posts are stored in `/content/blog` and use the associated `/archetypes/blog.md` archetype.

To add a blog post, use the `hugo new` command:

```bash
hugo new blog/your-slug-title-here.md
```
$ ./pagefind --site public --serve
```

## License

[Apache 2.0](https://choosealicense.com/licenses/apache-2.0/)
8 changes: 8 additions & 0 deletions archetypes/blog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date | dateFormat "2006-04-13" }}
authors: ["OSL Admin"]
slug: {{ .Name }}
tags: []
draft: true
---
4 changes: 1 addition & 3 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
slug: {{ .Name }}
---

Loading