feat(11.1-01): add summer docs:build with the docsite generator core
- internal/docsite loads docs/ with strict site.yaml and frontmatter decoding - goldmark GFM pipeline renders pages into an embedded html/template shell - emits .html pages, .md siblings, llms.txt, llms-full.txt, search-index.json - output guard refuses unmarked non-empty dirs and --out inside --src or root - docs/index.md and docs/setup/installation.md; /site/ is gitignored
This commit is contained in:
11
docs/index.md
Normal file
11
docs/index.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: SummerCMS documentation
|
||||
description: SummerCMS is a content management framework for Go, inspired by WinterCMS.
|
||||
section: index
|
||||
order: 0
|
||||
---
|
||||
# SummerCMS documentation
|
||||
|
||||
SummerCMS keeps what makes WinterCMS productive (plugins that extend each other, YAML-driven admin forms and lists, console scaffolding) and compiles an application into a single Go binary. The framework modules, the application's plugins, the embedded admin SPA and the console commands all ship as one executable.
|
||||
|
||||
Start with [Installation](setup/installation.md) to set up the toolchain and the `summer` CLI. The API reference section has one page per framework module.
|
||||
35
docs/setup/installation.md
Normal file
35
docs/setup/installation.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
title: Installation
|
||||
description: Install the Go toolchain, PostgreSQL and the summer CLI you need to build a SummerCMS application.
|
||||
section: setup
|
||||
order: 20
|
||||
---
|
||||
# Installation
|
||||
|
||||
SummerCMS is a Go module. An application requires it, lists its plugins in a `summer.yaml` manifest and builds everything into one binary with the `summer` CLI.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Go 1.27.
|
||||
- PostgreSQL 16 for any application that uses the data layer. The database's default locale must be the ICU `pl-PL` locale, which lagoon checks when it connects.
|
||||
- Docker, only for the integration tests that start PostgreSQL or Mailpit containers.
|
||||
|
||||
You do not need Node.js to build an application or these docs. It is needed only when you work on the admin SPA itself.
|
||||
|
||||
## Install the summer CLI
|
||||
|
||||
Clone the framework repository, then install the `summer` tool from its root:
|
||||
|
||||
```sh
|
||||
go install ./cmd/summer
|
||||
summer --help
|
||||
```
|
||||
|
||||
The tool builds and watches applications, scaffolds plugins, models, migrations and admin controllers, and builds this documentation. Check that the framework compiles and its unit tests pass:
|
||||
|
||||
```sh
|
||||
go vet ./...
|
||||
go test -short ./...
|
||||
```
|
||||
|
||||
`go test -short` skips the tests that need Docker. Run `go test ./...` without `-short` when Docker is available.
|
||||
15
docs/site.yaml
Normal file
15
docs/site.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
# Documentation site configuration, read by `summer docs:build`.
|
||||
# Sections are listed in sidebar order; each must have at least one page.
|
||||
title: SummerCMS
|
||||
description: "SummerCMS is a content management framework for Go, inspired by WinterCMS."
|
||||
base_url: ""
|
||||
edit_url: "https://git.golem15.com/golem15/summercms/_edit/master/{path}"
|
||||
source_url: "https://git.golem15.com/golem15/summercms/src/branch/master/{path}"
|
||||
llms_notes:
|
||||
- "Plugins are Go modules compiled into the application binary and registered at build time; nothing is loaded at runtime."
|
||||
- "The data layer supports PostgreSQL only."
|
||||
- "SummerCMS is headless: it serves a JSON API and an admin SPA, with no frontend themes."
|
||||
- "It targets Go 1.27."
|
||||
sections:
|
||||
- name: setup
|
||||
title: Setup
|
||||
Reference in New Issue
Block a user