Skip to content

Commit 2a8a915

Browse files
committed
Small website fixes.
Signed-off-by: Bartek Plotka <[email protected]>
1 parent 1cb36be commit 2a8a915

File tree

10 files changed

+61
-24
lines changed

10 files changed

+61
-24
lines changed

docs/components/query.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Querier currently is fully stateless and horizontally scalable.
1717
$ thanos query \
1818
--http-address "0.0.0.0:9090" \
1919
--store "<store-api>:<grpc-port>" \
20-
--store "<store-api2>:<grpc-port>" \
20+
--store "<store-api2>:<grpc-port>"
2121
```
2222

2323
## Deduplication

docs/contributing/how-to-contribute-to-docs.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,13 @@ Show new menu section in main page by changing `website/layouts/_default/baseof.
6565

6666
## Testing
6767

68-
Run `make web-serve` to serve and preview the website locally.
68+
Run `make web-serve` to serve and preview the website locally.
69+
70+
71+
## Deployment.
72+
73+
Ask maintainer to deploy the page. (`GOOGLE_ANALYTICS_TOKEN="< >" make web-deploy`)
74+
75+
NOTE: It might take couple of seconds to refresh page / CDN for Github pages.
76+
77+
TODO(bwplotka) CI job which does that on every master commit.

docs/proposals/approved/201809_gossip-removal.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ title: Deprecated gossip clustering in favor of File SD
33
type: proposal
44
menu: proposals
55
status: accepted
6-
issue: 484
76
owner: bwplotka
87
---
98

9+
### Ticket: https://github.com/improbable-eng/thanos/issues/484
1010
## Summary
1111

1212
It is becoming clear that we need to remove gossip protocol as our main way of communication between Thanos Querier and

docs/proposals/approved/201901-read-write-operations-bucket.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ status: accepted
66
owner: bwplotka
77
---
88

9-
**Tickets:**
9+
### Tickets:
1010

1111
* https://github.com/improbable-eng/thanos/issues/298 (eventual consistency)
1212
* https://github.com/improbable-eng/thanos/issues/377 (eventual consistency & partial upload)

docs/service-discovery.md

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ The format of the configuration file is the same as the one used in [Prometheus'
4545
Both YAML and JSON files can be used. The format of the files is this:
4646

4747
* JSON:
48+
4849
```json
4950
[
5051
{
@@ -54,6 +55,7 @@ Both YAML and JSON files can be used. The format of the files is this:
5455
```
5556

5657
* YAML:
58+
5759
```yaml
5860
- targets: ['localhost:9090', 'example.org:443']
5961
```

scripts/websitepreprocess.sh

+27-10
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,61 @@ mkdir -p ${OUTPUT_CONTENT_DIR}
1616
# 1. Copy original content.
1717
cp -r ${ORIGINAL_CONTENT_DIR}/* ${OUTPUT_CONTENT_DIR}
1818

19-
# 2. Copy extra files to content: CODE_OF_CONDUCT.md, CONTRIBUTING.md and CHANGELOG.md files.
19+
# 2. Add headers to special CODE_OF_CONDUCT.md, CONTRIBUTING.md and CHANGELOG.md files.
2020
echo "$(cat <<EOT
2121
---
2222
title: Code of Conduct
2323
type: docs
2424
menu: contributing
2525
---
26-
2726
EOT
28-
)$(cat CODE_OF_CONDUCT.md)" > ${OUTPUT_CONTENT_DIR}/CODE_OF_CONDUCT.md
27+
)" > ${OUTPUT_CONTENT_DIR}/CODE_OF_CONDUCT.md
28+
tail -n +2 CODE_OF_CONDUCT.md >> ${OUTPUT_CONTENT_DIR}/CODE_OF_CONDUCT.md
2929

3030
echo "$(cat <<EOT
3131
---
3232
title: Contributing
3333
type: docs
3434
menu: contributing
3535
---
36-
3736
EOT
38-
)$(cat CONTRIBUTING.md)" > ${OUTPUT_CONTENT_DIR}/CONTRIBUTING.md
37+
)" > ${OUTPUT_CONTENT_DIR}/CONTRIBUTING.md
38+
tail -n +2 CONTRIBUTING.md >> ${OUTPUT_CONTENT_DIR}/CONTRIBUTING.md
3939

4040
echo "$(cat <<EOT
4141
---
4242
title: Changelog
4343
type: docs
4444
menu: thanos
4545
---
46+
EOT
47+
)" > ${OUTPUT_CONTENT_DIR}/CHANGELOG.md
48+
tail -n +2 CHANGELOG.md >> ${OUTPUT_CONTENT_DIR}/CHANGELOG.md
49+
50+
ALL_DOC_CONTENT_FILES=`echo "${OUTPUT_CONTENT_DIR}/**/*.md ${OUTPUT_CONTENT_DIR}/*.md"`
51+
for file in ${ALL_DOC_CONTENT_FILES}
52+
do
53+
54+
relFile=${file#*/*/}
55+
echo "$(cat <<EOT
56+
57+
---
58+
59+
Found a typo, inconsistency or missing information in our docs?
60+
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:
4661
4762
EOT
48-
)$(cat CHANGELOG.md)" > ${OUTPUT_CONTENT_DIR}/CHANGELOG.md
63+
)" >> ${file}
64+
65+
done
4966

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

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

5875
# Pass Google analytics token:
5976
sed -e 's/${GOOGLE_ANALYTICS_TOKEN}/'${GOOGLE_ANALYTICS_TOKEN}'/' ${WEBSITE_DIR}/hugo.tmpl.yaml > ${WEBSITE_DIR}/hugo-generated.yaml

website/layouts/_default/baseof.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<html lang="en">
33

44
<head>
5-
<meta charset="utf-8">
5+
<meta http-equiv="content-type" content="text/html;charset=utf-8">
6+
<meta http-equiv="X-UA-Compatible" content="chrome=1">
67
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
78
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS"
89
crossorigin="anonymous">
@@ -79,6 +80,8 @@ <h6 class="font-weight-bold">About</h6>
7980
crossorigin="anonymous"></script>
8081
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k"
8182
crossorigin="anonymous"></script>
82-
{{ template "_internal/google_analytics_async.html" . }}
83+
{{ if eq ( getenv "HUGO_ENV" ) "production" }}
84+
{{ template "_internal/google_analytics_async.html" . }}
85+
{{ end }}
8386
</body>
8487
</html>

website/layouts/_default/sidemenu.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@
88
<h5>Thanos</h5>
99
<div class="list-group list-group-flush">
1010
{{ range .Site.Menus.thanos }}
11-
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">{{ .Title }}</a>
11+
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">&nbsp;&nbsp;&nbsp;&nbsp;{{ .Title }}</a>
1212
{{ end }}
1313
</div>
1414
<h5 class="mt-3">Components</h5>
1515
<div class="list-group list-group-flush">
1616
{{ range .Site.Menus.components }}
17-
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">{{ .Title }}</a>
17+
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">&nbsp;&nbsp;&nbsp;&nbsp;{{ .Title }}</a>
1818
{{ end }}
1919
</div>
2020
<h5 class="mt-3">Contributing</h5>
2121
<div class="list-group list-group-flush">
2222
{{ range .Site.Menus.contributing }}
23-
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">{{ .Title }}</a>
23+
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">&nbsp;&nbsp;&nbsp;&nbsp;{{ .Title }}</a>
2424
{{ end }}
2525
</div>
2626
<h5 class="mt-3">Proposals</h5>
2727
<div class="list-group list-group-flush">
2828
{{ range .Site.Menus.proposals }}
29-
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">{{ .Title }}</a>
29+
<a class="list-group-item list-group-item-action list-group-item-thanos py-1" href="{{ .URL }}">&nbsp;&nbsp;&nbsp;&nbsp;{{ .Title }}</a>
3030
{{ end }}
3131
</div>
3232
</nav>

website/layouts/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ <h4 class="font-weight-bold">Unlimited Retention</h4>
4343
<div class="col-12 col-md-6 col-lg text-center py-5">
4444
<i class="fas fa-plug fa-5x db mb-3"></i>
4545
<h4 class="font-weight-bold">Prometheus Compatible</h4>
46-
<p>Use the same tools you love such as Grafana or others that supports Prometheus Query API</p>
46+
<p>Use the same tools you love such as Grafana or others that supports Prometheus Query API.</p>
4747
</div>
4848
<div class="col-12 col-md-6 col-lg text-center py-5">
4949
<i class="fas fa-file-download fa-5x db mb-3"></i>
5050
<h4 class="font-weight-bold">Downsampling & Compaction</h4>
51-
<p>Downsample historical data for massive query speedup when querying large time ranges or configure complex retention policies</p>
51+
<p>Downsample historical data for massive query speedup when querying large time ranges or configure complex retention policies.</p>
5252
</div>
5353
</div>
5454
</div>

website/static/main.css

+8-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@
1212
max-width: 100%;
1313
}
1414

15-
.navbar-dark .navbar-nav .nav-link:hover {
16-
color: #ffffff;
15+
.navbar-dark .navbar-nav .nav-link {
16+
color: #fff;
17+
}
18+
19+
.nav-link:hover {
20+
color: rgba(255,255,255,.5)
1721
}
1822

1923
.btn-outline-secondary {
@@ -38,9 +42,11 @@ pre {
3842
.list-group-item-thanos {
3943
color: #6D41FF;
4044
border: 0;
45+
padding: 0;
4146
background-color: transparent;
4247
}
4348

4449
.list-group-item-thanos:hover {
4550
color: #6D41FF;
51+
padding: 0;
4652
}

0 commit comments

Comments
 (0)