Skip to content

momasta/omasta.net

Repository files navigation

omasta.net

My Personal Website

  • Live URL: omasta.net
  • Built using Hugo, an open-source static site generator.

A screenshot of the omasta.net website

Table of Contents

Features

Dependencies

Installation

  • Install Hugo

  • Clone this repository:

    git clone https://github.com/momasta/omasta.net.git
  • Enter the project directory:

    cd omasta.net
  • Test the site locally:

    killall hugo; hugo server --minify --bind 0.0.0.0 --baseURL="http://$(hostname -f):1313" --port 1313
  • Build the site:

    killall hugo; hugo --minify --cleanDestinationDir

Image Gallery

A Hugo shortcode based on this article by Christian Specht.

Usage

In a Markdown file

{{< gallery "geoguessr-tips" >}}
{{< gallery "memes" "type-grid" >}}
{{< gallery "tech-spurt" "type-grid size-s" "name" >}}

Arguments

  • Path (optional)
  • Class (optional)
    • Additional classes for .gallery
    • Space-separated, just like in HTML's class="" attribute.
    • Supports:
      • size-s: smaller thumbnails, no gallery filter input.
    • Default: ""
  • Sort By (optional)
    • Supports: "date", "name"
    • Default: "date"

Features

  • Uses Photoswipe to show images.
  • Captions based on filenames.
  • Images sorted by date.
  • WebP thumbnails
    • Short hashes for filenames.
    • Stored in a t/ subdirectory, out of the way.
    • 1x and 2x DPR variants for srcset.
    • Adds loading="eager" to the first 12 thumbnails, and loading="lazy" for the rest.
    • GIF support (uses the actual file as a thumbnail).
  • Accessibility markup
  • ?lightbox= URL param to open an image on page load.
  • Gallery Filter
    • Search-as-you-type image filtering.
    • Source: assets/js/gallery-filter.js
    • Fast and debounced.
    • Uses normalised strings to find matches, while giving priority to exact matches and "starts with".
    • Supports a ?q= URL param to prepopulate the search input.

Thanks

Hugo

WebStorm

PhotoSwipe

ai.robots.txt

  • A list of AI-related crawlers to block.
  • My website was made by a human, for humans.
    Not for half-baked hallucinating Cleverbot-like LLM chatbots, such as ChatGPT.
  • ai.robots.txt on GitHub

Blank

sass-boilerplate

Meteocons

About

My personal multi-lingual website, built using Hugo, a static site generator.

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Contributors