Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions apps/docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,28 @@ const config = {
crossorigin: "anonymous",
},
},
// Agent/LLM discovery. There is no formal <link> relation for llms.txt --
// the convention is the well-known /llms.txt path -- but advertising it in
// <head> costs nothing and is picked up by some crawlers and dev tools.
// Per-page markdown alternates are emitted by src/theme/DocItem/Layout.
{
tagName: "link",
attributes: {
rel: "alternate",
type: "text/plain",
href: "https://docs.zerops.io/llms.txt",
title: "llms.txt",
},
},
{
tagName: "link",
attributes: {
rel: "alternate",
type: "text/plain",
href: "https://docs.zerops.io/llms-full.txt",
title: "llms-full.txt",
},
},
],
plugins: [
'./src/plugins/markdown-source',
Expand Down
5,015 changes: 3,391 additions & 1,624 deletions apps/docs/static/llms-full.txt

Large diffs are not rendered by default.

4,572 changes: 3,102 additions & 1,470 deletions apps/docs/static/llms-small.txt

Large diffs are not rendered by default.

32 changes: 24 additions & 8 deletions apps/docs/static/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

## Docs

- [Full Docs](https://docs.zerops.io/llms-full.txt) Full documentation of Zerops. (without examples)
- [Tiny Docs](https://docs.zerops.io/llms-small.txt): Tiny documentation of Zerops. (includes only description of core)
- [Full Docs](https://docs.zerops.io/llms-full.txt): The complete documentation as a single file (349 pages, no images).
- [Core Docs](https://docs.zerops.io/llms-small.txt): The same, trimmed to the core platform — excludes API/CLI references, company and help pages.

Every page below is also reachable in its rendered form by dropping the `.md`
suffix, and any docs.zerops.io URL can be turned into clean markdown by adding it.

## Optional

Expand Down Expand Up @@ -140,14 +143,17 @@
- [Guides > Deployment Lifecycle](https://docs.zerops.io/guides/deployment-lifecycle.md)
- [Guides > Environment Variables](https://docs.zerops.io/guides/environment-variables.md)
- [Guides > Firewall](https://docs.zerops.io/guides/firewall.md)
- [Guides > Local Development](https://docs.zerops.io/guides/local-development.md)
- [Guides > Logging](https://docs.zerops.io/guides/logging.md)
- [Guides > Metrics](https://docs.zerops.io/guides/metrics.md)
- [Guides > Networking](https://docs.zerops.io/guides/networking.md)
- [Guides > Object Storage Integration](https://docs.zerops.io/guides/object-storage-integration.md)
- [Guides > Php Tuning](https://docs.zerops.io/guides/php-tuning.md)
- [Guides > Production Checklist](https://docs.zerops.io/guides/production-checklist.md)
- [Guides > Public Access](https://docs.zerops.io/guides/public-access.md)
- [Guides > Readiness Health Checks](https://docs.zerops.io/guides/readiness-health-checks.md)
- [Guides > Scaling](https://docs.zerops.io/guides/scaling.md)
- [Guides > Shared Storage Integration](https://docs.zerops.io/guides/shared-storage-integration.md)
- [Guides > Smtp](https://docs.zerops.io/guides/smtp.md)
- [Guides > Verify Web Agent Protocol](https://docs.zerops.io/guides/verify-web-agent-protocol.md)
- [Guides > Vpn](https://docs.zerops.io/guides/vpn.md)
Expand Down Expand Up @@ -239,12 +245,9 @@
- [Php > How To > Trigger Pipeline](https://docs.zerops.io/php/how-to/trigger-pipeline.md)
- [Php > How To > Upgrade](https://docs.zerops.io/php/how-to/upgrade.md)
- [Php > Overview](https://docs.zerops.io/php/overview.md)
- [Postgresql > Faq](https://docs.zerops.io/postgresql/faq.md)
- [Postgresql > How To > Backup](https://docs.zerops.io/postgresql/how-to/backup.md)
- [Postgresql > How To > Connect](https://docs.zerops.io/postgresql/how-to/connect.md)
- [Postgresql > How To > Control](https://docs.zerops.io/postgresql/how-to/control.md)
- [Postgresql > How To > Create](https://docs.zerops.io/postgresql/how-to/create.md)
- [Postgresql > How To > Export Import Data](https://docs.zerops.io/postgresql/how-to/export-import-data.md)
- [Postgresql > How To > Manage](https://docs.zerops.io/postgresql/how-to/manage.md)
- [Postgresql > How To > Scale](https://docs.zerops.io/postgresql/how-to/scale.md)
- [Postgresql > Overview](https://docs.zerops.io/postgresql/overview.md)
Expand All @@ -263,7 +266,8 @@
- [Python > How To > Upgrade](https://docs.zerops.io/python/how-to/upgrade.md)
- [Python > Overview](https://docs.zerops.io/python/overview.md)
- [Qdrant > Overview](https://docs.zerops.io/qdrant/overview.md)
- [Quickstart](https://docs.zerops.io/quickstart.md)
- [Quickstart > Quickstart Going Further](https://docs.zerops.io/quickstart/quickstart-going-further.md)
- [Quickstart > Quickstart](https://docs.zerops.io/quickstart/quickstart.md)
- [References > Api](https://docs.zerops.io/references/api.md)
- [References > Cli](https://docs.zerops.io/references/cli.md)
- [References > Github Integration](https://docs.zerops.io/references/github-integration.md)
Expand All @@ -287,6 +291,20 @@
- [References > Zcli > Commands](https://docs.zerops.io/references/zcli/commands.md)
- [References > Zcli > Configuration](https://docs.zerops.io/references/zcli/configuration.md)
- [References > Zsc](https://docs.zerops.io/references/zsc.md)
- [Ruby > How To > Build Pipeline](https://docs.zerops.io/ruby/how-to/build-pipeline.md)
- [Ruby > How To > Build Process](https://docs.zerops.io/ruby/how-to/build-process.md)
- [Ruby > How To > Controls](https://docs.zerops.io/ruby/how-to/controls.md)
- [Ruby > How To > Create](https://docs.zerops.io/ruby/how-to/create.md)
- [Ruby > How To > Customize Runtime](https://docs.zerops.io/ruby/how-to/customize-runtime.md)
- [Ruby > How To > Deploy Process](https://docs.zerops.io/ruby/how-to/deploy-process.md)
- [Ruby > How To > Env Variables](https://docs.zerops.io/ruby/how-to/env-variables.md)
- [Ruby > How To > Filebrowser](https://docs.zerops.io/ruby/how-to/filebrowser.md)
- [Ruby > How To > Logs](https://docs.zerops.io/ruby/how-to/logs.md)
- [Ruby > How To > Scaling](https://docs.zerops.io/ruby/how-to/scaling.md)
- [Ruby > How To > Shared Storage](https://docs.zerops.io/ruby/how-to/shared-storage.md)
- [Ruby > How To > Trigger Pipeline](https://docs.zerops.io/ruby/how-to/trigger-pipeline.md)
- [Ruby > How To > Upgrade](https://docs.zerops.io/ruby/how-to/upgrade.md)
- [Ruby > Overview](https://docs.zerops.io/ruby/overview.md)
- [Rust > How To > Build Pipeline](https://docs.zerops.io/rust/how-to/build-pipeline.md)
- [Rust > How To > Build Process](https://docs.zerops.io/rust/how-to/build-process.md)
- [Rust > How To > Controls](https://docs.zerops.io/rust/how-to/controls.md)
Expand All @@ -301,11 +319,9 @@
- [Rust > How To > Trigger Pipeline](https://docs.zerops.io/rust/how-to/trigger-pipeline.md)
- [Rust > How To > Upgrade](https://docs.zerops.io/rust/how-to/upgrade.md)
- [Rust > Overview](https://docs.zerops.io/rust/overview.md)
- [Shared Storage > How To > Backup](https://docs.zerops.io/shared-storage/how-to/backup.md)
- [Shared Storage > How To > Connect](https://docs.zerops.io/shared-storage/how-to/connect.md)
- [Shared Storage > How To > Create](https://docs.zerops.io/shared-storage/how-to/create.md)
- [Shared Storage > How To > Manage](https://docs.zerops.io/shared-storage/how-to/manage.md)
- [Shared Storage > How To > Use](https://docs.zerops.io/shared-storage/how-to/use.md)
- [Shared Storage > Overview](https://docs.zerops.io/shared-storage/overview.md)
- [Shared Storage > Tech Details](https://docs.zerops.io/shared-storage/tech-details.md)
- [Static > Overview](https://docs.zerops.io/static/overview.md)
Expand Down
8 changes: 8 additions & 0 deletions apps/docs/static/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@ User-agent: *
Allow: /

Sitemap: https://docs.zerops.io/sitemap-docs.xml

# Machine-readable documentation for LLMs and coding agents.
# Every docs page is also available as clean markdown by appending .md
# to its URL, e.g. https://docs.zerops.io/references/cli.md
#
# https://docs.zerops.io/llms.txt index + link to every page as .md
# https://docs.zerops.io/llms-full.txt entire documentation, single file
# https://docs.zerops.io/llms-small.txt core documentation only
7 changes: 5 additions & 2 deletions zerops-llm-script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,11 @@ async function generateLLMDocs() {
'',
'## Docs',
'',
'- [Full Docs](https://docs.zerops.io/llms-full.txt) Full documentation of Zerops. (without examples)',
'- [Tiny Docs](https://docs.zerops.io/llms-small.txt): Tiny documentation of Zerops. (includes only description of core)',
`- [Full Docs](https://docs.zerops.io/llms-full.txt): The complete documentation as a single file (${optionalFiles.length} pages, no images).`,
'- [Core Docs](https://docs.zerops.io/llms-small.txt): The same, trimmed to the core platform — excludes API/CLI references, company and help pages.',
'',
'Every page below is also reachable in its rendered form by dropping the `.md`',
'suffix, and any docs.zerops.io URL can be turned into clean markdown by adding it.',
'',
'## Optional',
'',
Expand Down
21 changes: 21 additions & 0 deletions zerops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ zerops:
initCommands:
- sudo sed -i 's/^\(\s*text\/plain\s\+\)txt;$/\1txt md;/' /etc/nginx/mime.types
- printf 'charset utf-8;\ncharset_types text/plain;\n' | sudo tee /etc/nginx/conf.d/charset.conf
# Advertise the markdown twin of every docs page as an RFC 8288 Link
# header, so agents that fetch over plain HTTP (or HEAD) discover it
# without parsing the HTML <head>. Mirrors the <link rel="alternate">
# emitted by src/theme/DocItem/Layout. The regex only matches
# extensionless paths, so assets and the .md files themselves are
# skipped; an empty value makes nginx omit the header entirely.
- printf 'map $request_uri $zerops_md_alternate {\n default "";\n /discord "";\n "~^(/[^.?#]*[^./?#])$" "<$1.md>; rel=alternate; type=text/markdown";\n}\nadd_header Link $zerops_md_alternate always;\n' | sudo tee /etc/nginx/conf.d/md-alternate.conf
# The static base falls back to /index.html for anything unmatched,
# which makes a bogus /foo.md answer 200 with the 260kB HTML shell --
# agents read that as a successful fetch. Narrow the .md location to a
# real 404. Self-reverting: if the config does not look the way we
# expect, the substitution simply no-ops, and a failed `nginx -t`
# restores the original file.
- |
F=$(sudo grep -rl 'location[^{]*\.md' /etc/nginx/ 2>/dev/null | head -1)
if [ -n "$F" ]; then
sudo cp "$F" /tmp/nginx-md.bak
sudo perl -0777 -i -pe 's!(location[^{\n]*\.md[^{\n]*\{[^{}]*?)try_files[^;]*;!$1try_files \$uri =404;!' "$F"
sudo nginx -t || sudo cp /tmp/nginx-md.bak "$F"
fi
true
- sudo service nginx reload
routing:
headers:
Expand Down
Loading