pasteTemplates

The Template Gallery feature is controlled using the following environment variables:

  • OVERLEAF_TEMPLATE_GALLERY: Set to true to enable the Template Gallery.

  • OVERLEAF_TEMPLATE_CATEGORIES: An optional whitespace-separated list of zero or more template category keys. Valid keys include:

    • academic-journal

    • book

    • presentation

    • poster

    • cv

    • homework

    • bibliography

    • calendar

    • formal-letter

    • report

    • thesis

    • newsletter

    The special key all is automatically appended. This key represents a category that includes all templates.

    For each category key, the following optional environment variables can be set:

    • TEMPLATE_<KEY>_NAME: The display name of the template category.

    • TEMPLATE_<KEY>_DESCRIPTION: A short description of the category.

    If a category key contains a hyphen (-), replace it with an underscore (_) in the environment variable names.

  • ENABLE_CONVERSIONS: Must be set to true to enable thumbnail and preview generation for templates.

  • OVERLEAF_NON_ADMIN_CAN_PUBLISH_TEMPLATES: Determines whether non-admin users can publish templates. Defaults to false.

Publishing Templates

For each template you want to upload:

  1. Create a project containing the template's source code and make sure it compiles.

  2. In the editor's left-hand menu, choose Publish as Template.

  3. In the form that appears, enter the template details:

    • The Title must be unique.

    • The Description field supports Markdown formatting.

    • The Author field accepts Markdown-formatted links.

After submission, template details can be edited, or the template can be deleted via the Template Gallery page. Users can manage their own templates; admins can manage any template.

Here is an example:

Last updated

Was this helpful?