Skip to content

Commit

Permalink
Improve SEO (#47)
Browse files Browse the repository at this point in the history
* add font-display: swap

* Make the title suffix shorter

* Use `h2` instead of `p` for subtitle

* Add alt to the logo
  • Loading branch information
KubaZ2 authored Sep 28, 2024
1 parent 63ca3b5 commit fed4a8b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Documentation/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"markdownEngineName": "markdig",
"globalMetadata": {
"_appDescription": "NetCord – the modern and fully customizable C# Discord library",
"_appTitle": "NetCord Documentation",
"_appTitle": "NetCord",
"_enableSearch": true,
"_disableFooter": true,
"_noindex": true,
Expand Down
2 changes: 1 addition & 1 deletion Documentation/templates-src/NetCord/layout/_master.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="{{_appLogoUrl}}{{^_appLogoUrl}}{{_rel}}index.html{{/_appLogoUrl}}">
<img id="logo" class="svg logo" src="{{_rel}}{{{_appLogoPath}}}{{^_appLogoPath}}logo.svg{{/_appLogoPath}}" alt="{{_appName}}" >
<img id="logo" class="svg logo" src="{{_rel}}{{{_appLogoPath}}}{{^_appLogoPath}}logo.svg{{/_appLogoPath}}" alt="Logo" >
{{_appName}}
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="main">
<h1 class="title">NetCord</h1>
<p class="subtitle">The modern and fully customizable C# Discord library</p>
<h2 class="subtitle">The modern and fully customizable C# Discord library</h2>
<section class="buttons">
<a href="guides/getting-started/installation.html" class="button primary-button">Get Started</a>
<a href="guides/getting-started/installation.html" class="button secondary-button">Guides</a>
Expand Down
3 changes: 3 additions & 0 deletions Documentation/templates-src/NetCord/src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
src:
local(Cascadia Code Regular),
url(cascadia-code.woff2) format(woff2);
font-display: swap;
}

@font-face {
font-family: Franklin Gothic Heavy;
src:
local(Franklin Gothic Heavy),
url(franklin-gothic-heavy.woff2) format(woff2);
font-display: swap;
}

:root {
Expand Down Expand Up @@ -99,6 +101,7 @@ article,
.subtitle {
font-size: 1.7em;
margin-bottom: 70px;
line-height: 1.5;
}

.buttons {
Expand Down

0 comments on commit fed4a8b

Please sign in to comment.