/bc-libraries-site-hugo

Boston College Library website built using the Hugo static site generator framework

Primary LanguageHTML

The Hugo files for the BC Libraries site.

Installation

Prerequisites

  1. Hugo extended edition (recommend using Homebrew on Mac or Choclatey on Windows)
  2. NodeJS for testing

Install

  1. Clone the site into a new directory.
    git clone https://github.com/BCLibraries/bc-libraries-site-hugo.git
  2. Install the testing framework.
    cd bc-libraries-site-hugo
    npm install
  3. Setup git hooks (optional).
    npx husky install

Building the site

The site is built using Hugo. Be sure to use the extended version with Sass/SCSS support.

Adding content

Use the hugo new command to add content, e.g.:

News

  1. Upload the image thumbnail to the appropriate subdirectory of /var/www/html/images/news on library.bc.edu.
  2. Create an AVIF and webp files of the image on library:
    npx avif image-filename.jpg
    mogrify -format webp image-filename.jpg
  3. Create the news item:
    hugo new news/2024-10/headline-in-slug-form.md
  4. Fill in the news metadata, using a previous story as the model.

Faculty publication highlights

hugo new facpub/2022-05-10-facpub-name.md

Exhibits

hugo new exhibit/bapst/2022-05-title.md

Testing

We use WebDriverIO for end-to-end tests. Spec files are in the /test/specs directory. To run:

npx wdio run ./wdio.conf.js

Deploying a new version of the bento search

Use the deploy-bento command to deploy new versions of the bento application:

./bin/deploy-bento /path/to/bcbento-client