Skip to content

Add backMatter support#47

Merged
bwplotka merged 1 commit intobwplotka:mainfrom
saswatamcode:backmatter
Jun 24, 2021
Merged

Add backMatter support#47
bwplotka merged 1 commit intobwplotka:mainfrom
saswatamcode:backmatter

Conversation

@saswatamcode
Copy link
Copy Markdown
Collaborator

This PR adds support for "back matter" config in transform.

Sematics are similar to frontmatter but it is not parsed as YAML, only text.

For example,

    backMatter:
      template: |
        Found a typo, inconsistency or missing information in our docs?
        Help us to improve [Thanos](https://thanos.io) documentation by proposing a fix [on GitHub here](https://github.com/thanos-io/thanos/edit/main/docs/{{ .Origin.Filename }}) :heart:

Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
Copy link
Copy Markdown
Owner

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one nit, but let's fix later.

m := b.Bytes()
m = append([]byte(demark), m...)

// Back matter is not parsed as YAML since it is generally assumed to be a block of text.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be confusing that one is yaml, one not, maybe worth to document it better.

@bwplotka bwplotka merged commit cea6530 into bwplotka:main Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants