Skip to content

Building the Website

mat edited this page Apr 18, 2024 · 10 revisions

The Maktaba website utilizes Canopy IIIF, an open-source static site generator built on Next.js, which is designed for fast creation, contextualization, and customization of a discovery-focused digital scholarship and collections website using IIIF APIs.

Rebuilding the Maktaba Website

Manual

  1. Navigate to the Deploy to GitHub Pages workflow.
  2. Select the Run workflow dropdown and then confirm to select Run workflow again on the main branch.
  3. A build process will begin and the Maktaba website will publish using the up-to-date IIIF Collection.

Automatic

An new commits to the nulib-ds/maktaba repository will automatically rebuild the Maktaba website. For in-depth general documentation on editing content in Maktaba, see the Create Markdown Down guide for Canopy IIIF.

Editing Content

All Maktaba content edits should be made in the content directory of the codebase.

Adding Essays

  • Maktaba Essays will be created in the content/essays directory.
  • Essays should have front matter authored for them, including a title, the navigation value of essays, and a referencedManifests list with related manuscript manifest IDs.
  • Essay content below the front mater will be the converted Markdown.
  • Adding a ## Referenced Manuscripts section at the bottom of the content with <ReferencedItems /> component will help with user experience, creating a link to the referenced Manuscripts.

Example Essay

content/essays/example-essay.mdx

---
title: Example Essay
navigation: "essays"
referencedManifests:
  - "https://iiif-maktaba.dc.library.northwestern.edu/dc8ff749-adad-42a7-81e0-0eb473ef88a5.json"
---

# Example Essay

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin fermentum massa ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas lacinia. Nam ipsum ligula, eleifend at, accumsan nec, suscipit a, ipsum.

Proin porta, ante non faucibus accumsan, eros tellus gravida orci, et dictum neque justo et lectus. Integer neque risus, rutrum non, tempus in, tempor sit amet, libero. Vivamus viverra fermentum felis. Donec nonummy pellentesque ante. Praesent id justo in neque elementum ultrices. Duis sapien nunc, commodo et, interdum suscipit, sollicitudin et, dolor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

[...]

## Referenced Manuscripts

<ReferencedItems />

Edit Essays Navigation

To add a navigation item for the essay to the sidebar menu, you must add the item to content/essays/_meta.json file. Auto creation of these navigation items is not yet supported.

Example Essays Navigation

_content/essays/meta.json

[
  {
    "path": "/essays",
    "text": "Essays"
  },
  {
    "path": "/essays/example-essay",
    "text": "Example Essay"
  }
]

To add a new essay page with the path /essays/guide-for-the-heedless and the link text of Guide for the Heedless, the file would appear as:

[
  {
    "path": "/essays",
    "text": "Essays"
  },
  {
    "path": "/essays/guide-for-the-heedless",
    "text": "Guide for the Heedless"
  }
]

Clone this wiki locally