generated from canopy-iiif/canopy-iiif
-
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
0 parents
commit cdb6c4d
Showing
164 changed files
with
20,862 additions
and
0 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,2 @@ | ||
NEXT_PUBLIC_URL = "https://canopy-iiif.vercel.app" | ||
NEXT_PUBLIC_BASE_PATH = "" |
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,28 @@ | ||
{ | ||
"plugins": ["@typescript-eslint", "testing-library"], | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended", | ||
"next", | ||
"next/core-web-vitals", | ||
"prettier" | ||
], | ||
"overrides": [ | ||
// Only uses Testing Library lint rules in test files | ||
{ | ||
"files": [ | ||
"**/__tests__/**/*.[jt]s?(x)", | ||
"**/?(*.)+(spec|test).[jt]s?(x)" | ||
], | ||
"extends": ["plugin:testing-library/react"] | ||
} | ||
], | ||
"rules": { | ||
// "sort-keys": "error", | ||
// "sort-imports": "error", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/sort-type-union-intersection-members": "error", | ||
"@typescript-eslint/ban-ts-comment": "off" | ||
} | ||
} |
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,27 @@ | ||
--- | ||
name: Bug | ||
about: Report an issue | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,14 @@ | ||
--- | ||
name: Feature/Enhancement | ||
about: New feature or enhancement | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Description | ||
|
||
## Done Looks Like | ||
- [ ] to do 1 | ||
- [ ] to do 2 |
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,15 @@ | ||
# What does this do? | ||
|
||
_Please include a summary of the changes and the related issue. Please also include relevant motivation and context._ | ||
|
||
## What type of change is this? | ||
|
||
- [ ] 🐛 **Bug fix** (non-breaking change addressing an issue) | ||
- [ ] ✨ **New feature or enhancement** (non-breaking change which adds functionality) | ||
- [ ] 🧨 **Breaking change** (fix or feature that would cause existing functionality to not work as expected) | ||
- [ ] 🚧 **Maintenance or refinement of codebase structur**e (ex: dependency updates) | ||
- [ ] 📘 **Documentation update** | ||
|
||
## Additional Notes | ||
|
||
_Please include any extra notes here._ |
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,17 @@ | ||
name: Test IIIF Collection Aggregation/Build | ||
on: push | ||
jobs: | ||
aggregate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: IIIF Presentation API 2.x Collection (Aggregation) | ||
run: npm run prebuild -- --path=./config/.fixtures/canopy.presentation-2.json | ||
- name: IIIF Presentation API 2.x Collection (Build) | ||
run: npm run test-build | ||
- name: IIIF Presentation API 3.0 Collection (Aggregation) | ||
run: npm run prebuild -- --path=./config/.fixtures/canopy.presentation-3.json | ||
- name: IIIF Presentation API 3.0 Collection (Build) | ||
run: npm run test-build |
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,36 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
NEXT_PUBLIC_URL: https://canopy-iiif.github.io | ||
NEXT_PUBLIC_BASE_PATH: /canopy-iiif | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
|
||
steps: | ||
- name: Get files | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install packages | ||
run: npm ci | ||
- name: Export static files | ||
run: npm run build:static | ||
- name: Add .nojekyll file | ||
run: touch ./out/.nojekyll | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: 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,41 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
.canopy | ||
.vscode | ||
|
||
public/api | ||
public/robots.txt | ||
public/sitemap* |
Empty file.
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Mat Jordan | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,110 @@ | ||
# Canopy IIIF | ||
|
||
A purely IIIF sourced static site generator using Next.js. Canopy is an application that will build a browseable and searchable digital collections style static site entirely from a IIIF Collection and the items it contains. | ||
|
||
- [Demo (Vercel)](https://canopy-iiif.vercel.app/) | ||
- [Demo (Static)](https://canopy-iiif.github.io/canopy-iiif/) | ||
- [Documentation](https://canopy-iiif.vercel.app/about) | ||
|
||
> **Warning** | ||
> Canopy is a work in progress and being built in public. | ||
## Examples | ||
|
||
### [Nez Perce](https://canopy-iiif-git-nez-perce-iiif.vercel.app/) | ||
|
||
- IIIF Presentation API 3.0 | ||
- 119 items | ||
- Provided by Northwestern University Libraries | ||
|
||
### [William Cox Cochran Photographic Collection](https://canopy-iiif.vercel.app/) | ||
|
||
- IIIF Presentation API 3.0 | ||
- 90 items | ||
- Provided by University of Tennessee Libraries | ||
- `navPlace` + Map | ||
|
||
### [The Botanical photography of Alan S. Heilman](https://canopy-iiif-git-heilman-mathewjordan.vercel.app/) | ||
|
||
- IIIF Presentation API 3.0 | ||
- 1120 items | ||
- Provided by University of Tennessee Libraries | ||
|
||
### [The Chimney Tops 2 Wildfires In Memory And Art](https://canopy-iiif-git-rfta-artists-mathewjordan.vercel.app/) | ||
|
||
- IIIF Presentation API 3.0 w/ Video Canvases | ||
- 43 items | ||
- Provided by University of Tennessee Libraries | ||
|
||
### [Canonici](https://canopy-iiif-git-canonici-mathewjordan.vercel.app/) | ||
|
||
- IIIF Presentation API 2.0 | ||
- 529 items | ||
- Provided by Bodleian Libraries, University of Oxford | ||
|
||
## Roadmap | ||
|
||
### Content | ||
|
||
- [x] Manifest as a `/work/` page | ||
- [ ] Collection as a `/collection/` page | ||
- [ ] Documentation for best-practice incorporating non-IIIF front matter | ||
- [x] Homepage metadata sliders | ||
|
||
### Data Aggregration | ||
|
||
- [x] Collection of Manifests (i.e. `depth === 1`) | ||
- [ ] Collection of Collections (i.e. `depth > 1`) | ||
- [x] Harvesting of curated metadata labels | ||
- [ ] Leveraging BCP 47 and internationalization | ||
|
||
### Search | ||
|
||
- [x] Basic search on label(s) | ||
- [ ] No results language | ||
- [x] Search on summary and metadata entries | ||
- [x] Search page facets on curated metadata | ||
- [x] `next/link` routing from Work metadata to search page facets | ||
|
||
### User Interface & Experience | ||
|
||
- [x] Fully Responsive | ||
- [x] Continuous scroll & lazy load of search results | ||
- [ ] Custom theme support | ||
|
||
### Configuration | ||
|
||
- [x] Localization preferences | ||
- [x] Site title label override | ||
- [ ] Slug pattern options | ||
|
||
## Setup | ||
|
||
### Install Dependencies | ||
|
||
```shell | ||
# installation | ||
npm i | ||
``` | ||
|
||
### Running in Development | ||
|
||
```shell | ||
# development | ||
npm run dev | ||
``` | ||
|
||
### Building in Production | ||
|
||
```shell | ||
# build | ||
npm run build | ||
``` | ||
|
||
## Configuration | ||
|
||
Canopy IIIF uses a default configuration `config/.default/canopy.default.json` for demonstration purposes if a custom one is not set. The build process will read from a custom configuration file at `config/canopy.json` if it exists. Please review [configuration documentation](https://canopy-iiif.vercel.app/about) for customization of Canopy IIIF. | ||
|
||
## License | ||
|
||
This project is [licensed](https://github.com/canopy-iiif/canopy-iiif/blob/main/LICENSE) under the MIT License. |
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,44 @@ | ||
require("dotenv").config(); | ||
const aggregate = require("./services/build/aggregate"); | ||
const { | ||
getConfig, | ||
getOptions, | ||
getNavigation, | ||
} = require("./services/build/config"); | ||
const args = process.argv; | ||
|
||
(() => { | ||
const path = args | ||
.find((value) => value.includes("--path=")) | ||
?.split("=") | ||
?.pop(); | ||
|
||
const config = getConfig(path); | ||
const options = getOptions(); | ||
const navigation = getNavigation(); | ||
const { prod, dev } = config; | ||
|
||
config.environment = args.includes("dev") ? dev : prod; | ||
config.options = options; | ||
|
||
const url = args.includes("dev") | ||
? `http://localhost:5001` | ||
: process.env.NEXT_PUBLIC_URL; | ||
const basePath = process.env.NEXT_PUBLIC_BASE_PATH; | ||
const baseUrl = basePath ? `${url}${basePath}` : url; | ||
|
||
const env = { | ||
CANOPY_CONFIG: { | ||
...config.environment, | ||
navigation: navigation, | ||
...config.options, | ||
url, | ||
basePath, | ||
baseUrl, | ||
}, | ||
}; | ||
|
||
aggregate.build(env.CANOPY_CONFIG); | ||
})(); | ||
|
||
module.exports = { getConfig }; |
Oops, something went wrong.