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

Website for Thanos' docs using Hugo. #807

Merged
merged 38 commits into from
Apr 15, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e27de62
docs: try hugo
adrien-f Feb 2, 2019
2732f36
fix: bad root url
adrien-f Feb 2, 2019
0b2fad8
fix: bad root url
adrien-f Feb 2, 2019
869aa6a
fix: bad root url
adrien-f Feb 2, 2019
e6d50e6
fix: bad root url
adrien-f Feb 2, 2019
23a956d
update subtitle
adrien-f Feb 3, 2019
8ae3ce1
update
adrien-f Mar 17, 2019
7c0af37
update
adrien-f Mar 17, 2019
8168bd7
update hugo
adrien-f Mar 20, 2019
13710d9
fix: menus
adrien-f Mar 21, 2019
309f9eb
update
adrien-f Mar 22, 2019
f46ed71
update
adrien-f Mar 22, 2019
a47827f
move config outside website folder and rewrite getting-started
adrien-f Mar 23, 2019
c2355b1
update
adrien-f Mar 23, 2019
dae29eb
update
adrien-f Mar 23, 2019
140d864
Merge branch 'master' into feature/docs-hugo
bwplotka Mar 30, 2019
1f043ec
Bartek's weekend hacking.
bwplotka Mar 30, 2019
14b2df0
Merge pull request #1 from improbable-eng/fixes-to-deployment
adrien-f Mar 30, 2019
1d30983
Sunday hacking.
bwplotka Mar 31, 2019
e3dd9e6
Merge pull request #2 from improbable-eng/feature/docs-hugo-impr
adrien-f Mar 31, 2019
59fadbe
cleanup blog and some links
adrien-f Mar 31, 2019
af05ec2
fix: add perl in circle ci website build
adrien-f Mar 31, 2019
836ecbb
Fixed homepage.
bwplotka Mar 31, 2019
7fe678f
Added more info to how-to-docs.
bwplotka Mar 31, 2019
af186ec
Improved build.
bwplotka Mar 31, 2019
768146f
Moved back to old function.
bwplotka Mar 31, 2019
e47eba1
Fake change to poke deploy.
bwplotka Apr 1, 2019
03a3209
Moved to Improbable.
bwplotka Apr 1, 2019
6ee6785
Fixes.
bwplotka Apr 1, 2019
1cb36be
fix: use GA template tag
adrien-f Apr 9, 2019
2a8a915
Small website fixes.
bwplotka Apr 13, 2019
6199ac1
Merge pull request #3 from improbable-eng/bwplotka-docs-hugo-changes
bwplotka Apr 13, 2019
ff55d5a
fix: update text-indent on sidebar
adrien-f Apr 14, 2019
5403918
Merge branch 'master' into adrien-f-feature/docs-hugo
bwplotka Apr 14, 2019
bd6ebdf
Moved domains.
bwplotka Apr 14, 2019
7faae79
Fixed link.
bwplotka Apr 14, 2019
7c2e817
Removed not needed CI changes.
bwplotka Apr 14, 2019
0377848
Added CNAME file.
bwplotka Apr 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/components/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Querier currently is fully stateless and horizontally scalable.
$ thanos query \
--http-address "0.0.0.0:9090" \
--store "<store-api>:<grpc-port>" \
--store "<store-api2>:<grpc-port>" \
--store "<store-api2>:<grpc-port>"
```

## Deduplication
Expand Down
11 changes: 10 additions & 1 deletion docs/contributing/how-to-contribute-to-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,13 @@ Show new menu section in main page by changing `website/layouts/_default/baseof.

## Testing

Run `make web-serve` to serve and preview the website locally.
Run `make web-serve` to serve and preview the website locally.


## Deployment.

Ask maintainer to deploy the page. (`GOOGLE_ANALYTICS_TOKEN="< >" make web-deploy`)

NOTE: It might take couple of seconds to refresh page / CDN for Github pages.

TODO(bwplotka) CI job which does that on every master commit.
2 changes: 1 addition & 1 deletion docs/proposals/approved/201809_gossip-removal.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ title: Deprecated gossip clustering in favor of File SD
type: proposal
menu: proposals
status: accepted
issue: 484
owner: bwplotka
---

### Ticket: https://github.com/improbable-eng/thanos/issues/484
## Summary

It is becoming clear that we need to remove gossip protocol as our main way of communication between Thanos Querier and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ status: accepted
owner: bwplotka
---

**Tickets:**
### Tickets:

* https://github.com/improbable-eng/thanos/issues/298 (eventual consistency)
* https://github.com/improbable-eng/thanos/issues/377 (eventual consistency & partial upload)
Expand Down
2 changes: 2 additions & 0 deletions docs/service-discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ The format of the configuration file is the same as the one used in [Prometheus'
Both YAML and JSON files can be used. The format of the files is this:

* JSON:

```json
[
{
Expand All @@ -54,6 +55,7 @@ Both YAML and JSON files can be used. The format of the files is this:
```

* YAML:

```yaml
- targets: ['localhost:9090', 'example.org:443']
```
Expand Down
37 changes: 27 additions & 10 deletions scripts/websitepreprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,61 @@ mkdir -p ${OUTPUT_CONTENT_DIR}
# 1. Copy original content.
cp -r ${ORIGINAL_CONTENT_DIR}/* ${OUTPUT_CONTENT_DIR}

# 2. Copy extra files to content: CODE_OF_CONDUCT.md, CONTRIBUTING.md and CHANGELOG.md files.
# 2. Add headers to special CODE_OF_CONDUCT.md, CONTRIBUTING.md and CHANGELOG.md files.
echo "$(cat <<EOT
---
title: Code of Conduct
type: docs
menu: contributing
---

EOT
)$(cat CODE_OF_CONDUCT.md)" > ${OUTPUT_CONTENT_DIR}/CODE_OF_CONDUCT.md
)" > ${OUTPUT_CONTENT_DIR}/CODE_OF_CONDUCT.md
tail -n +2 CODE_OF_CONDUCT.md >> ${OUTPUT_CONTENT_DIR}/CODE_OF_CONDUCT.md

echo "$(cat <<EOT
---
title: Contributing
type: docs
menu: contributing
---

EOT
)$(cat CONTRIBUTING.md)" > ${OUTPUT_CONTENT_DIR}/CONTRIBUTING.md
)" > ${OUTPUT_CONTENT_DIR}/CONTRIBUTING.md
tail -n +2 CONTRIBUTING.md >> ${OUTPUT_CONTENT_DIR}/CONTRIBUTING.md

echo "$(cat <<EOT
---
title: Changelog
type: docs
menu: thanos
---
EOT
)" > ${OUTPUT_CONTENT_DIR}/CHANGELOG.md
tail -n +2 CHANGELOG.md >> ${OUTPUT_CONTENT_DIR}/CHANGELOG.md

ALL_DOC_CONTENT_FILES=`echo "${OUTPUT_CONTENT_DIR}/**/*.md ${OUTPUT_CONTENT_DIR}/*.md"`
for file in ${ALL_DOC_CONTENT_FILES}
do

relFile=${file#*/*/}
echo "$(cat <<EOT

---

Found a typo, inconsistency or missing information in our docs?
Help us to improve [Thanos](https://thanos.io) documentation by proposing a fix [on GitHub here](https://github.com/improbable-eng/thanos/edit/master/${relFile}) :heart:

EOT
)$(cat CHANGELOG.md)" > ${OUTPUT_CONTENT_DIR}/CHANGELOG.md
)" >> ${file}

done

# 3. All the absolute links needs are directly linking github with the given commit.
perl -pi -e 's/]\(\//]\(https:\/\/github.com\/improbable-eng\/thanos\/tree\/'${COMMIT_SHA}'\/docs\//' ${OUTPUT_CONTENT_DIR}/*.md ${OUTPUT_CONTENT_DIR}/**/*.md
perl -pi -e 's/]\(\//]\(https:\/\/github.com\/improbable-eng\/thanos\/tree\/'${COMMIT_SHA}'\/docs\//' ${ALL_DOC_CONTENT_FILES}

# 4. All the relative links needs to have ../ This is because Hugo is missing: https://github.com/gohugoio/hugo/pull/3934
perl -pi -e 's/]\(\.\//]\(..\//' ${OUTPUT_CONTENT_DIR}/*.md ${OUTPUT_CONTENT_DIR}/**/*.md
perl -pi -e 's/]\((?!http)/]\(..\//' ${OUTPUT_CONTENT_DIR}/*.md ${OUTPUT_CONTENT_DIR}/**/*.md
perl -pi -e 's/src=\"(?!http)/src=\"..\//' ${OUTPUT_CONTENT_DIR}/*.md ${OUTPUT_CONTENT_DIR}/**/*.md
perl -pi -e 's/]\(\.\//]\(..\//' ${ALL_DOC_CONTENT_FILES}
perl -pi -e 's/]\((?!http)/]\(..\//' ${ALL_DOC_CONTENT_FILES}
perl -pi -e 's/src=\"(?!http)/src=\"..\//' ${ALL_DOC_CONTENT_FILES}

# Pass Google analytics token:
sed -e 's/${GOOGLE_ANALYTICS_TOKEN}/'${GOOGLE_ANALYTICS_TOKEN}'/' ${WEBSITE_DIR}/hugo.tmpl.yaml > ${WEBSITE_DIR}/hugo-generated.yaml
7 changes: 5 additions & 2 deletions website/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<html lang="en">

<head>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS"
crossorigin="anonymous">
Expand Down Expand Up @@ -79,6 +80,8 @@ <h6 class="font-weight-bold">About</h6>
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k"
crossorigin="anonymous"></script>
{{ template "_internal/google_analytics_async.html" . }}
{{ if eq ( getenv "HUGO_ENV" ) "production" }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
</body>
</html>
8 changes: 4 additions & 4 deletions website/layouts/_default/sidemenu.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@
<h5>Thanos</h5>
<div class="list-group list-group-flush">
{{ range .Site.Menus.thanos }}
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">{{ .Title }}</a>
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">&nbsp;&nbsp;&nbsp;&nbsp;{{ .Title }}</a>
povilasv marked this conversation as resolved.
Show resolved Hide resolved
{{ end }}
</div>
<h5 class="mt-3">Components</h5>
<div class="list-group list-group-flush">
{{ range .Site.Menus.components }}
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">{{ .Title }}</a>
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">&nbsp;&nbsp;&nbsp;&nbsp;{{ .Title }}</a>
{{ end }}
</div>
<h5 class="mt-3">Contributing</h5>
<div class="list-group list-group-flush">
{{ range .Site.Menus.contributing }}
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">{{ .Title }}</a>
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">&nbsp;&nbsp;&nbsp;&nbsp;{{ .Title }}</a>
{{ end }}
</div>
<h5 class="mt-3">Proposals</h5>
<div class="list-group list-group-flush">
{{ range .Site.Menus.proposals }}
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">{{ .Title }}</a>
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">&nbsp;&nbsp;&nbsp;&nbsp;{{ .Title }}</a>
{{ end }}
</div>
</nav>
4 changes: 2 additions & 2 deletions website/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ <h4 class="font-weight-bold">Unlimited Retention</h4>
<div class="col-12 col-md-6 col-lg text-center py-5">
<i class="fas fa-plug fa-5x db mb-3"></i>
<h4 class="font-weight-bold">Prometheus Compatible</h4>
<p>Use the same tools you love such as Grafana or others that supports Prometheus Query API</p>
<p>Use the same tools you love such as Grafana or others that supports Prometheus Query API.</p>
</div>
<div class="col-12 col-md-6 col-lg text-center py-5">
<i class="fas fa-file-download fa-5x db mb-3"></i>
<h4 class="font-weight-bold">Downsampling & Compaction</h4>
<p>Downsample historical data for massive query speedup when querying large time ranges or configure complex retention policies</p>
<p>Downsample historical data for massive query speedup when querying large time ranges or configure complex retention policies.</p>
</div>
</div>
</div>
Expand Down
10 changes: 8 additions & 2 deletions website/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@
max-width: 100%;
}

.navbar-dark .navbar-nav .nav-link:hover {
color: #ffffff;
.navbar-dark .navbar-nav .nav-link {
color: #fff;
}

.nav-link:hover {
color: rgba(255,255,255,.5)
}

.btn-outline-secondary {
Expand All @@ -38,9 +42,11 @@ pre {
.list-group-item-thanos {
color: #6D41FF;
border: 0;
padding: 0;
background-color: transparent;
}

.list-group-item-thanos:hover {
color: #6D41FF;
padding: 0;
}