datadir

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package datadir says where goblog keeps the files it writes: .env, a SQLite database, uploads, and installed plugins and themes.

By default those live in the working directory, next to the templates and static files goblog ships with, which is how every install before this package existed is laid out. Setting GOBLOG_DATA_DIR moves all of them under one directory, so a container needs a single volume to keep its site (#653).

Index

Constants

View Source
const EnvVar = "GOBLOG_DATA_DIR"

EnvVar names the environment variable that sets the data directory.

Variables

This section is empty.

Functions

func Dir

func Dir() string

Dir returns the data directory, or "" when none is set.

func Path

func Path(rel string) string

Path returns where the file or directory rel lives: under the data directory when one is set, otherwise rel unchanged (relative to the working directory). An absolute rel is returned as it is, so a path the operator spelled out in full is never moved.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL