Skip to content

Commit 677ca18

Browse files
committed
Fix #31: Enable anchor links for kroxylicious.io
Signed-off-by: kwall <[email protected]>
1 parent 73b8256 commit 677ca18

File tree

10 files changed

+47
-10
lines changed

10 files changed

+47
-10
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ group :jekyll_plugins do
1313
gem "jekyll-feed", "~> 0.12"
1414
gem "jekyll-sass-converter"
1515
gem "jekyll-seo-tag"
16+
gem "jekyll-toc"
1617
end
1718

1819
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem

Gemfile.lock

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ GEM
3939
sass-embedded (~> 1.54)
4040
jekyll-seo-tag (2.8.0)
4141
jekyll (>= 3.8, < 5.0)
42+
jekyll-toc (0.18.0)
43+
jekyll (>= 3.9)
44+
nokogiri (~> 1.12)
4245
jekyll-watch (2.2.1)
4346
listen (~> 3.0)
4447
kramdown (2.4.0)
@@ -50,9 +53,15 @@ GEM
5053
rb-fsevent (~> 0.10, >= 0.10.3)
5154
rb-inotify (~> 0.9, >= 0.9.10)
5255
mercenary (0.4.0)
56+
mini_portile2 (2.8.5)
57+
nokogiri (1.16.0)
58+
mini_portile2 (~> 2.8.2)
59+
racc (~> 1.4)
5360
pathutil (0.16.2)
5461
forwardable-extended (~> 2.6)
5562
public_suffix (5.0.3)
63+
racc (1.7.3)
64+
racc (1.7.3-java)
5665
rake (13.1.0)
5766
rb-fsevent (0.11.2)
5867
rb-inotify (0.10.1)
@@ -94,6 +103,7 @@ DEPENDENCIES
94103
jekyll-feed (~> 0.12)
95104
jekyll-sass-converter
96105
jekyll-seo-tag
106+
jekyll-toc
97107
tzinfo (>= 1, < 3)
98108
tzinfo-data
99109
wdm (~> 0.1.1)

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ plugins:
3131
- jekyll-feed
3232
- jekyll-sass-converter
3333
- jekyll-seo-tag
34+
- jekyll-toc
3435

3536
# Exclude from processing.
3637
# The following items will not be processed, by default.

_layouts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ <h1 class="fw-bold text-body-emphasis lh-1 mb-3">Kroxylicious transparently inje
3636
</div>
3737
</div>
3838
</div>
39-
</div>
39+
</div>

_layouts/overview.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
---
22
layout: default
3+
toc: true
34
---
45
<div class="row justify-content-center">
56
<div class="col-11 col-lg-8 card shadow gx-5 gy-5 m-lg-5">
67
<div class="row g-0">
78
<div class="col-auto">
89
<div class="card-body">
910
<div class="card-text m-2">
10-
{{ content | markdownify }}
11+
{{ content | markdownify | inject_anchors }}
1112
</div>
1213
</div>
1314
</div>
1415
</div>
1516
</div>
16-
</div>
17+
</div>

_layouts/use-cases.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
layout: default
3+
toc: true
34
---
45

56
<div class="row justify-content-center">
@@ -9,8 +10,7 @@
910
<div class="row g-0">
1011
<div class="col-auto">
1112
{% for use_case in site.use_cases %}
12-
<h2 class="card-subtitle">{{ use_case.name }}</h2>
13-
<p class="card-text">{{ use_case.content | markdownify }}</p>
13+
<p class="card-text">{{ use_case.content | markdownify | inject_anchors}}</p>
1414
{% endfor %}
1515
</div>
1616
</div>

_use_cases/encryption-at-rest.markdown

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
name: Encryption At Rest
33
---
44

5-
## Why
5+
### Encryption At Rest
6+
7+
#### Why
68

79
Apache Kafka&#174; does not directly support any form of encryption for data stored within a broker. This means that the contents
810
of records sent to Apache Kafka are stored in the clear on the broker's disks. Anyone with sufficient access, such as a Kafka Administrator
@@ -20,7 +22,7 @@ data is now residing in the clear on the file systems of the service provider.
2022
|:-----------------------------------------------------------------:|
2123
| *Problem: Plain text records readable by the Kafka Admins* |
2224

23-
### Isn't TLS sufficient?
25+
##### Isn't TLS sufficient?
2426

2527
TLS encrypts the content _in transit_. It means that someone using a network sniffer cannot intercept what is being
2628
sent over the wire between the application and the Kafka Broker. However, once the network packets arrive at the broker,
@@ -29,7 +31,7 @@ of the broker and in the clear when the data is written to the file system.
2931

3032
TLS does not change the problem.
3133

32-
### Isn't storage volume encryption an answer?
34+
##### Isn't storage volume encryption an answer?
3335

3436
With storage volume encryption, the contents of the volume are encrypted with a single key. This approach provides some mitigations.
3537
If the storage device is stolen or the storage device hijacked and attached to an attacker's computer, the attacker won't have
@@ -41,7 +43,7 @@ to be able to read the data, including the Kafka confidential records.
4143

4244
Storage volume encryption doesn't really solve the problem.
4345

44-
### Can't the applications encrypt/decrypt the data?
46+
##### Can't the applications encrypt/decrypt the data?
4547

4648
It is possible for producing applications to encrypt data before sending it to Kafka, and for consuming applications to decrypt it
4749
again. With this approach the brokers never possess the records in the clear and as they don't have encryption keys, they cannot
@@ -64,7 +66,7 @@ of a design flaw or bug are significant (confidentiality breach).
6466
Having the applications encrypt/decrypt data themselves, whilst technically feasible, is not really a tenable solution
6567
at the scale required for most enterprises.
6668

67-
# Kroxylicious Topic Encryption
69+
#### Kroxylicious Topic Encryption
6870

6971
The Kroxylicious Topic Encryption feature offers a solution to the problem. The proxy takes the responsibility
7072
to encrypt and decrypt the messages. In this way, the Kafka Brokers never see the plain text content of

css/code.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,23 @@
148148
.highlight .w {
149149
color: #bbbbbb;
150150
}
151+
152+
h2>a.anchor, h3>a.anchor, h4>a.anchor, h5>a.anchor, h6>a.anchor {
153+
display: block;
154+
margin-left: -1.5ex;
155+
position: absolute;
156+
text-decoration: none !important;
157+
visibility: hidden;
158+
z-index: 2;
159+
transition: visibility 1s;
160+
}
161+
162+
h2>a.anchor::before, h3>a.anchor::before, h4>a.anchor::before, h5>a.anchor::before, h6>a.anchor::before {
163+
content: "\00A7";
164+
display: block;
165+
}
166+
167+
h2:hover>a.anchor, h2>a.anchor:hover, h3:hover>a.anchor, h3>a.anchor:hover, h4:hover>a.anchor, h4>a.anchor:hover, h5:hover>a.anchor, h5>a.anchor:hover, h6:hover>a.anchor, h6>a.anchor:hover {
168+
visibility: visible;
169+
}
170+

overview.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: overview
33
title: Overview
44
permalink: /overview/
5+
toc: true
56
---
67

78
This page provides an overview of how Kroxylicious works. For more details, please refer to the [documentation](./kroxylicious).

use-cases.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
layout: use-cases
33
title: Use Cases
44
permalink: /use-cases/
5+
toc: true
56
---
67

0 commit comments

Comments
 (0)