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

Ensure local page refs are local #1282

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions content/en/blog/2022/apisix.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ interface, resulting in a call chain consisting of two spans.

### Step 1: Deploy OpenTelemetry

The following uses docker-compose as an example. For other deployments,
see [Getting Started](https://opentelemetry.io/docs/collector/getting-started/).
The following uses docker-compose as an example. For other deployments, see
[Getting Started](/docs/collector/getting-started/).

You can see the following command to deploy:

Expand Down Expand Up @@ -229,7 +229,7 @@ Apache APISIX.

You can see the following example to create a route and enable
the`opentelemetry` plugin for sampling:

```shell
curl http://127.0.0.1:9080/apisix/admin/routes/1 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \
Expand All @@ -253,7 +253,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 \
```

Modify the `./examples/demo/otel-collector-config.yaml` file to add the OTLP
HTTP Receiver.
HTTP Receiver.

```yaml
receivers:
Expand Down Expand Up @@ -386,7 +386,7 @@ Trace systems on the market. Apache APISIX is also actively cooperating with
communities to create a more powerful ecosystem.

Apache APISIX is also currently working on additional plugins to support
integration with more services, if you're interested, feel free to
integration with more services, if you're interested, feel free to
[start a discussion](https://github.com/apache/apisix/discussions)
on GitHub, or communicate via the [mailing list](https://apisix.apache.org/docs/general/subscribe-guide).

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/instrumentation/java/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ For more:
- Learn about [manual instrumentation][] and try out more [examples](../examples).

[annotations]: ../automatic/annotations
[configure the Java agent]: https://opentelemetry.io/docs/instrumentation/java/automatic/#configuring-the-agent
[configure the Java agent]: ../automatic/#configuring-the-agent
[console trace exporter,]: https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#logging-exporter
[exporter]: https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#exporters
[Get the example code.]: https://grpc.io/docs/languages/java/quickstart/#get-the-example-code
Expand Down
4 changes: 4 additions & 0 deletions layouts/_default/_markup/render-link.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{{ $isExternal := hasPrefix .Destination "http" -}}
{{ if and $isExternal (findRE "^https://opentelemetry.io/\\w" .Destination) -}}
{{ errorf "%s: use a local path, not an external URL, for the following reference to a local page: %s"
.Page.File.Path .Destination -}}
{{ end -}}
{{/* Until Hugo supports hook params (https://github.com/gohugoio/hugo/issues/6670), we'll inspect .Text. */ -}}
{{ $noExternalIcon := in .Text "hk-no-external-icon" -}}
<a href="{{ .Destination | safeURL }}"
Expand Down
3 changes: 3 additions & 0 deletions scripts/adjust-spec-pages.pl
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,8 @@ ()
# Rewrite link defs
s|^(\[[^\]]+\]:\s*)([^:\s]*)(\s*(\(.*\))?)$|$1\{{% relref "$2" %}}$3|g;

# Make website-local page references local:
s|https://opentelemetry.io/|/|g;

print;
}