Skip to content

NFDI4Culture/prototype-open-museum

 
 

Repository files navigation

BIM Prototype 02 Quarto Website

This project is configured as a Quarto website and ready for deployment to GitHub Pages using GitHub Actions.

Site structure

  • index.qmd: Homepage.
  • project-log.qmd: Implementation log.
  • wikidata.qmd: Wikidata notes and references.
  • wikidata-item.ipynb: Notebook-backed profile page rendered by Quarto.
  • wikidata_profile.py: Shared Python helper logic used by the notebook page.
  • _quarto.yml: Quarto project and navigation configuration.

GitHub Codespace

The repository includes a Dev Container configuration so you can work entirely in the browser without installing anything locally.

  1. On the repository page on GitHub, click CodeCodespacesCreate codespace on main.
  2. Wait for the container to build — Python packages from requirements.txt are installed automatically.
  3. Quarto will install itself
  4. Run the Quarto preview server:
quarto preview
  1. VS Code will prompt you to open the forwarded port in a browser — click Open in Browser to see the live site.
  2. To profile a different Wikidata item, open wikidata-item.ipynb, update item_id in Cell 3, then run all cells or re-run quarto render.

Local development

One-time local setup

Use one of the setup scripts to create .venv, install notebook dependencies, register the local Jupyter kernel, and install Quarto when a supported package manager is available.

Windows (PowerShell):

./scripts/setup-local.ps1

macOS/Linux:

chmod +x ./scripts/setup-local.sh
./scripts/setup-local.sh

If automatic Quarto installation is not possible on your system, install it from https://quarto.org/docs/get-started/ and then re-run the setup script.

Run locally

quarto preview

To render once:

quarto render

Update the Wikidata item page

  1. Open wikidata-item.ipynb.
  2. In Cell 3, change item_id to the target Wikidata Q-id.
  3. Run the notebook cells (or run quarto render).
  4. Confirm output in docs/wikidata-item.html.

The notebook runs a SPARQL query against the Wikidata Query Service, then renders a styled HTML profile with statement cards and summary charts.

Publish to GitHub Pages

  1. Create a GitHub repository and push this folder to the main branch.
  2. In GitHub, open Settings -> Pages.
  3. Under Build and deployment, set Source to GitHub Actions.
  4. Push changes to main.
  5. The workflow at .github/workflows/publish.yml builds and deploys the docs folder.

Manual deploy from GitHub UI

The workflow supports manual runs via workflow_dispatch.

  1. Open the repository on GitHub.
  2. Go to Actions -> Publish Quarto Site.
  3. Click Run workflow.
  4. Select the main branch and start the run.

Troubleshooting

  • If the notebook fetch fails from Wikidata, re-run quarto render after a short delay (the service can rate limit).
  • If notebook imports fail after code changes in wikidata_profile.py, restart the kernel and run notebook cells again.

First-time git setup (if needed)

git init
git add .
git commit -m "Initialize Quarto website project"
git branch -M main
git remote add origin <your-repo-url>
git push -u origin main

Licence

Code: MIT Licence

Content: CC BY-SA 4.0

Source code is released under the MIT Licence. Written content, documentation, and non-code assets are licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).

About

Open Exhibition Prototype Test Templates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 56.1%
  • Python 35.0%
  • PowerShell 4.5%
  • Shell 4.4%