This is a Node project using the Astro framework to create a front-end to a RDF database containing content of the Digital Accessibility Framework. A copy of the data in JSON-LD format can be imported into a RDF database and used with this tool.
In addition to normal astro files, the src/scripts
folder includes import.js
to import content from the markdown / yaml format. The command line in that folder is node import
and when prompted give the name of the file to import. The base path is hardcoded for now, and for now it must be called once per file to import. At the moment, re-importing a file creates a duplicate of the data.
Run with astro server with npm run dev
. The dbquery.js
file manages the connection to the server (a SPARQL endpoint), with a hardcoded location for now.
The static
branch of this repository is configured to build static copies of the site. To update the build:
- Switch to the
static
branch. - Update from the
main
branch. - In the
src\script
folder runnode static-ids
. This will pull information from the database to drive the build. - In the project root folder, run
npm run build
. This will put the static site into thedist
folder. - Commit all the changes into the
static
branch and push to the server.
The gh-pages
branch serves a live version of the site with data as of last build. Update is not yet automated; to update, copy the contents of the dist
folder from the static
branch into the root folder of the gh-pages
branch.