Loosli Red Angus Website

Hugo

Website Development

docker compose up server -d zsh: dcupd server

New Sale Year Steps

  1. Update hugo version in .env
  2. Update message on main sale page
  3. Create a new sale year by duplicating folder structure in sales
  4. Delete old images, excel files, csv, etc. in new sale year folder
  5. Update liveauction.com links in watch and bid live
  6. Update Sale Year in config/params
  7. Update the bull and heifer links in config/menu
  8. Update the bull and heifer links in config/params
  9. Update where to point to for the homepage bulls in content/_index
  10. Upload EPDs for bulls and Cows into Animals Airtable
  11. Run npm run getData:loc to generate the data/allData file

Bulls/Cows Pages

  1. Drop Excel version in directory...download button will be automatically created
  2. Drop CSV in directory...datatable will be automatically created. Note: make sure csv version has Lot # and Reg # columns.
  3. Images/videos:
    1. Drop Images into images directory
    2. Edit and then Run set_image_resource_metadata to set the image information in the associated _index.md file.

Datatables

  1. Add data to data directory in json format with three fields: headings, options, and data. options are additional Datatables options.
{
  "headings": ["Lot", "Reg", "Name"],
  "options": {"fixedHeader":  true },
  "data": [{"Lot": 1, "Reg":  123455, "Name": "Johnson"}]
}
  1. Add shortcode to template: (e.g. {{< dataTable id="bulls-2020" includejs="true" data_path="sales.2020.bulls" >}} )

Things to remember

Get list of images into a json file

  1. find static/images/cattle/2020/bulls/*.webp -maxdepth 1 -type f > bulls-images.txt
  2. Edit into a json list
  3. Place in data directory

Supplemental Sheets

  1. Add data to data/supplemental/data.{yml|json}

Scratchpad

Hugo Example