Render GitLab Markdown includes as embedded notes while preserving the original file syntax.
GitLab Includes renders GitLab Flavored Markdown include directives as embedded notes in Obsidian, without changing the saved Markdown. This lets the same document work in a GitLab repository and in an Obsidian vault.
::include{file=kansio/tiedosto kansiossa.md}
Unlike the native Obsidian embed ![[kansio/tiedosto kansiossa.md]], this syntax is understood by GitLab. An include is not part of standard CommonMark; other Markdown editors need additional support.
For example:
vault/
├── README.md
└── kansio/
└── tiedosto kansiossa.md
README.md:
# Example
This is an embedded document:
::include{file=kansio/tiedosto kansiossa.md}
GitLab renders the included file seamlessly, while Obsidian displays its native note embed, including the current theme's border, title, content spacing, scrolling, and open-note control. Paths are relative to the containing file, including ./ and ../; spaces and Unicode are retained. The target must be an existing Markdown file inside the vault. The content is rendered by Obsidian using the target note's path for relative links. Missing, invalid, or unreadable targets show an error without changing the source.
:: followed by a note name to open an inline Markdown-file picker. Use the arrow keys, Enter/Tab, or a mouse click to choose a note; Escape dismisses it. The result is a standalone GitLab include with a relative path, inserted as one undoable edit. Images and other attachments are excluded. Change Settings → GitLab Includes → Include shorthand to use another trigger, or leave it empty to disable completion. Fenced examples, inline code and frontmatter do not trigger the picker.![[note]] embeds in the current note. Conversion uses Obsidian link resolution and is undoable. Nothing is converted automatically when enabling the plugin.Requires Obsidian 1.15.0 or newer. Native embed behavior was audited on Obsidian 1.15.0 for Windows; other desktop platforms and mobile have not received the same UI audit. The shipped plugin uses no Node.js or Electron APIs.
The plugin works locally, makes no network requests, and contains no telemetry. It only reads or edits files inside the vault. Saved notes change through explicit insert/conversion commands, edits made through native task controls, or automatic include-path updates following the link-update preference described above.
Requires Node.js 22.22.2 or newer in the Node 22 series (or a supported newer LTS) and npm. Clone this repository, then:
cd obsidian-gitlab-includes
npm ci
npm run build
Copy the three files into the vault's configuration directory (normally .obsidian; substitute your actual path):
mkdir -p "/path/to/vault/.obsidian/plugins/gitlab-includes"
cp main.js manifest.json styles.css "/path/to/vault/.obsidian/plugins/gitlab-includes/"
Windows PowerShell:
cd obsidian-gitlab-includes
npm ci
npm run build
$dest = "C:\path\to\vault\.obsidian\plugins\gitlab-includes"
New-Item -ItemType Directory -Force $dest | Out-Null
Copy-Item main.js, manifest.json, styles.css $dest
Restart or reload Obsidian, enable community plugins, and enable GitLab Includes. The plugin ID and installation folder are gitlab-includes.
kansio/tiedosto kansiossa.md with a heading, paragraph, list, and link.README.md with the example above. Check the embed and clickable header in Reading View and Live Preview. Select the directive in Live Preview and check Source mode.../ path from a nested note.![[note]] using the conversion command. Undo both; check image and PDF embeds are unchanged.README.md outside Obsidian to verify the include remains ::include{file=...}. Push the files to GitLab and check its rendered result.Run npm run validate for unit tests, type checking, lint, manifest/version checks, build and a smoke test of the actual release bundle. The audit report describes the in-app comparisons. The development-only audit harness is never bundled into the plugin.
Run npm run prepare:release to validate the source and prepare dist/gitlab-includes/ with the three installable files, plus release notes and SHA-256 checksums in dist/. See the publishing handoff for the final steps.
For a later version, update manifest.json, package.json, package-lock.json, versions.json and the release notes together. The GitHub release tag must match the manifest version exactly, such as 0.1.0, without a v prefix. The release workflow validates the tag and publishes the prepared assets. Ordinary branch pushes do not publish releases.
Before submitting, review the current manifest reference, submission requirements, and developer policies. Publish a release, then follow the community directory submission process to propose the repository. This project uses the MIT license.