Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backMatter support #47

Merged
merged 1 commit into from
Jun 24, 2021
Merged

Add backMatter support #47

merged 1 commit into from
Jun 24, 2021

Conversation

saswatamcode
Copy link
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
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
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.

None yet

2 participants