axodotdev / axodotdev/axohtml

Support for preconnect link relationship for Google Fonts

Open
#43 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
119
Forks
10
PR merge metrics
No merged PRs in 30d

Description

[Google Fonts](https://fonts.google.com/specimen/Roboto) asks you to include two preconnect links when using one of their fonts. The link tags when copied from the Google Fonts site look like this:
```

```

The [rel attribute of links](https://github.com/axodotdev/axohtml/blob/d2c0379311357f0e9cec591eeeae480f17eec39a/typed-html/src/elements.rs#L72) is parsed with a [LinkType enum](https://github.com/axodotdev/axohtml/blob/d2c0379311357f0e9cec591eeeae480f17eec39a/typed-html/src/types/mod.rs#L186C20-L186C20) that is [missing a few valid values](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel). This [LinkType enum is also used for a tags](https://github.com/axodotdev/axohtml/blob/d2c0379311357f0e9cec591eeeae480f17eec39a/typed-html/src/elements.rs#L99) so a straight copy/paste into the enum might not be enough because not all types are supported in both tags!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.