Skip to content

Commit

Permalink
Merge pull request #475 from gethinode/develop
Browse files Browse the repository at this point in the history
Fix timeline content
  • Loading branch information
markdumay committed Aug 28, 2023
2 parents eb5d4b3 + 9c0ea3e commit df017d9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
3 changes: 0 additions & 3 deletions config/_default/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ home = ["HTML", "RSS", "REDIR"]
[[module.mounts]]
source = "content"
target = "content"
[[module.mounts]]
source = "data"
target = "data"
[[module.mounts]]
source = "i18n"
target = "i18n"
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/en/blog/bootstrap-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ As an example, the following shortcode displays the full text of an abbreviation

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* abbr html */>}}
{{</* abbr "CI/CD" */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

Expand Down
3 changes: 3 additions & 0 deletions data/abbr.yml → exampleSite/data/abbr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@

- id: svg
long: "Scalable Vector Graphics"

- id: ci/cd
long: "Continous Integration/Continuous Deployment"
10 changes: 6 additions & 4 deletions layouts/shortcodes/timeline.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
-->

{{ $error := false }}
{{- $page := .Page -}}

{{- $data := .Get "data" -}}
{{ if not $data -}}
Expand Down Expand Up @@ -59,6 +60,7 @@
<!-- Inline partial to render icon -->
{{- define "partials/timeline-panel.html" -}}
{{- $col := default 6 .col -}}
{{- $page := .page -}}
{{- $content := .content -}}
{{- $color := .color -}}
{{- $title := .title -}}
Expand Down Expand Up @@ -87,7 +89,7 @@
{{ $datestr := (partial "utilities/date.html" (dict "date" $date "format" "long")) -}}
<p class="mb-0"><small class="text-body-secondary text-uppercase">{{ $datestr -}}</small></p>
{{ end }}
<p class="mt-3 mb-0">{{ $content | .Page.RenderString }}</p>
<p class="mt-3 mb-0">{{ $content | $page.RenderString }}</p>
</div>
</div>
</div>
Expand All @@ -98,11 +100,11 @@
{{ range $index, $item := $entries }}
<div class="row timeline timeline-{{ $item.color }} timeline-dot g-0 ">
{{ if eq (mod $index 2) 1 }}
{{ partial "partials/timeline-panel.html" (dict "content" $item.content "color" $item.color "title" $item.title "badge" $item.badge "date" $item.date "url" $item.url "direction" "start") }}
{{ partial "partials/timeline-panel.html" (dict "page" $page "content" $item.content "color" $item.color "title" $item.title "badge" $item.badge "date" $item.date "url" $item.url "direction" "start") }}
{{ partial "partials/timeline-icon.html" (dict "icon" $item.icon "direction" "start") }}
{{ else }}
{{ partial "partials/timeline-icon.html" (dict "icon" $item.icon "direction" "end") }}
{{ partial "partials/timeline-panel.html" (dict "content" $item.content "color" $item.color "title" $item.title "badge" $item.badge "date" $item.date "url" $item.url "direction" "end") }}
{{ partial "partials/timeline-panel.html" (dict "page" $page "content" $item.content "color" $item.color "title" $item.title "badge" $item.badge "date" $item.date "url" $item.url "direction" "end") }}
{{ end }}
</div>
<div class="row timeline g-0 p-3"> </div>
Expand All @@ -114,7 +116,7 @@
{{ range $index, $item := $entries }}
<div class="row timeline-sm timeline-{{ $item.color }} timeline-dot g-0">
{{ partial "partials/timeline-icon.html" (dict "icon" $item.icon "direction" "end" "col" 3) }}
{{ partial "partials/timeline-panel.html" (dict "content" $item.content "color" $item.color "title" $item.title "badge" $item.badge "date" $item.date "url" $item.url "direction" "end" "col" 9) }}
{{ partial "partials/timeline-panel.html" (dict "page" $page "content" $item.content "color" $item.color "title" $item.title "badge" $item.badge "date" $item.date "url" $item.url "direction" "end" "col" 9) }}
</div>
<div class="row timeline-sm g-0 p-3"> </div>
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.19.0-alpha2",
"version": "0.19.0-alpha3",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",
Expand Down

0 comments on commit df017d9

Please sign in to comment.