Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Antora
Antora
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 172
    • Issues 172
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 35
    • Merge Requests 35
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Antora
  • AntoraAntora
  • Issues
  • #209

Closed
Open
Opened Mar 21, 2018 by Dan Allen@mojavelinuxOwner

Add context as second argument to ContentCatalog#addFile

To make adding a file to the catalog simpler, the ContentCatalog#addFile method should accept a second argument that serves as the context for the file being added. Any properties that are not set on the file being added will be automatically populated from this context / reference file.

addFile (file, context) { ... }

The context parameter can either be a file with a src property or the src property itself (or maybe we should only allow the second).

For example, to add a file to the same component, version, and module of another file, all you'd have to do is set the relative path and family (and for now, basename), and the rest of the properties get populated automatically.

This feature would be very useful in extensions, where you might want to register an addition asset such as an image to be used on the current page.

Edited Mar 21, 2018 by Dan Allen
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
TBD
Milestone
TBD
Assign milestone
Time tracking
None
Due date
None
Reference: antora/antora#209