A documentation generator for Ring packages, written in Ring. It makes a static HTML site (sidebar, search, syntax highlighting, previous/next links) from Markdown pages, and it can show the source and the real output of the Ring programs of a package.
ringdoc is the tool that was used for the documentation of RingDotNet, made general: the project (pages, name, folders) is described in one file, docproject.ring.
ringpm install ringdoc from ringpackages
Create a project:
ringdoc new mydocs "My Package"
Build the site (run it in the folder of docproject.ring):
ringdoc build
Or pass the file:
ringdoc build path/to/docproject.ring --refresh
--refresh runs the programs again; without it the outputs kept in the cache folder .ringdoc-cache are used.
aDocProject = [
:name = "Hello",
:tagline = "an example",
:logo = "H",
:description = "What the package does",
:footer = "Hello - made with ringdoc.",
:source = "src", # the Markdown pages
:output = "docs", # the site
:pages = [
["index","Overview","Start"], # [file, title, group]; groups make the sidebar
["guide","Guide","Start"]
]
]ringdoc pdf [docproject.ring] [--html-only]
One PDF of all the pages (cover, contents, bookmarks, links between pages inside the PDF, source blocks open) in <output>/pdf/<name>-documentation.pdf.
It is printed by headless Chrome or Edge; without one, the HTML page ...-documentation.html is made and can be printed to PDF.
The cover is plain (name, tagline, description); a cover.svg in the project (with @NAME@ and @TAGLINE@), a pdfdoc.template or an assets/pdf.css replace or extend the defaults.
The documentation of ringdoc is made with ringdoc:
-
docs/src(pages) anddocs/docproject.ring; the built site isdocs/site/index.htmland the PDFdocs/site/pdf/ringdoc-documentation.pdf. -
To rebuild:
cd docs; ringdoc build; ringdoc pdf.
-
samples/UsingRingDoc/hellois a small project. -
ring samples/UsingRingDoc/tests/run.ringbuilds it, makes its PDF and checks the pages.