-
Notifications
You must be signed in to change notification settings - Fork 169
Blog revitalization: homepage section, post tagging, and landing page #705
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,8 @@ | |
|
|
||
| {{< /blocks/section >}} | ||
|
|
||
| {{< recent-blog-posts >}} | ||
|
|
||
| <!-- | ||
| {{< blocks/partners color="danger" >}} | ||
| --> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,5 +3,12 @@ title: Blog | |
| menu: | ||
| main: | ||
| weight: 40 | ||
| description: > | ||
| News, releases, tutorials, and deep dives from the Tekton community. | ||
| --- | ||
|
|
||
| Stay up to date with the latest Tekton developments. Our blog features release announcements, | ||
| security best practices, tutorials, and insights from contributors across the ecosystem. | ||
|
|
||
| **Want to contribute a post?** Check out our [blog guidelines](/docs/contribute/blog-guidelines/) | ||
| to learn how to submit your article. | ||
|
Comment on lines
+10
to
+14
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not shown in the blog page You can add it to <div class="col-12">
{{ with .Content }}
<div class="mb-4">
{{ . }}
</div>
{{ end }}
{{- if .Pages -}} |
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NIT: we may miss new updates from future Docsy versions with this, but not big deal
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you adding this file and This file looks similar to td-conten.html from docsy main branch. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <div class="td-content"> | ||
| <h1>{{ .Title }}</h1> | ||
| {{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }} | ||
| <div class="td-byline mb-4"> | ||
| {{ with .Params.author }}{{ T "post_byline_by" }} <b>{{ . | markdownify }}</b> |{{ end}} | ||
| <time datetime="{{ $.Date.Format "2006-01-02" }}" class="text-muted">{{ $.Date.Format $.Site.Params.time_format_blog }}</time> | ||
| </div> | ||
| {{ with .Params.tags }} | ||
| <div class="blog-tags mb-4"> | ||
| {{ range . }} | ||
| <span class="badge badge-primary mr-1">{{ . }}</span> | ||
| {{ end }} | ||
| </div> | ||
| {{ end }} | ||
| {{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) }} | ||
| <header class="article-meta"> | ||
| {{ partial "reading-time.html" . }} | ||
| </header> | ||
| {{ end }} | ||
| {{ .Content }} | ||
| {{ if (.Site.Params.DisqusShortname) }} | ||
| <br /> | ||
| {{ partial "disqus-comment.html" . }} | ||
| <br /> | ||
| {{ end }} | ||
|
|
||
| {{ partial "pager.html" . }} | ||
| </div> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| {{ define "main" }} | ||
| {{ if (and .Parent .Parent.IsHome) }} | ||
| {{ $.Scratch.Set "blog-pages" (where .Site.RegularPages "Section" .Section) }} | ||
| {{ else }} | ||
| {{$.Scratch.Set "blog-pages" .Pages }} | ||
| {{ end }} | ||
|
|
||
| <div class="row"> | ||
| <div class="col-12"> | ||
| {{ .Content }} | ||
| {{- if .Pages -}} | ||
| {{ $pag := .Paginate (( $.Scratch.Get "blog-pages").GroupByDate "2006" )}} | ||
| {{ range $pag.PageGroups }} | ||
| <h2>{{ T "post_posts_in" }} {{ .Key }}</h2> | ||
| <ul class="list-unstyled mt-4"> | ||
| {{ range .Pages }} | ||
| <li class="media mb-4"> | ||
| <div class="media-body"> | ||
| <h5 class="mt-0 mb-1"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h5> | ||
| <p class="mb-2 mb-md-3"> | ||
| <small class="text-muted">{{ .Date.Format ($.Param "time_format_blog") }} {{ T "ui_in"}} {{ .CurrentSection.LinkTitle }}</small> | ||
| {{ with .Params.tags }} | ||
| {{ range . }} | ||
| <span class="badge badge-primary ml-1">{{ . }}</span> | ||
| {{ end }} | ||
| {{ end }} | ||
| </p> | ||
| {{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) }} | ||
| <header class="article-meta"> | ||
| {{ partial "reading-time.html" . }} | ||
| </header> | ||
| {{ end }} | ||
| {{ partial "featured-image.html" (dict "p" . "w" 250 "h" 125 "class" "float-left mr-3 pt-1 d-none d-md-block") }} | ||
| <p class="pt-0 mt-0">{{ .Plain | safeHTML | truncate 250 }}</p> | ||
| <p class="pt-0"><a href="{{ .RelPermalink }}" aria-label="{{ T "ui_read_more"}} - {{ .LinkTitle }}">{{ T "ui_read_more"}}</a></p> | ||
| </div> | ||
| </li> | ||
| {{ end }} | ||
| </ul> | ||
| {{ end }} | ||
| {{ end }} | ||
| </div> | ||
| </div> | ||
| <div class="row pl-2 pt-2"> | ||
| <div class="col"> | ||
| {{ if .Pages }} | ||
| {{ template "_internal/pagination.html" . }} | ||
| {{ end }} | ||
| </div> | ||
| </div> | ||
| {{ end }} |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I've seen this type of list on other websites, perhaps it's a good candidate for submission upstream in https://github.com/google/docsy as well :) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| {{/* Recent Blog Posts shortcode for the homepage */}} | ||
| {{ $pages := where site.RegularPages "Section" "blog" }} | ||
| {{ $recent := first 3 $pages }} | ||
| {{ if $recent }} | ||
| <a id="td-block-blog" class="td-offset-anchor"></a> | ||
| <section class="row td-box td-box--white td-box--gradient td-box--height-auto"> | ||
| <div class="container"> | ||
| <div class="row justify-content-center mb-4 pt-4"> | ||
| <div class="col-lg-8 text-center"> | ||
| <h2 class="mb-2">Latest from the Blog</h2> | ||
| <p class="text-muted">News, tutorials, and deep dives from the Tekton community</p> | ||
| </div> | ||
| </div> | ||
| <div class="row"> | ||
| {{ range $recent }} | ||
| <div class="col-lg-4 col-md-6 mb-4"> | ||
| <div class="card blog-card h-100 shadow-sm border-0"> | ||
| <div class="card-body d-flex flex-column"> | ||
| <div class="mb-2"> | ||
| <small class="text-muted"> | ||
| <i class="fas fa-calendar-alt mr-1"></i> | ||
| {{ .Date.Format "January 2, 2006" }} | ||
| </small> | ||
| {{ with .Params.tags }} | ||
| {{ range first 2 . }} | ||
| <span class="badge badge-outline-primary ml-1">{{ . }}</span> | ||
| {{ end }} | ||
| {{ end }} | ||
| </div> | ||
| <h5 class="card-title"> | ||
| <a href="{{ .RelPermalink }}" class="text-dark"> | ||
| {{ .LinkTitle }} | ||
| </a> | ||
| </h5> | ||
| <p class="card-text text-muted flex-grow-1"> | ||
| {{ with .Description }} | ||
| {{ . | truncate 150 }} | ||
| {{ else }} | ||
| {{ .Summary | truncate 150 }} | ||
| {{ end }} | ||
| </p> | ||
| <div class="mt-2"> | ||
| <small class="text-muted"> | ||
| {{ with .Params.author }} | ||
| <i class="fas fa-user mr-1"></i>{{ . }} | ||
| {{ end }} | ||
| </small> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| {{ end }} | ||
| </div> | ||
| <div class="row justify-content-center mt-2 pb-4"> | ||
| <div class="col text-center"> | ||
| <a href="/blog/" class="btn btn-outline-primary btn-lg"> | ||
| View all posts <i class="fas fa-arrow-right ml-2"></i> | ||
| </a> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </section> | ||
| {{ end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused CSS or maybe it was forgotten to be used on the badge in
recent-blog-posts.html?I tried using it and it looks bad. The darker is badge-light.