# README
XLog
:vhs: Xlog is a static site generator for digital gardening written in Go. It serves markdown files as HTML and allows editing files online. It focuses on enriching markdown files and surfacing implicit links between pages.
Documentation
- Documentation
- Installation
- Usage
- Generating static site
- Overriding Assets
- Extensions
- Writing Your Own Extension
License
Xlog is released under MIT license
Logo
# Functions
BadRequest returns an output function that writes BadRequest http response.
Cache wraps Output and adds header to instruct the browser to cache the output.
Commands return the list of commands for a page.
Delete defines a new route that gets executed when the request matches path and method is http Delete.
EachPage iterates on all available pages.
EachPageCon Similar to EachPage but iterates concurrently.
Extract all nodes of a specific type from the AST.
FindInAST takes an AST node and walks the tree depth first searching for a node of a specific type can be used to find first image, link, paragraph...etc.
No description provided by the author
Get defines a new route that gets executed when the request matches path and method is http Get.
IgnoreDirectory Register a pattern to be ignored when walking directories.
InternalServerError returns an output function that writes InternalServerError http response.
No description provided by the author
Links returns a list of links for a Page.
Register an event handler to be executed when PageEvent is triggered.
MapPageCon Similar to EachPage but iterates concurrently.
No description provided by the author
NoContent returns an output function that writes NoContent http status.
Noop is an output that doesn't do anything to the request.
NotFound returns an output function that writes 404 NotFound to http response.
No description provided by the author
Partial executes a template by it's path name.
PlainText returns an output function that writes text to response writer.
Post defines a new route that gets executed when the request matches path and method is http Post.
This function take the page content and pass it through all registered preprocessors and return the last preprocessor output to the caller.
Properties return a list of properties for a page.
QuickCommands return the list of QuickCommands for a page.
Redirect returns an output function that writes Found http response to provided URL.
RegisterAutocomplete registers an autocomplete function.
RegisterBuildPage registers a path of a page to export when building static version of the knowledgebase.
RegisterCommand registers a new command.
RegisterHelper registers a new helper function.
Register a new links function, should return a list of Links.
No description provided by the author
RegisterPreprocessor registers a Preprocessor function.
RegisterProperty registers a function that returns a set of properties for the page.
No description provided by the author
RegisterStaticDir adds a filesystem to the filesystems list scanned for files when serving static files.
RegisterTemplate registers a filesystem that contains templates, specifying subDir as the subdirectory name that contains the templates.
RegisterWidget Register a function to a widget space.
Render returns an output function that renders partial with data and writes it as response.
This is used by view and edit routes to render all widgetfuncs registered for specific widget space.
Define the catch all HTTP routes, parse CLI flags and take actions like building the static pages and exit, or start the HTTP server.
Trigger event handlers for a specific page event.
Unauthorized returns an output function that writes Unauthorized http response.
# Constants
List of page events.
List of page events.
List of page events.
List of page events.
# Variables
widgets rendered after the content of the view page.
widgets rendered before the content of the view page.
path to write built files.
a function that renders CSRF hidden input field.
widgets rendered in page <head> tag.
name of the index page markdown file.
The instance of markdown renderer.
name of the index page markdown file.
is xlog in readonly mode.
is sidebar displayed.
name of knowledgebase.
path to markdown files directory.
# Structs
Suggestions represent an item in the list of autocomplete menu in the edit page.
# Interfaces
Autocomplete defines what character triggeres the autocomplete feature and what is the list to display in this case.
Command define a command that a user can invoke in view or edit page on a Page.
Link represent link for the user interface, default theme renders it in the footer.
a Type that represent a page.
No description provided by the author
Property represent a piece of information about the current page such as last update time, number of versions, number of words, reading time...etc.
# Type aliases
HandlerFunc is the type of an HTTP handler function + returns output function.
No description provided by the author
Markdown is used instead of string to make sure it's clear the string is markdown string.
No description provided by the author
No description provided by the author
No description provided by the author
A Preprocessor is a function that takes the whole page content and returns a modified version of the content.
No description provided by the author
No description provided by the author
No description provided by the author