Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d0727dd
docs: design spec for GitlabProjectInfo embedded sections
ebuildy Jul 8, 2026
fcf0b8d
docs: add extended project stats to GitlabProjectInfo spec
ebuildy Jul 8, 2026
09ddca1
docs: implementation plan for GitlabProjectInfo sections + stats
ebuildy Jul 8, 2026
2152e36
Merge branch 'main' of github.com:ebuildy/docusaurus-plugin-gitlab
ebuildy Jul 9, 2026
e542257
docs: design spec for GitLab group page generation
ebuildy Jul 9, 2026
725fde9
docs: implementation plan for GitLab group page generation
ebuildy Jul 9, 2026
5cc755a
feat(client): add getGroupProjects for group project listing
ebuildy Jul 9, 2026
303eebb
feat(types): add GroupProjectData domain type
ebuildy Jul 9, 2026
67161db
feat(fetchers): add fetchGroupProjects with slug + topic filtering
ebuildy Jul 9, 2026
5c558e3
feat(generate): add generateGitlabPages directive parser
ebuildy Jul 9, 2026
c10aede
feat(generate): render per-project child page from sections
ebuildy Jul 9, 2026
d883397
feat(generate): write nested project page tree with ownership guard
ebuildy Jul 9, 2026
71f71a2
feat(generate): scan docs dir for generateGitlabPages directives
ebuildy Jul 9, 2026
bf3738d
feat(generate): orchestrate scan + fetch + write for all directives
ebuildy Jul 9, 2026
ad4ec65
feat(components): add GitlabProjectGrid card component + registry entry
ebuildy Jul 9, 2026
d676cec
feat(loader): rewrite generateGitlabPages directive to GitlabProjectGrid
ebuildy Jul 9, 2026
68b0cbf
feat(plugin): generate group pages at init and via gitlab:generate CLI
ebuildy Jul 9, 2026
11fe0d2
docs: example + e2e + README for group page generation
ebuildy Jul 10, 2026
8444246
fix(plugin): only generate pages when Docusaurus provides a siteDir
ebuildy Jul 10, 2026
33a37a0
feat(generate): nest generated pages under the declaring index page
ebuildy Jul 10, 2026
49464b2
chore: example
ebuildy Jul 10, 2026
ec12a4a
fix(generate): card links use a bare slug for trailing-slash folder-i…
ebuildy Jul 10, 2026
eebea5f
chore: example
ebuildy Jul 10, 2026
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
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,77 @@ Both components render [scoped labels/topics](https://docs.gitlab.com/ee/user/pr
(`scope::value`, e.g. `Abilities::Performance`) as a two-part badge — the scope keeps its
color and the value gets a dark-gray background. The split is on the last `::`.

## Generating pages from a group

Instead of writing one page per project by hand, drop a single directive on a
**folder's index page** and let the plugin generate a child page per project in
a GitLab group at build time. The generated pages become **children of the
declaring page** in the sidebar.

Put the directive on the folder's index doc — `index.mdx`, `README.mdx`, or a
doc named after its folder (Docusaurus's [category index
convention](https://docusaurus.io/docs/sidebar/autogenerated#category-index-convention)):

```mdx
---
title: Group projects
---
# docs/team/index.mdx

# Our GitLab projects

{@generateGitlabPages group="my-group" sections="info,readme" includeSubgroups=false}
```

| Attribute | Type | Default | Description |
|---|---|---|---|
| `group` | string \| number | — | **Required.** Group path or ID |
| `sections` | string | `"readme"` | Comma-separated list of `info`, `readme`, `releases`, `issues` — becomes the components rendered on each generated project page |
| `topics` | string | — | Comma-separated topic filter; only projects with **all** listed topics are included |
| `includeSubgroups` | boolean | `false` | Include projects from subgroups |
| `includeArchived` | boolean | `false` | Include archived projects |

The plugin writes one `<project-slug>.mdx` per project **as a sibling of the
declaring page** (subgroups become nested folders with their own
`_category_.json`), so the autogenerated sidebar nests them under the declaring
page:

```text
docs/team/
index.mdx <- the declaring page (parent)
acme-web.mdx <- generated child
acme-api.mdx <- generated child
frontend/ <- generated subgroup
_category_.json
web-app.mdx
```

Generated files are **git-ignored** (the plugin writes a scoped `.gitignore` in
the folder that ignores only what it generated — never your index page) and are
regenerated on every build, tracked via a `.gitlab-generated` manifest so stale
pages are removed on regeneration. Never hand-edit or commit them. Generation
runs once at plugin init, before the docs plugin scans the filesystem, so the
generated pages feed the autogenerated sidebar like any other doc. Keep the
declaring page's folder dedicated to this generation.

You can also (re)generate the pages without a full build:

```bash
npx docusaurus gitlab:generate
```

> During `docusaurus start`, generation runs once per process at startup.
> Editing the `{@generateGitlabPages …}` attributes (group, sections, topics,
> …) requires restarting `docusaurus start` to regenerate — it is not
> re-evaluated on hot reload.

On the declaring page itself, the directive is replaced with a
`<GitlabProjectGrid>` card grid — one card per project, linking to its generated
child page. Because the declaring page is a folder index, it is served at a
directory URL with a trailing slash (e.g. `/team/`), so each card links to the
child with a bare relative slug (`<slug>` → `/team/<slug>`). If your site sets
`trailingSlash: false`, adjust routing accordingly.

### `::include` directives inside included markdown

When a fetched GitLab README or markdown file contains a GitLab
Expand Down
Loading
Loading