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

Support html in homeSubtitle in index.html #193

Open
fnobilia opened this issue Aug 6, 2020 · 1 comment
Open

Support html in homeSubtitle in index.html #193

fnobilia opened this issue Aug 6, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@fnobilia
Copy link

fnobilia commented Aug 6, 2020

It would be cool having the possibility to handle HTML href in homeSubtitle. This way you can add stuff <MY POSITION> at <COMPANY HREF>.

My take would be adding an extra parameter called homeSubtitleWithHtml and then in index.html replace

{{- with .Site.Params.homeSubtitle }}
  <p>{{.}}</p>
{{- end }}

with

{{ if .Site.Params.homeSubtitleWithHtml }}
  {{- with .Site.Params.homeSubtitleWithHtml }}
    {{. | safeHTML }}
  {{- end }}
{{else}}
  {{- with .Site.Params.homeSubtitle }}
    <p>{{.}}</p>
  {{- end }}
{{ end }}

Not sure if that's the best way to achieve this. If you like the approach, I can open a PR this way you can comment.

BTW, amazing job! It's really useful! Thx a lot! 👏

@fnobilia fnobilia changed the title Support html in homeSubtitle Support html in homeSubtitle in index.html Aug 6, 2020
@rhazdon rhazdon added the enhancement New feature or request label Jan 10, 2021
@prasket
Copy link

prasket commented Jan 27, 2021

@fnobilia I like it! I would submit a PR and make sure to update docs with the new param. 🤞 maintainer likes what they see. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants