Skip to content

Commit

Permalink
[#233][HTML] Add the charset-bearing <meta> tag through Tidy.
Browse files Browse the repository at this point in the history
  • Loading branch information
pishoyg committed Oct 3, 2024
1 parent 7a376c1 commit ba0ba5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions site/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ readonly ICON_TAG=' <link rel="icon" type="image/x-icon" href="/img/icon/icon-c
'
readonly STYLE_TAG=' <link href="/style.css" rel="stylesheet" type="text/css">
'
readonly CHARSET_TAG=' <meta charset="utf-8">
'

CLEAN=false
BUILD=false
Expand Down Expand Up @@ -137,7 +135,7 @@ build() {
echo -e "${PURPLE}Can't find <head> in ${RED}${FILE}"
exit 1
fi
NEW="$(head -n "${LINE_NUM}" "${FILE}")${GOOGLE_TAG}${ICON_TAG}${STYLE_TAG}${CHARSET_TAG}$(tail -n "+$((LINE_NUM + 1))" "${FILE}")"
NEW="$(head -n "${LINE_NUM}" "${FILE}")${GOOGLE_TAG}${ICON_TAG}${STYLE_TAG}$(tail -n "+$((LINE_NUM + 1))" "${FILE}")"
echo "${NEW}" > "${FILE}"
tidy -config "tidy_config.txt" "${FILE}"
}
Expand Down
1 change: 1 addition & 0 deletions tidy_config.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
add-meta-charset: yes
break-before-br: yes
enclose-block-text: yes
enclose-text: yes
Expand Down

0 comments on commit ba0ba5c

Please sign in to comment.