Skip to content

Commit a241aaa

Browse files
committed
Merge branch 'main' of github.com:cdinger/cdinger.github.com
2 parents 17798c6 + e571be1 commit a241aaa

File tree

5 files changed

+92
-1
lines changed

5 files changed

+92
-1
lines changed

.github/workflows/jekyll.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+
name: Deploy Jekyll site to Pages
8+
9+
on:
10+
# Runs on pushes targeting the default branch
11+
push:
12+
branches: ["main"]
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
28+
29+
jobs:
30+
# Build job
31+
build:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Setup Ruby
37+
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
38+
with:
39+
ruby-version: '3.1' # Not needed with a .ruby-version file
40+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
41+
cache-version: 0 # Increment this number if you need to re-download cached gems
42+
- name: Setup Pages
43+
id: pages
44+
uses: actions/configure-pages@v5
45+
- name: Build with Jekyll
46+
# Outputs to the './_site' directory by default
47+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
48+
env:
49+
JEKYLL_ENV: production
50+
- name: Create pagefind index
51+
run: npm_config_yes=true npx pagefind --site "_site"
52+
- name: Upload artifact
53+
# Automatically uploads an artifact from the './_site' directory by default
54+
uses: actions/upload-pages-artifact@v3
55+
56+
# Deployment job
57+
deploy:
58+
environment:
59+
name: github-pages
60+
url: ${{ steps.deployment.outputs.page_url }}
61+
runs-on: ubuntu-latest
62+
needs: build
63+
steps:
64+
- name: Deploy to GitHub Pages
65+
id: deployment
66+
uses: actions/deploy-pages@v4

Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ PLATFORMS
8080
arm64-darwin-21
8181
arm64-darwin-23
8282
x86_64-darwin-20
83+
x86_64-linux
8384

8485
DEPENDENCIES
8586
jekyll

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# chrisdinger.com
2+
3+
This static site uses Jekyll and Pagefind. Build/serve it with:
4+
5+
```
6+
bundle exec jekyll build && npx pagefind@latest --site "_site" --serve
7+
```

_includes/footer.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
</section>
22
<footer>
3+
<p style="margin-bottom: 2em">
4+
<span>Posts</span><br />
5+
<a href="/search">Search</a><br />
6+
<a href="/archives">All posts</a>
7+
</p>
8+
39
<p>
410
<span>I'm Chris.</span><br />
511
<a href="mailto:[email protected]">[email protected]</a></br />
612
<a rel="me" href="https://mastodon.social/@cdinger">@cdinger</a><br />
713
<a href="https://github.com/cdinger">github.com/cdinger</a><br />
8-
<a href="/archives">All posts</a>
914
</p>
1015
</footer>
1116
</div>

search.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
layout: default
3+
---
4+
<h2>Search all posts</h2>
5+
<link href="/pagefind/pagefind-ui.css" rel="stylesheet">
6+
<script src="/pagefind/pagefind-ui.js"></script>
7+
<div id="search"></div>
8+
<script>
9+
window.addEventListener('DOMContentLoaded', (event) => {
10+
new PagefindUI({ element: "#search", showSubResults: true });
11+
});
12+
</script>

0 commit comments

Comments
 (0)