servedocs

function defined in module Pollen


			servedocs(m::Module)
servedocs(pkgdir)

Serve the documentation for a package, assuming it is set up correctly. Will fail if it is not. See PollenPlugin for more information about setup.

This starts two servers:

  • a static file server that serves all rewritten documents with file extensions format, by default on port 8000

  • a locally running frontend that gives a preview, at port 5173, if frontend = true

Frontend installation

If frontend=true and frontenddir is not changed, the code for the frontend will be cloned and installed the first time you run servedocs.

Keyword arguments

  • subdir = docs: The subdirectory of pkgdir in which Pollen.jl documentation files are stored. Corresponds to PollenPlugin's folder argument.

  • port = 8000: The port on which the static file server runs. Can also be overwritten with the enviroment variable "POLLEN_PORT".

  • lazy = true: Whether to use lazy mode. In lazy mode, documents will only be rewritten once you open them in the frontend. This is useful when working on large projects, when you only want to see the preview of a few pages, without having to wait for all pages to build.

  • dir = mktempdir(): The directory to which pages for the static file server are built.

  • tag = "dev": The version tag associated with this build. More relevant for deployment.

  • frontend = true: Whether to run the frontend server.

  • frontenddir = Pollen.FRONTENDDIR: Folder where frontend repository is looked for. If you want to develop on the frontend, overwrite this with your local version.

Methods

There are 2 methods for Pollen.servedocs: