{"id":13929792,"url":"https://github.com/traefik/structor","last_synced_at":"2025-10-23T02:31:03.414Z","repository":{"id":57607548,"uuid":"117669151","full_name":"traefik/structor","owner":"traefik","description":"[Messor Structor 🐜] Manage multiple versions of a Mkdocs documentation","archived":false,"fork":false,"pushed_at":"2023-05-15T22:41:28.000Z","size":228,"stargazers_count":37,"open_issues_count":5,"forks_count":8,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-09-26T21:04:20.484Z","etag":null,"topics":["documentation-tool","mkdocs","versioning"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/traefik.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-01-16T10:26:18.000Z","updated_at":"2023-11-09T20:04:44.000Z","dependencies_parsed_at":"2023-07-14T00:17:01.320Z","dependency_job_id":null,"html_url":"https://github.com/traefik/structor","commit_stats":null,"previous_names":["containous/structor"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traefik%2Fstructor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traefik%2Fstructor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traefik%2Fstructor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traefik%2Fstructor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/traefik","download_url":"https://codeload.github.com/traefik/structor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219868389,"owners_count":16555746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation-tool","mkdocs","versioning"],"created_at":"2024-08-07T18:02:33.493Z","updated_at":"2025-10-23T02:30:58.068Z","avatar_url":"https://github.com/traefik.png","language":"Go","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"# Messor Structor: Manage multiple documentation versions with Mkdocs.\n\n[![GitHub release](https://img.shields.io/github/release/traefik/structor.svg)](https://github.com/traefik/structor/releases/latest)\n[![Build Status](https://github.com/traefik/structor/workflows/Main/badge.svg?branch=master)](https://github.com/traefik/structor/actions)\n\nStructor use git branches to create the versions of a documentation, only works with Mkdocs.\n\nTo use Structor a project must respect [semver](https://semver.org) and creates a git branch for each `MINOR` and `MAJOR` version.\n\nCreated for [Traefik](https://github.com/traefik/traefik) and used by:\n\n* [Traefik](https://github.com/traefik/traefik) for https://docs.traefik.io\n* [Redis Labs](https://redislabs.com/) https://redislabs.com/community/oss-projects/\n* [JanusGraph](https://github.com/JanusGraph/janusgraph) for https://docs.janusgraph.org\n* [ONOS Project](https://github.com/onosproject) for https://docs.onosproject.org\n* [Drasyl](https://gitlab.com/drasyl/drasyl) for https://docs.drasyl.org\n\n## Prerequisites\n\n* [git](https://git-scm.com/)\n* [Docker](https://www.docker.com/)\n* `requirements.txt`, `mkdocs.yml`, and a Dockerfile.\n\n## Description\n\nFor the following git graph:\n\n```\n* gaaaaaaag - (branch master) commit\n| * faaaaaaaf - (branch v1.2) commit\n| * eaaaaaaae - commit\n|/\n* haaaaaaah - commit\n| * kaaaaaaak - (branch v1.1) commit\n| * jaaaaaaaj - commit\n|/\n* iaaaaaaai - commit\n| * daaaaaaad - (branch v1.0) commit\n| * caaaaaaac - commit\n|/\n* baaaaaaab - commit\n* aaaaaaaaa - initial commit\n```\n\nStructor generates the following files structure:\n\n```\n. (latest, branch v1.2)\n├── index.html\n├── ...\n├── v1.0 (branch v1.0)\n│   ├── index.html\n│   └── ...\n├── v1.1 (branch v1.1)\n│   ├── index.html\n│   └── ...\n└── v1.2 (branch v1.2)\n    ├── index.html\n    └── ...\n```\n\nIf the content from `.` is served on `mydoc.com`, documentation will be available at the following URLs:\n\n- `http://mydoc.com` (latest, branch v1.2)\n- `http://mydoc.com/v1.0` (branch v1.0)\n- `http://mydoc.com/v1.1` (branch v1.1)\n- `http://mydoc.com/v1.2` (branch v1.2)\n\nThe multi version menu is created from templates provided by the following options:\n\n- `--menu.js-url` (or `--menu.js-file`)\n- `--menu.css-url` (or `--menu.css-file`)\n\n## Configuration\n\n```yaml\nMessor Structor: Manage multiple documentation versions with Mkdocs.\n\nUsage:\n  structor [flags]\n  structor [command]\n\nAvailable Commands:\n  help        Help about any command\n  version     Display version\n\nFlags:\n      --debug                    Debug mode.\n      --dockerfile-name string   Search and use this Dockerfile in the repository (in './docs/' or in './') for building documentation. (default \"docs.Dockerfile\")\n  -d, --dockerfile-url string    Use this Dockerfile when --dockerfile-name is not found. Can be a file path. [required]\n      --exclude strings          Exclude branches from the documentation generation.\n      --exp-branch string        Build a branch as experimental.\n      --force-edit-url           Add a dedicated edition URL for each version.\n  -h, --help                     help for structor\n      --image-name string        Docker image name. (default \"doc-site\")\n      --menu.css-file string     File path of the template of the CSS file use for the multi version menu.\n      --menu.css-url string      URL of the template of the CSS file use for the multi version menu.\n      --menu.js-file string      File path of the template of the JS file use for the multi version menu.\n      --menu.js-url string       URL of the template of the JS file use for the multi version menu.\n      --no-cache                 Set to 'true' to disable the Docker build cache.\n  -o, --owner string             Repository owner. [required]\n  -r, --repo-name string         Repository name. [required]\n      --rqts-url string          Use this requirements.txt to merge with the current requirements.txt. Can be a file path.\n      --version                  version for structor\n```\n\nThe environment variable `STRUCTOR_LATEST_TAG` allow to override the latest tag name obtains from GitHub.\n\nThe [sprig](http://masterminds.github.io/sprig/) functions for Go templates can be used inside the JS template file.\n\n## Download / CI Integration\n\n```bash\ncurl -sfL https://raw.githubusercontent.com/traefik/structor/master/godownloader.sh | bash -s -- -b $GOPATH/bin v1.7.0\n```\n\n\u003c!--\nTo generate the script:\n\n```bash\ngodownloader --repo=traefik/structor -o godownloader.sh\n\n# or\n\ngodownloader --repo=traefik/structor \u003e godownloader.sh\n```\n--\u003e\n\n## Examples\n\nA simple example is available on the repository https://github.com/mmatur/structor-sample.\n\nWith menu template URL:\n\n```shell\nsudo ./structor -o traefik -r traefik \\\n--dockerfile-url=\"https://raw.githubusercontent.com/traefik/traefik/master/docs.Dockerfile\" \\\n--menu.js-url=\"https://raw.githubusercontent.com/traefik/structor/master/traefik-menu.js.gotmpl\" \\\n--exp-branch=master --debug\n```\n\nWith local menu template file:\n\n```shell\nsudo ./structor -o traefik -r traefik \\\n--dockerfile-url=\"https://raw.githubusercontent.com/traefik/traefik/master/docs.Dockerfile\" \\\n--menu.js-file=\"~/go/src/github.com/traefik/structor/traefik-menu.js.gotmpl\" \\\n--exp-branch=master --debug\n```\n\n## The Mymirca colony\n\n- [Myrmica Lobicornis](https://github.com/traefik/lobicornis) 🐜: Update and merge pull requests.\n- [Myrmica Aloba](https://github.com/traefik/aloba) 🐜: Add labels and milestone on pull requests and issues.\n- [Messor Structor](https://github.com/traefik/structor) 🐜: Manage multiple documentation versions with Mkdocs.\n- [Lasius Mixtus](https://github.com/traefik/mixtus) 🐜: Publish documentation to a GitHub repository from another.\n- [Myrmica Bibikoffi](https://github.com/traefik/bibikoffi) 🐜: Closes stale issues\n- [Chalepoxenus Kutteri](https://github.com/traefik/kutteri) 🐜: Track a GitHub repository and publish on Slack.\n- [Myrmica Gallienii](https://github.com/traefik/gallienii) 🐜: Keep Forks Synchronized\n\n## What does Messor Structor mean? \n\n![Messor Structor](http://www.antwiki.org/wiki/images/8/8d/Messor_structor_antweb1008070_h_1_high.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraefik%2Fstructor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftraefik%2Fstructor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraefik%2Fstructor/lists"}