Content Repository
The content repository is where Jahia stores all its content items (pages, content, folders, files, categories). For a team, it is what makes it possible to keep one source for a content item, however it is displayed afterwards, on a page, in a list or in an application.
Definition and how it works
The repository is first split into two workspaces. The default workspace holds the working version, the one contributors edit and preview. The live workspace holds the published version, from which pages are generated for visitors. Within each workspace, content is organized by site, with each web project having its own space for its content and files, along with its enabled modules.
Developers often say JCR (Java Content Repository). Jahia is built on the JCR 2.0 standard. The Academy glossary also lists Jackrabbit among the technical names for the repository. Unlike a conventional database organized in tables, the repository arranges content as a tree of nodes, each with a unique identifier, a path and properties. For physical storage, the repository itself relies on an SQL database. To read or write content from an application, the recommended API is the GraphQL API.
Content repository vs workspace: the differences
The repository is the overall container. It differs from its subdivisions and from the filing tools contributors see.
| Term | How it differs |
|---|---|
| Workspace | A workspace is a subdivision of the repository: default for the working version, live for the published version. The repository contains both. |
| Content folder | A folder is a location chosen by contributors to store reusable content. It lives in the repository, just like pages. |
| Database | The SQL database handles the physical storage of repository content. The repository organizes content on top of it: tree, published or unpublished versions, sites, types. |
Content repository in practice
A group runs its corporate site, three brand sites and an intranet on the same Jahia platform. Each site has its own space in the repository, with its content and files. Each also enables its own modules; the intranet does not need the same features as the brand sites.
For an architecture team, the question is not "how many databases" but how to split the sites and what they should share.
Frequently asked questions
Do you need to know JCR to work with Jahia?
Not as a contributor. Contributors handle pages, folders and content in jContent without ever seeing the content repository as such. Developers benefit from understanding its principles (tree, nodes, properties, workspaces). To read and write content from an application, they use the GraphQL API recommended by Jahia rather than low-level JCR interfaces.
Can several sites share the same Jahia repository?
Yes, that is its basic organization. The content repository is split by workspace, then by site. Each web project has its own space there for its content, files and enabled modules. Some elements, such as categories, are managed for the whole platform and therefore shared. Content can also be reused from one site to another through references, subject to configuration.
Where are files and images stored in Jahia?
In the repository, like any other content. Each site has its own file space, managed in the Media section of jContent. A file is a content item with its own properties and publication status. It can be displayed on several pages through file or image references, without being uploaded more than once.
Resources that cover this term
Explore related concepts
Performance: sizing the Jackrabbit bundle cache properly
Explore this resource