Skip to content

Commit

Permalink
Updates.
Browse files Browse the repository at this point in the history
- Remove white background from source link
- Remove asset url from the fonts since they are relative
- Added `html` extension to the pages
  • Loading branch information
gdotdesign committed Sep 27, 2023
1 parent 28d5dc7 commit bb24cf3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/assets/docs-html/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,6 @@ article {
}

a.github-source-link.github-source-link {
background: white;
color: #999;
font-size: 18px;
font-weight: normal;
Expand Down
18 changes: 9 additions & 9 deletions src/assets/docs-html/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
font-style: normal;
font-weight: 400;
font-display: swap;
src: url({base_url}assets/wEO_EBrAnc9BLjLQAUk1WPoK_kgXiYvO.woff2) format('woff2');
src: url(wEO_EBrAnc9BLjLQAUk1WPoK_kgXiYvO.woff2) format('woff2');
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
Expand All @@ -13,7 +13,7 @@
font-style: normal;
font-weight: 400;
font-display: swap;
src: url({base_url}assets/wEO_EBrAnc9BLjLQAUk1VvoK_kgXiQ.woff2) format('woff2');
src: url(wEO_EBrAnc9BLjLQAUk1VvoK_kgXiQ.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
Expand All @@ -22,7 +22,7 @@
font-style: normal;
font-weight: 300;
font-display: swap;
src: url({base_url}assets/o-0NIpQlx3QUlC5A4PNjThZVatyBx2pqPIif.woff2) format('woff2');
src: url(o-0NIpQlx3QUlC5A4PNjThZVatyBx2pqPIif.woff2) format('woff2');
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
Expand All @@ -31,7 +31,7 @@
font-style: normal;
font-weight: 300;
font-display: swap;
src: url({base_url}assets/o-0NIpQlx3QUlC5A4PNjThZVZNyBx2pqPA.woff2) format('woff2');
src: url(o-0NIpQlx3QUlC5A4PNjThZVZNyBx2pqPA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
Expand All @@ -40,7 +40,7 @@
font-style: normal;
font-weight: 400;
font-display: swap;
src: url({base_url}assets/o-0IIpQlx3QUlC5A4PNr6zRASf6M7VBj.woff2) format('woff2');
src: url(o-0IIpQlx3QUlC5A4PNr6zRASf6M7VBj.woff2) format('woff2');
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
Expand All @@ -49,7 +49,7 @@
font-style: normal;
font-weight: 400;
font-display: swap;
src: url({base_url}assets/o-0IIpQlx3QUlC5A4PNr5TRASf6M7Q.woff2) format('woff2');
src: url(o-0IIpQlx3QUlC5A4PNr5TRASf6M7Q.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
Expand All @@ -58,7 +58,7 @@
font-style: normal;
font-weight: 600;
font-display: swap;
src: url({base_url}assets/o-0NIpQlx3QUlC5A4PNjOhBVatyBx2pqPIif.woff2) format('woff2');
src: url(o-0NIpQlx3QUlC5A4PNjOhBVatyBx2pqPIif.woff2) format('woff2');
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
Expand All @@ -67,6 +67,6 @@
font-style: normal;
font-weight: 600;
font-display: swap;
src: url({base_url}assets/o-0NIpQlx3QUlC5A4PNjOhBVZNyBx2pqPA.woff2) format('woff2');
src: url(o-0NIpQlx3QUlC5A4PNjOhBVZNyBx2pqPA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
}
5 changes: 1 addition & 4 deletions src/documentation_generator.cr
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ module Mint
.select(&.path.includes?("/docs-html/"))
.each { |file|
content = file.gets_to_end
if file.path.includes?("fonts.css")
content = content.gsub(/\{base_url\}/, @base)
end
basename = Path[file.path].basename
path = Path[@output_dir, "assets", basename].to_s
File.write(path, content)
Expand Down Expand Up @@ -270,7 +267,7 @@ module Mint
end

def page_url(category : String, page : String)
"#{base_url}#{category}/#{page}"
"#{base_url}#{category}/#{page}.html"
end

def anchor_url(node)
Expand Down
4 changes: 2 additions & 2 deletions src/documentation_generator/html/nav_item.ecr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<a
class="<% if is_page_active(category, node) %>active<% end %>"
href="<%= page_url(category, stringify(node)) %>.html"
href="<%= page_url(category, stringify(node)) %>"
data-search="<%= search(node) %>"
data-search-empty="true"
>
Expand All @@ -27,4 +27,4 @@
<%= child.@name %>
</span>
</a>
<% end %>
<% end %>

0 comments on commit bb24cf3

Please sign in to comment.