Skip to content

xHain-hackspace/xhain-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

595 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xHain hack+makespace Homepage

Staging: https://staging.x-hain.de status-badge

Production: https://www.x-hain.de status-badge

Getting started

Install Hugo

The required Hugo version is pinned in the .hvm file. This ensures local development and CI use the same version.

Linux

sudo snap install hugo

Note: snap might install a different version than specified in .hvm file.

macOS

# Install brew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Hugo
brew install hugo

Note: Homebrew only installs the latest version, which can be a different version than specified in .hvm file.

Windows

# Using Chocolatey 
choco install hugo-extended
# Using Scoop 
scoop install hugo-extended

Note: choco / scoop might install a different version than specified in .hvm file.

To install the exact same version as the one we use online...

This is useful to be sure that the build locally will behave the same later, in CI pipeline and online.

We will be using hvm (Hugo Version Manager), which works on Linux, macOS and Windows.

  • Install the executable

Download a prebuilt binary or install from source (requires Go 1.26.3 or later):

# Install brew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install dependencies
brew install go

# Install hvm
go install github.com/jmooring/hvm@latest
  • Linux / macOS (bash or fish can also be used):
# Add to your shell (zsh)
hvm gen alias zsh >> ~/.zshrc
source ~/.zshrc

Windows:

# Add to your shell (zsh)
hvm gen alias powershell --help

# Follow instructions from output

Finally, run hugo!

# hvm will automatically download and use the version from .hvm
hugo version

More info? see https://tsalikis.blog/posts/switching_hugo_versions/

Theme

This site currently does not use an external Hugo theme. The templates and assets live in this repository under layouts/, assets/, and static/.

If we add or update a theme in the future, prefer Hugo Modules over Git submodules:

Recommended workflow:

  1. Create a branch.
  2. Import the theme as a Hugo Module and commit the generated go.mod and go.sum.
  3. Keep local overrides in this repository instead of editing vendored theme files directly.
  4. Run hugo mod get -u <module-path> for updates, then hugo mod tidy.
  5. Build with the pinned Hugo version and check generated language links, RSS, sitemap alternates, and CI warnings.

Generate Site

  • Run hugo to generate HTML: hugo

  • Run hugo for local development:

    hugo server --config config.toml

    or

    hugo server --config config.toml -w --cleanDestinationDir

Content Editing

New Post

  • create new post (using archetypes):

    hugo new de/post/YYYY-MM-DD_title.de.md -k post

    or

    hugo new en/post/YYYY-MM-DD_title.en.md -k post

  • just edit new post in the "content"-folder

Link Checking

Dead links are automatically checked on pull requests. To run locally:

# Build the site first
hugo -d public_html --config config.toml --cleanDestinationDir

# Check for broken links (via Docker)
docker run --rm -v "$PWD:/src" -w /src ghcr.io/untitaker/hyperlink:0.2.0 \
  public_html --sources .

# Or install natively and run
npm install -g @untitaker/hyperlink
hyperlink public_html/ --sources .

See hyperlink documentation for more options.

Calendar

The calendar is managed by Nextcloud.

About

Website on https://x-hain.de

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors