Skip to content

MugTree/uk-trees-hugo-demo

Repository files navigation

Basic hugo site

🌎 https://mugtree.github.io/uk-trees-hugo-demo/

  • Pico CSS speed up development
  • Basic use of templates and partials
  • Content created by AI (CGPT) and added to content folder (content.md and qanda.json)
  • Images initially resized using ImageMagik - see workings dir
  • Hugo image functions for thumbnails

Basic use of modules

Todo

  • sizing for screen sizes - media queries
  • Add a robots.txt to keep out of indexes
  • Add a githubpages script to deploy

Questions

How to test the type that resources.Get returns?

{{ $img := resources.Get .Params.Image.Path }} {{ with $img}} {{ $img :=
$img.Crop "340x160" }}
<img
  loading="lazy"
  width="340px"
  class="grid-img"
  src="{{ $img.RelPermalink }}"
/>
{{ end }}

Something like this

{{ $img := resources.Get .Params.Image.Path }}
<div>
  {{ if and $img (eq $img.ResourceType "image") }} its an image {{ end}}
</div>

To add

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published