Skip to content

Build-time configuration of index.html #845

@sandstrom

Description

@sandstrom

I'd like to gauge interest / comments for an easier way to customize index.html output.

Use-case

We have some dynamic values that we want to interpolate into the index.html file at build time. For example, static classes on the <html> element and special meta attributes.

Ember already provides the content-for hook, but adding individual attributes to specific html elements is trickier.

Possible solution

  • Exposing the internal configReplacePatterns API, for example a addReplacePattern method or a key under config (environment.js), say additionalReplacePatterns: [ … ]
  • Allowing custom 'slots' for use with {{content-for 'my-slot'}}.

Reference code

https://github.com/ember-cli/ember-cli/blob/b24b73b388934796ca915ca665b48a27c857199b/lib/utilities/ember-app-utils.js#L169

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions