1
Fork 0
mirror of https://github.com/RGBCube/GCCPreprocessHTML synced 2025-05-31 12:28:12 +00:00

Feat: Ignore files that start with _

This commit is contained in:
RGBCube 2023-05-07 01:07:38 +03:00
parent c8a39bd0d9
commit 3676ab38b8
5 changed files with 8 additions and 19 deletions

View file

@ -9,6 +9,11 @@ mkdir ./build
for html_file in $(find -name "*.html"); do
path=./build/${html_file#./}
mkdir $(dirname $path) 2> /dev/null
sed "/^#/d" <(process $html_file) > $path
# Preprocess if filename doesn't start with _.
if [[ $(basename $html_file) != _* ]]; then
echo "Building $html_file..."
mkdir $(dirname $path) 2> /dev/null
sed "/^#/d" <(process $html_file) > $path
fi
done

View file

@ -1,11 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>My Site</title>
<meta content="Embed Title" property="og:title"/>
<meta content="Site Description" property="og:description"/>
<meta content="https://embed.com/this-is-the-site-url" property="og:url"/>
<meta content="https://embed.com/embedimage.png" property="og:image"/>
<meta content="#43B581" data-react-helmet="true" name="theme-color"/>
</head>
</html>

View file

@ -1,5 +0,0 @@
<meta content="Embed Title" property="og:title"/>
<meta content="Site Description" property="og:description"/>
<meta content="https://embed.com/this-is-the-site-url" property="og:url"/>
<meta content="https://embed.com/embedimage.png" property="og:image"/>
<meta content="#43B581" data-react-helmet="true" name="theme-color"/>

View file

@ -2,6 +2,6 @@
<html lang="en">
<head>
<title>My Site</title>
#include "src/discord-embed-metadata.html"
#include "src/_discord-embed-metadata.html"
</head>
</html>