Skip to content

Commit

Permalink
updated-blog-view
Browse files Browse the repository at this point in the history
  • Loading branch information
sangam14 committed Dec 1, 2023
1 parent 7320a9e commit d1b7f8f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions layouts/_default/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ <h3> Thanks to all our contributors!</h3>


</main>





</div>
{{ end }}

11 changes: 8 additions & 3 deletions layouts/blog/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
{{ end }}

{{ define "main" }}
{{ partial "article-nav.html" . }}
{{ partial "article-nav" . }}
{{ partial "article-header" . }}
{{ partial "blog/hero.html" . }}
{{ partial "blog/content.html" . }}
{{ partial "site-footer.html" . }}
<div id="article-content">
{{ $content := .Content }}
{{ $content = replaceRE `<a href="(https?://.+)">` `<a href="$1" target="_blank">` $content | safeHTML }}
{{ $content | safeHTML }}
</div>
{{ partial "toc" . }}
{{ end }}
2 changes: 1 addition & 1 deletion layouts/partials/blog/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="column is-two-thirds">
<div class="docs-content">
<div class="content is-medium has-extra-bottom-padding">
{{ .Content }}
{{ .Content }}
</div>
</div>
</div>
Expand Down

0 comments on commit d1b7f8f

Please sign in to comment.