diff --git a/docs.vxserver.dev/Fes.toml b/docs.vxserver.dev/Fes.toml index 58f1ab6..a29be0d 100644 --- a/docs.vxserver.dev/Fes.toml +++ b/docs.vxserver.dev/Fes.toml @@ -1,5 +1,5 @@ [app] -name = "docs.vxserver.dev" +name = "fsd.vxserver.dev" version = "0.0.1" -authors = ["vx-clutch"] \ No newline at end of file +authors = ["owen"] diff --git a/docs.vxserver.dev/include/header.lua b/docs.vxserver.dev/include/header.lua index dd38be4..e1f02ac 100644 --- a/docs.vxserver.dev/include/header.lua +++ b/docs.vxserver.dev/include/header.lua @@ -2,7 +2,7 @@ local header = {} header.render = function(std) return table.concat({ - std.center(std.h1("Free Software Distributions Documentation")), + std.center(std.ha("/", std.h1("Free Software Distributions Project documentation"))), }) end diff --git a/docs.vxserver.dev/www/fes.lua b/docs.vxserver.dev/www/fes.lua new file mode 100644 index 0000000..c3a8f93 --- /dev/null +++ b/docs.vxserver.dev/www/fes.lua @@ -0,0 +1,83 @@ +local fes = require("fes") +local std = fes.std +local u = fes.util + +local site = fes.fes() + +local title = "Fes - Free Software Project documentation" + +site.title = title +site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD") + +site:banner(fes.app.header.render(std)) + +local docs = {} + +local template = [[ +
%s %s
%s
+]] +function docs:func(fn, signature, desc) + table.insert(self, string.format(template, fn, signature, desc)) + return self +end + +docs:func("fes.fes", "fes.fes(header, footer)", "Create a new site instance.") + :func("fes:custom", "fes:custom(str)", "Insert custom raw HTML into the site.") + :func("fes:build", "fes:build()", "Build the complete HTML output for the site.") + :func("core.json.json_decode", "core.json.json_decode(json)", "Decode a JSON string into a Lua value.") + :func("core.json.json_encode", "core.json.json_encode(value)", "Encode a Lua value into JSON text.") + :func("core.std.fes_version", "core.std.fes_version()", "Return the Fes framework version.") + :func("core.std.site_version", "core.std.site_version()", "Return the site's version value.") + :func("core.std.a", "core.std.a(link, str)", "Create a standard HTML anchor tag.") + :func("core.std.ha", "core.std.ha(link, str)", "Create a heading-style anchor.") + :func("core.std.external", "core.std.external(link, str)", "Create an external-link anchor with target=_blank.") + :func("core.std.note", "core.std.note(str)", "Render a note-styled block.") + :func("core.std.muted", "core.std.muted(str)", "Render text with muted visual styling.") + :func("core.std.callout", "core.std.callout(str)", "Render a callout-styled container.") + :func("core.std.h1", "core.std.h1(str)", "Render an H1 heading.") + :func("core.std.h2", "core.std.h2(str)", "Render an H2 heading.") + :func("core.std.h3", "core.std.h3(str)", "Render an H3 heading.") + :func("core.std.h4", "core.std.h4(str)", "Render an H4 heading.") + :func("core.std.h5", "core.std.h5(str)", "Render an H5 heading.") + :func("core.std.h6", "core.std.h6(str)", "Render an H6 heading.") + :func("core.std.p", "core.std.p(str)", "Render a paragraph element.") + :func("core.std.pre", "core.std.pre(str)", "Render a preformatted text block.") + :func("core.std.code", "core.std.code(str)", "Render code inside a pre element.") + :func("core.std.ul", "core.std.ul(items)", "Render an unordered list.") + :func("core.std.ol", "core.std.ol(items)", "Render an ordered list.") + :func("core.std.tl", "core.std.tl(items)", "Render a text list inline.") + :func("core.std.blockquote", "core.std.blockquote(str)", "Render a blockquote element.") + :func("core.std.hr", "core.std.hr()", "Render a horizontal rule.") + :func("core.std.img", "core.std.img(src, alt)", "Render an image element.") + :func("core.std.strong", "core.std.strong(str)", "Render strong-formatted text.") + :func("core.std.em", "core.std.em(str)", "Render emphasized text.") + :func("core.std.br", "core.std.br()", "Render a line break element.") + :func("core.std.div", "core.std.div(content, class)", "Render a div with optional class.") + :func("core.std.span", "core.std.span(content, class)", "Render a span with optional class.") + :func("core.std.escape", "core.std.escape(str)", "Escape HTML special characters.") + :func("core.std.site_name", "core.std.site_name()", "Return the site name.") + :func("core.std.site_title", "core.std.site_title()", "Return the site title.") + :func("core.std.site_authors", "core.std.site_authors()", "Return the site authors list.") + :func("core.std.join", "core.std.join(arr, sep)", "Join array elements with a separator.") + :func("core.std.trim", "core.std.trim(str)", "Trim whitespace from a string.") + :func("core.std.table", "core.std.table(headers, rows)", "Render an HTML table.") + :func("core.std.highlight", "core.std.highlight(str)", "Highlight text with framework styling.") + :func("core.std.banner", "core.std.banner(str)", "Render a banner-styled block.") + :func("core.std.center", "core.std.center(str)", "Center content horizontally.") + :func("core.std.nav", "core.std.nav(link, str)", "Render a navigation link.") + :func("core.std.rl", "core.std.rl(r, l)", "Align content right and left.") + :func("core.symbol.copyright", "core.symbol.copyright", "Return the copyright symbol.") + :func("core.symbol.registered_trademark", "core.symbol.registered_trademark", "Return the registered trademark symbol.") + :func("core.symbol.trademark", "core.symbol.trademark", "Return the trademark symbol.") + :func("core.util.cc", "core.util.cc(tbl)", "Concatenate multiple strings into one.") + :func("core.util.copyright", "core.util.copyright(link, holder)", "Generate a formatted copyright notice.") + +site:note(u.cc { + std.h2("Welcome to Fes"), + std.h3("What's Fes?"), + std.p("Fes is a lightweight, static, and opinionated microframework."), + std.h3("API Reference"), + u.cc(docs) +}) + +return site diff --git a/docs.vxserver.dev/www/index.lua b/docs.vxserver.dev/www/index.lua index 83e73b0..4651eda 100644 --- a/docs.vxserver.dev/www/index.lua +++ b/docs.vxserver.dev/www/index.lua @@ -4,14 +4,18 @@ local u = fes.util local site = fes.fes() -site.title = "Free Software Distributions Documentation" -site.copyright = fes.util.copyright("https://git.vxserver.dev/fSD", "fSD") +local title = "Free Software Distributions Project documentation" + +site.title = title +site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD") site:banner(fes.app.header.render(std)) -site:note(u.cc({ - std.h1("Free Software Distributions Documentation"), - std.blockquote(std.h1("NOT IMPLEMENTED")), -})) +site:note(u.cc { + std.h2("Documentation pages"), + std.tl { + std.a("fes", "fes"), + } +}) return site diff --git a/fsd.vxserver.dev/Dockerfile b/fsd.vxserver.dev/Dockerfile deleted file mode 100644 index f595c5b..0000000 --- a/fsd.vxserver.dev/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM golang:1.21 AS builder - -WORKDIR /app - -RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* - -RUN git clone https://git.vxserver.dev/fSD/fes.git . - -RUN go build -o fes - -FROM debian:bullseye-slim - -WORKDIR /app - -COPY --from=builder /app/fes . - -ENTRYPOINT ["./fes"]