codeRepository
codeRepository · No Google docs page
Appears in
What is it?
codeRepository provides the URL of the version control repository where a software project's source code is hosted. It points to the canonical location on GitHub, GitLab, Bitbucket, or any other VCS platform where developers can browse, clone, or fork the code.
Why this matters for AEO
When a developer asks an AI engine "where is the source code for [library name]," the engine needs a direct link to the repository. A codeRepository URL in SoftwareSourceCode markup gives AI systems an unambiguous, machine-readable pointer to the canonical repo. This is especially useful for academic software and research tools where the same project may have multiple mirrors or documentation sites.
What the specs say
Schema.org: URL. Link to the repository where the un-compiled, human readable code and related code is located (SVN, GitHub, CodePlex). schema.org/codeRepository
Google: No dedicated Google structured data page exists for SoftwareSourceCode or codeRepository. Google does not offer rich results for this type.
How to find your value
- GitHub — The repository URL in the browser address bar (e.g.,
https://github.com/org/repo) - GitLab — The project URL on the overview page
- Bitbucket — The repository URL from the "Clone" dropdown
- Package registry — The "Repository" or "Source" link on npm, PyPI, or crates.io
- codemeta.json — The
codeRepositoryfield in an existing CodeMeta file
Format and code
Type: URL
codeRepository takes a single URL string pointing to the repository root.
Basic usage:
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "h5RDMtoolbox",
"codeRepository": "https://github.com/matthiasprobst/h5RDMtoolbox"
}
With git+ prefix (common in CodeMeta):
Some CodeMeta files prepend git+ to distinguish the protocol. Schema.org expects a plain URL, so the git+ prefix is a convention from the package manager ecosystem rather than a schema.org requirement.
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"name": "h5RDMtoolbox",
"codeRepository": "git+https://github.com/matthiasprobst/h5RDMtoolbox.git"
}
Common mistake: pointing to a documentation site or landing page instead of the actual repository URL. The value should go directly to the VCS hosting platform.
Webflow implementation
Static pages
SoftwareSourceCode markup is uncommon on Webflow marketing sites. If publishing a tools or open-source page, add a custom code embed in Page Settings > Custom Code > Before </head>:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "Your Project Name",
"codeRepository": "https://github.com/your-org/your-repo",
"programmingLanguage": "TypeScript"
}
</script>
CMS template pages
If a Webflow CMS collection tracks open-source projects with a "Repository URL" field:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "{{wf {"path":"name","type":"PlainText"} }}",
"codeRepository": "{{wf {"path":"repository-url","type":"PlainText"} }}"
}
</script>
In Schema HQ
Optional mapping is available: a Webflow CMS URL field to codeRepository when building SoftwareSourceCode markup for project listing pages.
Real examples
h5RDMtoolbox (Karlsruhe Institute of Technology) (codemeta.json):
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"name": "h5RDMtoolbox",
"version": "2.7.3",
"codeRepository": "git+https://github.com/matthiasprobst/h5RDMtoolbox.git"
}
codemetar (rOpenSci) (codemeta.json):
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"name": "codemetar",
"version": "0.3.7",
"codeRepository": "https://github.com/ropensci/codemetar"
}
Related fields
FAQ
Is codeRepository the same as url?
No. url points to the canonical web page about the software (a homepage, docs site, or landing page). codeRepository points specifically to the version control system where the source code lives. A project might have url set to https://h5rdmtoolbox.readthedocs.io and codeRepository set to https://github.com/matthiasprobst/h5RDMtoolbox.
Should codeRepository include the .git suffix?
Either format works. https://github.com/org/repo and https://github.com/org/repo.git both resolve to the same repository on GitHub. The plain URL without .git is more readable and more commonly used in schema.org markup.
Where is codeRepository most commonly used?
CodeMeta (codemeta.json) files in open-source repositories are the primary consumer. Academic software, research tools, and projects that need machine-readable metadata for citation and discovery use it extensively. It is rare on commercial marketing sites.