Skip to content

A simple link hub, to display and search links. Allows easy branding, runs with the least privileges and is simple to use.

License

Notifications You must be signed in to change notification settings

timo-reymann/yal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yal - Yet Another Landingpage

LICENSE DockerHub Pulls Go Report Card codecov CircleCI GitHub Release Renovate Quality Gate Status Security Rating Bugs


A simple link hub, to display and search links. Allows easy branding, runs with the least privileges and is simple to use.

Demo

Click here

Features

  • statically generated site
  • single static-compiled go binary
  • runs as non-root by default
  • integrate any search engine
  • simple and intuitive design
  • integrated search
  • inlines external images on start up
  • dependency free
  • fully accessible for blind people & screen reader users

Requirements

  • any container platform or supported base system

Installation

Run server as container

The container generates the static HTML page on startup, keeps it in memory and serves it using a go webserver.

You can simply run it using e.g. docker with docker-compose:

version: "3.5"
services:
  yal:
    image: timoreymann/yal:latest # check for version to use if you would like to pin it
    restart: always
    ports:
      - <public-port>:2024
    volumes:
      - ./config:/app/config
      - ./icons:/app/icons # optional in case you want to use local icons
      - ./images:/app/images # contains favicon etc.
    environment:
      # Port to listen
      YAL_PORT: 2024
      # page title for html
      YAL_PAGE_TITLE: My link hub
      # Path to config files
      YAL_CONFIG_FOLDER: /app/config
      # Path to images, see below for available ones
      YAL_IMAGES_FOLDER: /app/images
      # Omit file extension as it will be picked up by name automatically
      # each of the entries is searched like ${YAL_IMAGES_FOLDER}/<icon>{png,jpg,jpeg,svg}
      # if that does not succeed, an attempt is made to load the path as is and if
      # there is no such file it tries to load it as an URL.
      YAL_MASCOT: mascot # the mascot to display on the left
      YAL_LOGO: logo # logo to display on the right
      YAL_BACKGROUND: background # background image for page
      YAL_FAVICON: favicon # favicon to serve

Generate static HTML file

Specifying all env vars manually (if you want to customize them) and keeping the directory structure you can also just generate a static HTML page.

  1. Download the latest release for your platform
  2. ./yal --render --output file.html
  3. Serve file.html using any static file server

Configuration

THe container comes with some demo data by default, while the CLI will fail with an error when you attempt to render the page without the corresponding files present.

Environment variables

Name Description Default
YAL_PORT The HTTP port of the server when run with -serve (default) 2024
YAL_PAGE_TITLE Title of the HTML page generated LinkHub - The place where it just clicks.
YAL_CONFIG_FOLDER Relative or absolute path where the configuration files reside ./config
YAL_IMAGES_FOLDER Relative or absolute path where the images reside ./config
YAL_MASCOT Basename of a file without extension (searched in $YAL_IMAGES_FOLDER) or an HTTP url of the image to be used as a mascot on the left mascot
YAL_LOGO Basename of a file without extension (searched in $YAL_IMAGES_FOLDER) or an HTTP url of the image to be used as a logo on the right logo
YAL_FAVICON Basename of a file without extension (searched in $YAL_IMAGES_FOLDER) or an HTTP url of the image to be used as favicon for the page favicon
YAL_BACKGROUND Basename of a file without extension (searched in $YAL_IMAGES_FOLDER) or an HTTP url of the image to be used as a background image background

Files

Besides the env vars, there are two config files to maintain:

searchEngines.json

Configures the search engines for search box to display as last elements

[
  {
    "title": "Name",
    "urlPrefix": "https://my.search?text=<here search term will be appended>"
  }
]

items.json

Configures the links to display.

[
  {
    "title": "<Title of the section>",
    "entries": [
      {
        "text": "<Display text for the link>",
        "link": "<link>",
        "description": "<short description for search and hover tooltip>",
        "icon": "<url or local path, can be relative; needs to be accessible by container and will be inlined on start up>"
      }
    ]
  }
]

Motivation

There are a tons of landing pages out there, each has a unique set of features.

Some simply provide a lot of stuff that are not necessary for a simple link hub. Others look too cluttered or are not intuitive to use.

This project aims to fill the gap and provide a link hub with search that is easy to brand and use. Nothing more or less.

Contributing

I love your input! I want to make contributing to this project as easy and transparent as possible, whether it's:

  • Reporting a bug
  • Discussing the current state of the configuration
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

To get started please read the Contribution Guidelines.

Development

Requirements

Test

make test

Build

make build

Alternatives

  • Heimdall - in case you need more powerful features such as widgets etc.
  • jump - if you want more whitespace and hidden functionality by default
  • homepage - if you want to utilize all the space completely and need widgets
  • homer - for a bit more bloated UI