Skip to content

Commit

Permalink
feat: add lang attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
eva-devs committed Feb 27, 2025
1 parent 46aca50 commit 6637460
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/create-local-help.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def generate_file(srcdir, destdir, lang, file, add_top_links, add_pagefind):
# remove boilerplate
content = re.sub(r"^.*<div id=\"content\">.*<h1>.*?</h1>.*?<ul.*?>",
"<!DOCTYPE html>\n"
+ "<html>"
+ "<html lang=\"" + lang + "\">"
+ "<head>"
+ "<meta charset=\"UTF-8\" />"
+ "<meta name=\"viewport\" content=\"initial-scale=1.0\" />"
Expand Down Expand Up @@ -134,7 +134,7 @@ def generate_file(srcdir, destdir, lang, file, add_top_links, add_pagefind):
flags=re.MULTILINE|re.DOTALL) + top_link
if add_pagefind:
content = re.sub(r"</head>",
"<script src=\"./pagefind/pagefind-ui.js\"></script>"
"<script src=\"../pagefind/pagefind-ui.js\"></script>"
+ "<script src=\"../start-pagefind.js\"></script>"
+ "</head>",
content,
Expand Down

0 comments on commit 6637460

Please sign in to comment.