Skip to content

About

Resources

Code of conduct

Contributing

Security policy

Stars

10 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

261 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

dhbern.github.io

This repository contains the website of the Digital Humanities at the University of Bern. The data in this repository is openly available to everyone and is intended to support reproducible research.

GitHub issues GitHub forks GitHub stars Code license Data license

Repository Structure

The structure of this repository follows the Advanced Structure for Data Analysis of The Turing Way and is organized as follows:

  • .github/ - GitHub configuration files (issue templates, workflows).
  • .venv/ - Python virtual environment for website build.
  • assets/ - Images, stylesheets, JavaScript files.
  • docs/ - Documentation assets for README.md.
  • content/ - Website content: projects, services, events, news posts.
  • teaching/ - Teaching pages: programme overview, semester pages, planner, application.
  • intro-lecture/ - The online lecture Digital Humanities β€” Introductions; its source material (transcripts, lecture overviews, quiz sources) is in intro-lecture/_src/, which Quarto does not publish.
  • renv/ - R environment for website build.

πŸ”— URL Rule: Teaching at the Top Level, Everything Else under /content/

When you add a top-level teaching folder to this repository:

  • Pick a name that no DHBern repository uses: a repository with GitHub Pages is served at the same path and the two would collide.
  • Add the folder to link-external-filter in _quarto.yml; otherwise links to it get the external-link icon (see #133).
  • When a page moves, keep its old URL working with aliases: in the front matter.

πŸ“ Content Structure and Categorization

The site is available under two main domains:

graph TD
  A["dhbern.github.io"] --> A1["News Blog"]
  A --> A2["Events"]
  A --> A3["Projects"]
  A --> A4["Services"]
  A --> A5["Teaching (top level)"]

  B["dh.unibe.ch"] --> B1["Studies (official regulations)"]
  B --> B2["Team"]
Loading

Diagram: Overview of content domains for the public site and official university site.

  • Content at https://dhbern.github.io/ includes:

    • πŸ“° News and blog posts
    • πŸ“… Events
    • πŸ§ͺ Projects
    • πŸ›  Services
    • πŸ“š Teaching: programme overview, course sites and the online lecture
  • The official DH Bern university pages at https://www.dh.unibe.ch/ cover:

    • πŸ“š Study programmes (official pages and regulations)
    • πŸ‘₯ Team information
      • ➀ Changes to the team page are made via this Office form (contact: Dominik Kilchmann).

Folder Structure of Content

graph TD
  root(content/)

  sub1[projects/] --> pj1[project-shortname/]
  pj1 --> pjindex[index.qmd]
  pj1 --> pjpost[YYYYMMDD-shortname-post/index.qmd]
  pj1 --> pjevent[YYYYMMDD-shortname-event/index.qmd]

  sub2[services/] --> sv1[service-shortname/]
  sv1 --> svindex[index.qmd]
  sv1 --> svpost[YYYYMMDD-shortname-post/index.qmd]
  sv1 --> svevent[YYYYMMDD-shortname-event/index.qmd]

  sub3[posts/] --> pst1[YYYYMMDD-shortname/]
  pst1 --> pstindex[index.qmd]

  sub4[events/] --> ev1[YYYYMMDD-shortname/]
  ev1 --> evindex[index.qmd]

  root --> sub1
  root --> sub2
  root --> sub3
  root --> sub4
Loading

Diagram: Folder layout for the content/ directory, reflecting the site’s hierarchical structure.

  • content/projects/project-shortname/index.qmd Projects live here and can contain nested posts or events.

  • content/services/service-shortname/index.qmd Services must include categories: [Services] in the YAML header.

  • content/posts/YYYYMMDD-shortname/index.qmd News/blog posts require categories: [Post].

  • content/events/YYYYMMDD-shortname/index.qmd Event entries require categories: [Event].

Categorization Logic

  • 🏷 News posts: categories: [Post]
  • πŸ“† Events: categories: [Event]
  • πŸ›  Services: categories: [Services]

All must be named index.qmd and reside in correctly named folders.

πŸš€ Getting Started

We recommend using GitHub Codespaces for a quick and reproducible setup.

Quick Start with GitHub Codespaces

  1. Fork this repository to your GitHub account (if needed).

    Fork the repository
  2. Click the green <> Code button at the top right of this repository.

  3. Select the β€œCodespaces” tab and click β€œCreate codespace on main”. GitHub will now build a container that includes:

    • βœ… Node.js (via npm)
    • βœ… Python with uv
    • βœ… R with renv
    • βœ… Quarto
    Create Codespace
  4. Once the Codespace is ready, open a terminal and preview the documentation:

    uv run quarto preview
    Terminal window showing command

One Codespace, several pull requests

Pull requests here are merged as a single squashed commit. Your Codespace still holds your original commits, which main no longer contains in that form, so after the first merge the Sync Changes button reports "N commits ahead" and fails. Syncing again does not help. There are two ways to avoid this:

  • Simplest: one Codespace per pull request. Once the pull request is merged, delete the Codespace on github.com/codespaces and create a fresh one from main for the next change.

  • Reusing a Codespace: start every change on its own branch, created from the current main. Open a terminal (Terminal β†’ New Terminal) and run:

    git fetch origin
    git switch -c my-change origin/main

    Commit and sync on that branch, and open the pull request from it. Once it is merged, bring your main back in line with GitHub before the next change:

    git switch main
    git fetch origin
    git reset --hard origin/main

    git reset --hard throws away commits on your local main that are not on GitHub. Run it only after your pull request has been merged.

  • Working from a fork: in a Codespace created on your fork, origin is the fork, not DHBern/dhbern.github.io. Add the DHBern repository once as upstream:

    git remote add upstream https://github.com/DHBern/dhbern.github.io.git

    Then use upstream wherever the commands above say origin:

    git fetch upstream
    git switch -c my-change upstream/main

    Sync pushes the branch to your fork; open the pull request from there against DHBern/dhbern.github.io. After the merge:

    git switch main
    git fetch upstream
    git reset --hard upstream/main

    To bring your fork's main on GitHub up to date as well, use Sync fork on the fork's page.

πŸ‘©β€πŸ’» Setup Locally (Advanced Users)

Prerequisites

Note: uv installs and manages the correct Python version automatically.

Setup Steps

# 1. Install Node.js dependencies
npm install

# 2. Setup Python environment
uv sync

# 3. Setup R environment
Rscript -e 'install.packages("renv"); renv::restore()'

# 4. Preview documentation
uv run quarto preview

πŸ›  Usage

Lint files (Prettier check):

npm run check

Format all files (Prettier):

npm run format

Generate CHANGELOG.md:

npm run changelog

Preview the documentation:

uv run quarto preview

🧰 Support

This project is maintained by @DHBern. We encourage open support channels, so others can benefit.

Type Platforms
🚨 Bug Reports GitHub Issues
πŸ“Š Report Bad Data GitHub Issues
πŸ“š Docs Issues GitHub Issues
🎁 Feature Requests GitHub Issues
πŸ›‘ Security Vulnerabilities See SECURITY.md
πŸ’¬ General Questions GitHub Discussions

πŸ—Ί Roadmap

Upcoming priorities are tracked through the issue tracker and ongoing site development work.

🀝 Contributing

Contributions are welcome! Report problems, propose changes, or submit new features via issues or pull requests. See CONTRIBUTING.md for details.

🧾 Versioning

We use SemVer. See tags for available versions.

✍️ Authors and Acknowledgment

  • Moritz MΓ€hr – Initial work – @maehr

See also the list of contributors.

πŸͺͺ License

  • Data: Creative Commons Attribution 4.0 International (CC BY 4.0) – see LICENSE-CCBY.
  • Code: GNU Affero General Public License v3.0 – see LICENSE-AGPL.

About

Resources

Code of conduct

Contributing

Security policy

Stars

10 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages