Skip to content

Commit

Permalink
Added blog space on Thanos website. (thanos-io#5873)
Browse files Browse the repository at this point in the history
Signed-off-by: bwplotka <[email protected]>

Signed-off-by: bwplotka <[email protected]>
  • Loading branch information
bwplotka authored and Nathaniel Graham committed May 18, 2023
1 parent b5bd7a6 commit b51645e
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .mdox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ transformations:
menu: contributing
lastmod: "{{ .Origin.LastMod }}"
backMatter: *docBackMatter


# Non-versioned element: Blog.
- glob: "blog/*"
path: /../blog/*

- glob: "**/README.md"
path: _index.md
frontMatter: &justTitleFrontMatter
Expand Down
11 changes: 11 additions & 0 deletions docs/blog/welcome.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Welcome to Thanos Blog Space!
date: "2022-11-07"
author: Thanos Team
---

Welcome 👋🏼

This space was created for the Thanos community to share learnings, insights, best practices and cool things to the world. If you are interested in contributing relevant content to Thanos blog, feel free to add Pull Request (PR) to [Thanos repo's blog directory](http://github.com/thanos-io/thanos). See ya there!

PS: For Prometheus specific content, consider contributing to [Prometheus blog space](https://prometheus.io/blog/) by creating PR to [Prometheus docs repo](https://github.com/prometheus/docs/tree/main/content/blog).
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = "website/public"

# Our Makefile builds Hugo, but it's faster if Netlify grabs the correct version on their own
# via a simple cURL.
environment = { HUGO_VERSION="0.80.0" }
environment = { HUGO_VERSION="v0.101.0" }

# NOTE: the sleep at the end is to make sure logs are not truncated on error.
command = "(env && make web HUGO=$(which hugo)) || (sleep 30; false)"
Expand Down
3 changes: 3 additions & 0 deletions website/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
<li class="nav-item">
{{ partial "versioning/version-picker.html" . }}
</li>
<li class="nav-item">
<a class="nav-link" href="/blog">Blog</a>
</li>
<li class="nav-item">
<a href="https://github.com/{{ .Site.Params.GithubUser }}/{{ .Site.Params.GithubProject }}" class="nav-link"><i class="fab fa-fw fa-github"></i> GitHub</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions website/layouts/partials/versioning/banner.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $currentVersion := index (split .Dir "/") 0 }}
{{- $currentVersion := index (split .File.Dir "/") 0 }}
{{- $latestVersion := "tip" }}
{{- $latestUrl := replace .URL $currentVersion $latestVersion }}
{{- $latestUrl := replace .RelPermalink $currentVersion $latestVersion }}

{{- if ne $currentVersion $latestVersion }}
<div class="alert alert-warning" role="alert">
Expand Down
1 change: 1 addition & 0 deletions website/layouts/partials/versioning/version-picker.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
{{- range .Site.Sections.Reverse }}
{{- $version := .Section }}
{{- if eq $version "blog" }}{{continue}}{{end}}
<a class="dropdown-item" href="{{ printf "../../../../%s" $version }}/thanos/getting-started.md">
{{ $version }}
</a>
Expand Down

0 comments on commit b51645e

Please sign in to comment.