Skip to content

Commit 62857db

Browse files
committed
Simplify the params needed by asset_rev
1 parent a9bfd86 commit 62857db

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

lib/ex_doc/formatter/html/templates.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ defmodule ExDoc.Formatter.HTML.Templates do
161161
defp sidebar_type(:behaviour), do: "modules"
162162

163163
defp asset_rev(output, pattern) do
164+
output =
165+
output
166+
|> Path.expand()
167+
164168
output
165169
|> Path.join(pattern)
166170
|> Path.wildcard()

lib/ex_doc/formatter/html/templates/footer_template.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
</div>
1414
</section>
1515
</div>
16-
<script src="<%= asset_rev Path.expand(config.output), "dist/app-*.js" %>"></script>
16+
<script src="<%= asset_rev config.output, "dist/app-*.js" %>"></script>
1717
</body>
1818
</html>

lib/ex_doc/formatter/html/templates/head_template.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<title><%= page.title %> – <%= config.project %> v<%= config.version %></title>
88
<meta name="viewport" content="width=device-width, initial-scale=1.0">
99
<meta name="generator" content="ExDoc v<%= ExDoc.version %>">
10-
<link rel="stylesheet" href="<%= asset_rev Path.expand(config.output), "dist/app-*.css" %>" />
10+
<link rel="stylesheet" href="<%= asset_rev config.output, "dist/app-*.css" %>" />
1111
<script src="dist/sidebar_items.js"></script>
1212
</head>
1313
<body data-type="<%= sidebar_type(page.type) %>">

0 commit comments

Comments
 (0)