-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4d2550
commit 8cfcf24
Showing
276 changed files
with
2,079 additions
and
30,067 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Next.js Build | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'dev/**' | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
# From https://github.com/r-lib/actions/tree/v2-branch/setup-r | ||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: '4.3.1' | ||
|
||
- name: Install R package dependencies | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
cache-version: 2 | ||
packages: | | ||
any::renv | ||
# - name: Install R dependencies with renv | ||
# uses: r-lib/actions/setup-renv@v2 | ||
# with: | ||
# cache-version: 1 | ||
|
||
- name: Print GITHUB_TOKEN | ||
run: echo ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Print GITHUB_WORKSPACE | ||
run: echo ${GITHUB_WORKSPACE} | ||
|
||
# - name: Render and Publish | ||
# uses: quarto-dev/quarto-actions/publish@v2 | ||
# with: | ||
# target: gh-pages | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: List outputs after quarto render | ||
# run: | | ||
# ls -l "${GITHUB_WORKSPACE}/_site" | ||
|
||
- name: Setup Node.js | ||
uses: ./.github/workflows/node.js | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
with: | ||
static_site_generator: next | ||
|
||
- name: Build with Next.js | ||
run: npx next build | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./out | ||
|
||
- name: List outputs after next build | ||
run: | | ||
ls -l "${GITHUB_WORKSPACE}/out" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Next.js Build & Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
# From https://github.com/r-lib/actions/tree/v2-branch/setup-r | ||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: '4.3.1' | ||
|
||
- name: Install R package dependencies | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
cache-version: 2 | ||
packages: | | ||
any::renv | ||
# - name: Install R dependencies with renv | ||
# uses: r-lib/actions/setup-renv@v2 | ||
# with: | ||
# cache-version: 1 | ||
|
||
- name: Print GITHUB_TOKEN | ||
run: echo ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Print GITHUB_WORKSPACE | ||
run: echo ${GITHUB_WORKSPACE} | ||
|
||
# - name: Render and Publish | ||
# uses: quarto-dev/quarto-actions/publish@v2 | ||
# with: | ||
# target: gh-pages | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: List outputs after quarto render | ||
# run: | | ||
# ls -l "${GITHUB_WORKSPACE}/_site" | ||
|
||
- name: Setup Node.js | ||
uses: ./.github/workflows/node.js | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
with: | ||
static_site_generator: next | ||
|
||
- name: Build with Next.js | ||
run: npx next build | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./out | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Publish to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: setup-node | ||
description: "Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Node.js ⚙️ | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Cache dependencies ⚡ | ||
id: cache_dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: node-modules-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies 🔧 | ||
shell: bash | ||
if: steps.cache_dependencies.outputs.cache-hit != 'true' | ||
run: npm ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: "Real~Currents" | ||
--- | ||
|
||
This site is about signs and symbols in motion; a showcase of | ||
experiments in Information Experience Design (IxD). It’s purpose is to | ||
recognize and explore our need to turn what often appears to be a | ||
tsunami or avalanche of data (waves) into familiar and intuitive | ||
patterns (currents) which have direction, velocity and stability (or | ||
meta-stability). | ||
|
||
In terms of information and insight (wisdom): | ||
|
||
- Is disruption a consequence or a cause of novel phenomena, or can it | ||
be both? | ||
- Is the inevitable impact of a tsunami to wreak havoc and destruction, | ||
or can it be the first phase of an unfolding wave of chain reactions | ||
which simultaneously transform the previous landscape and give birth | ||
to a new environment? | ||
|
||
Our interests lean toward producing and promoting methods for tracing | ||
the potential path (locus) of these phenomena, from where they begin to | ||
where they may lead, with an emphasis on interpretability, reasonability | ||
and usability. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import React from "react"; | ||
import fs from "fs"; | ||
import matter from "gray-matter"; | ||
import Markdown from "markdown-to-jsx"; | ||
import { metadata } from "@/app/layout"; | ||
import { Post } from "@/types"; | ||
import { getPostMetadata } from "@/utils"; | ||
import StaticRewriteComponent from "@/components/StaticRewriteComponent"; | ||
|
||
interface ContentParams { | ||
params: Post; | ||
} | ||
|
||
// Return a list of `params` to populate the [slug] dynamic segment | ||
export async function generateStaticParams (): Promise<Post[]> { | ||
// const posts = // await fetch('https://.../posts').then((res) => res.json()) | ||
// [ | ||
// { slug: "apple_pie" }, // => /content/apple_pie.html | ||
// { slug: "banana_bread" }, // => /content/banana_bread.html | ||
// { slug: "blueberry_scones" }, // => /content/blueberry_scones.html | ||
// { slug: "chocolate_chip_cookies" }, // => /content/chocolate_chip_cookies.html | ||
// { slug: "cinnamon_rolls" }, // => /content/cinnamon_rolls.html | ||
// { slug: "lemon_poppy_seed_muffins" } // => /content/lemon_poppy_seed_muffins.html | ||
// ]; | ||
|
||
return ( | ||
// posts.map((post) => ({ | ||
// slug: post.slug, | ||
// })); | ||
getPostMetadata("content/recipes") | ||
); | ||
} | ||
|
||
export async function generateMetadata ({ params }: ContentParams) { | ||
const id: string = (!!params?.slug) ? params.slug : ''; | ||
return { | ||
title: `${metadata.title} - ${id.replaceAll("_", " ")}` | ||
} | ||
} | ||
|
||
function getPostContent (slug: string) { | ||
const file = `./content/recipes/${slug}.md`; | ||
const content = fs.readFileSync(file, "utf8"); | ||
|
||
const matterResult = matter(content); | ||
return matterResult; | ||
} | ||
|
||
// Multiple versions of this page will be statically generated | ||
// using the `params` returned by `generateStaticParams` | ||
export default function ContentPage ({ params }: ContentParams) { | ||
const { slug } = params; | ||
const postMatter = getPostContent(slug); | ||
|
||
return ( | ||
<main> | ||
<article> | ||
<Markdown>{postMatter.content}</Markdown> | ||
</article> | ||
<StaticRewriteComponent uri={`/content/${slug}.html`} /> | ||
</main> | ||
); | ||
} |
Oops, something went wrong.