ukuleleweb

package module
v0.0.0-...-c65b3f3 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

README

Ukuleleweb

Ukuleleweb is a simple Wiki implementation in the style of the original WikiWikiWeb / C2 wiki.

Unit tests

Few dependencies

The only dependencies are a markdown renderer and Peter Bourgon's diskv library for storage.

Simple Storage

Wiki pages are simply stored in a directory, where file names are page names and each file contains the page's markdown source. This way, you can never lose your data, and it's also easy to put it under version control.

Features

  • Recognizes WikiLinks in the classic WikiWikiWeb style (just CamelCasedWords).
  • Displays reverse links at the bottom of each page. (Reverse links are recalculated when saving a page.)
  • Each wiki page is a file on disk, it's easy to add small analysis scripts externally, or to generate new Wiki pages.

Non-features

Ukuleleweb does not have user management, nor an authentication mechanism. To keep your wiki confidential, place it behind a reverse proxy.

Run it

To run Ukuleleweb, create an empty directory where it can store data, and point it to that directory using the -store_dir flag:

go run cmd/ukuleleweb/main.go -store_dir=/some/empty/directory

or, to install it:

$ go install github.com/gnoack/ukuleleweb/cmd/ukuleleweb@latest
$ go/bin/ukuleleweb -store_dir=/some/emtpy/directory

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WikiLinkExt = &wikiLinkExt{}

Functions

func AddRoutes

func AddRoutes(mux *http.ServeMux, mainPage string, d *diskv.Diskv)

AddRoutes adds the Ukuleleweb routes to the given ServeMux.

func AllReverseLinks(d *diskv.Diskv) map[string][]string

AllReverseLinks calculates the reverse link map for the whole wiki. The returned map maps page names to a list of pages linking to it. Sets of pages are represented as sorted lists.

func OutgoingLinks(md string) map[string]bool

OutgoingLinks returns the outgoing wiki links in a given Markdown input. The outgoing links are a map of page names to true.

func RenderHTML

func RenderHTML(md string) (string, error)

Types

type PageHandler

type PageHandler struct {
	MainPage string
	D        *diskv.Diskv
	// contains filtered or unexported fields
}

func (*PageHandler) ServeHTTP

func (h *PageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis
cmd
wikiviz
An experimental command line tool for visualizing the graph of wiki pages.
An experimental command line tool for visualizing the graph of wiki pages.

Jump to

Keyboard shortcuts

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