dunnkers / bookshelf-template

Template for generating a bookshelf.

Home Page:https://dunnkers.com/bookshelf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bookshelf-template

Hi! This is a template you can generate a Bookshelf website with.

bookshelf example

^ example of the bookshelf.

Usage

  1. Click Use this template to create a new repo.

    use this template GitHub button

  2. Install deps:

    yarn
    
  3. Build the website:

    yarn build
    

    This now put a static website in build. You can deploy this to GitHub pages.

Loading your own books

To now load your own books onto the bookshelf, go into compile-website.mjs and load your own books into the bookShelves variable.

const bookShelves = null; // Load your books into this variable.

You can, for example, organise your books on OpenLibrary.org and then retrieve your books using their awesome free API. If you happen to have a Goodreads API key then that is possible too, check out the goodreads-api. However, Goodreads no longer issues API keys for new users.

Deploying

GitHub pages

To deploy to GitHub pages, check out the file at .github/workflows/update-website.yml. It is possible to add a recurring schedule to periodically push a new bookshelf website. To do that, add the following:

on:
    schedule:
        - cron: "0 12 * * *"

To update the bookshelf every day at 12. See this link for a workflow using this schedule.

About

Built by Jeroen Overschie.

About

Template for generating a bookshelf.

https://dunnkers.com/bookshelf


Languages

Language:JavaScript 35.2%Language:Handlebars 32.9%Language:CSS 31.8%