Debian Codegraph @

/

debian lintian-ssg 1.0.4debian lintian-ssg gomod salsa.debian.org/lintian/lintian-ssg cssdebiangohtmlinijsonmakefilemarkdownshellxmlyaml 42 files · 441 symbols
View dependency graph

Depends on

README (full)

Lintian SSG

build coverage goreport version

A very simple static site generator that builds a Web version of Lintian tags' explanations, based on the output of lintian-explain-tags --format=json. It is used to generate the pages of https://lintian.debian.org.

Interesting examples include very-long-line-length-in-source-file as it displays all fields and override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS for its rich markup.

Build

The only build requirement is Go >= 1.18.

go generate ./version # to include version, only from a git checkout
go build
go test ./...         # optionally, to run tests

Usage

Usage: lintian-ssg [OPTION]...

Generate a static web site for Lintian tags' explanations. By default, it will
call lintian-explain-tags in a subprocess, except if the --tags-file option is
provided.

Options:
  --base-url=URL        URL, including the scheme, where the root of the website
                        will be located. This will be used in the sitemap, the
                        canonical link of each page and the robots.txt.

  --footer=TEXT         TEXT to add to the footer, inline Markdown elements will
                        be parsed.

  --lintian-version=V   Override Lintian's version in output with V.
  --manual-file=FILE    Read Lintian's manual from FILE.
                        (default "/usr/share/doc/lintian/lintian.html")

  --no-sitemap          Disable sitemap.xml.gz (and thus robots.txt) generation.
  -o, --output-dir=DIR  Path of the directory DIR where to output the generated
                        website. (default "out")

  --stats               Display some statistics.
  --tags-file=FILE      Read Lintian tags from FILE (in JSON format).

  --debug               Print stack traces on errors.
  -h, --help            Show this help and exit.
  --version             Show version and exit.

Recommended HTTP server configs

Apache (global, vhost)

# For a more friendly 404 error page
ErrorDocument 404 /404.html

<Location "/tags/">
	# To allow access .html files without their extension
	Options +MultiViews
</Location>

Nginx (server)

# For a more friendly 404 error page
error_page 404 /404.html;

location /tags/ {
    # To allow access .html files without their extension
    try_files $uri.html $uri =404;
}
dir assets/
dir debian/
dir ioutil/
dir lintian/
dir markdown/
dir templates/
dir version/
file .gitlab-ci.yml
file LICENSE
file README.md
file TODO.md
file go.mod
file go.sum
file main.go
file main_test.go