Git Product home page Git Product logo

artshumrc / scrolls-astro Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 11.06 MB

Medieval Scrolls is a comprehensive resource for research on scrolls in the middle ages, originally developed for Tom Kelly's HarvardX course "Scrolls in the Age of the Book." This repo is a static Astro redesign of the initial Wordpress implementation.

Home Page: https://artshumrc.github.io/scrolls-astro/

JavaScript 3.30% Astro 16.46% TypeScript 0.02% CSS 79.68% Python 0.53%
astro manuscripts medieval-studies scrolls ssg

scrolls-astro's Introduction

Medieval Scrolls Astro

  • The Medieval Scrolls Digital Archive is a comprehensive resource for research on scrolls in the Middle Ages. The website was originally designed as a supplementary resource for Tom Kelly's HarvardX course Scrolls in the Age of the Book, which provided an introduction to the making and use of scrolls in the European Middle Ages. In its first iteration it was a Wordpress + Angular application. This project is a redesign of the website using Astro, a static site generator.
  • Data was migrated from Wordpress to Astro using wordpress-export-to-markdown (see /migration folder for details).
  • The data source for the Astro application is stored in Google Sheets and transformed into JSON (data/scrolls_master_list.json) using OpenSheet in scrape_sheets/scrape_sheet.py. A Github Actions workflow (update_scrolls_data) on a cron job is used to update the JSON file in the repository. enhance_sheets/enhance_sheets.py was used to add additional metadata to the Sheet on a one-time basis.
  • Running npm run build will rebuild the Pagefind index. pagefind is a CloudCannon package used for static search functionality. We are currently using their Default UI, which has some limitations, such as not being able to have a null search (so there are no results until the user starts typing). We will eventually move to using their Modular UI, but it is still in beta and presented other challenges as of June 2024.

๐Ÿš€ Project Structure

  • The Astro app is in src.
  • Astro components (or Vue, React, Svelte, etc - Astro can wrap any of them) live in src/components.
  • We are using Typescript; the type definitions are in src/types.
  • Astro looks for .astro or .md files in the src/pages/ directory. Each page is exposed as a route based on its file name. scrolls has an index page (for the search) and a dynamic route for each scroll at [...slug].astro.
  • Any static assets, like images, can be placed in the public/ directory.
  • The built application is output to the dist/ directory.
/
โ”œโ”€โ”€ .astro
โ”œโ”€โ”€ .git
โ”œโ”€โ”€ .github/workflows
โ”œโ”€โ”€ dist/
โ”œโ”€โ”€ enhance_sheets/
โ”œโ”€โ”€ migration/wordpress-export-to-markdown
โ”œโ”€โ”€ public/
โ”‚   โ””โ”€โ”€ favicon.svg
โ”œโ”€โ”€ scrape_sheets
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ””โ”€โ”€ Footer.astro
โ”‚   โ”‚   โ””โ”€โ”€ Header.astro ...
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ layouts/
โ”‚   โ”‚   โ””โ”€โ”€ BaseLayout.astro
โ”‚   โ”‚   โ””โ”€โ”€ PageLayout.astro
โ”‚   โ”‚   โ””โ”€โ”€ ScrollLayout.astro
โ”‚   โ””โ”€โ”€ pages/
โ”‚   โ”‚   โ””โ”€โ”€ scrolls/
โ”‚   โ”‚       โ””โ”€โ”€ [...slug].astro
โ”‚   โ”‚       โ””โ”€โ”€ index.astro
โ”‚   โ”‚   โ””โ”€โ”€ bibliography.astro
โ”‚   โ”‚   โ””โ”€โ”€ houghton-library.astro
โ”‚   โ”‚   โ””โ”€โ”€ index.astro
โ”‚   โ”‚   โ””โ”€โ”€ intro.astro
โ”‚   โ””โ”€โ”€ styles/
โ”‚   โ””โ”€โ”€ types/
โ”‚   โ”‚   โ””โ”€โ”€ Scroll.d.ts
โ”‚   โ””โ”€โ”€ consts.ts
โ”‚   โ””โ”€โ”€ env.d.ts
โ””โ”€โ”€ .gitignore
โ””โ”€โ”€ .nojekyll
โ””โ”€โ”€ .nvmrc
โ””โ”€โ”€ .astro.config.mjs
โ””โ”€โ”€ package.json
โ””โ”€โ”€ package-lock.json
โ””โ”€โ”€ README.md
โ””โ”€โ”€ tsconfig.json

๐Ÿงž Commands

All commands are run from the root of the project, from a terminal:

Command Action
npm install Installs dependencies
npm run dev Starts local dev server at localhost:4321
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying
npm run astro ... Run CLI commands like astro add, astro check
npm run astro -- --help Get help using the Astro CLI

scrolls-astro's People

Contributors

coledcrawford avatar

Watchers

Lucian avatar Rashmi Singhal avatar Brian Loue avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.