Add SEO page for every size up to 100mb
This commit is contained in:
parent
b8b0266a49
commit
d3764da83d
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,6 @@
|
|||||||
public/assets/scripts/ffmpeg/
|
public/assets/scripts/ffmpeg/
|
||||||
public/assets/scripts/core/
|
public/assets/scripts/core/
|
||||||
public/platforms
|
public/platforms/
|
||||||
|
public/size/
|
||||||
|
public/sitemap.txt
|
||||||
|
|
||||||
|
|||||||
15
build.sh
15
build.sh
@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "https://compact.video/" > public/sitemap.txt
|
||||||
|
|
||||||
# Generate platform pages
|
# Generate platform pages
|
||||||
|
|
||||||
declare -a platforms=(Discord Gmail "Yahoo Mail" Messenger Signal WhatsApp)
|
declare -a platforms=(Discord Gmail "Yahoo Mail" Messenger Signal WhatsApp)
|
||||||
@ -11,6 +13,19 @@ do
|
|||||||
mkdir -p "public/platforms/${slugs[$i]}"
|
mkdir -p "public/platforms/${slugs[$i]}"
|
||||||
cp platform-template.html "public/platforms/${slugs[$i]}/index.html"
|
cp platform-template.html "public/platforms/${slugs[$i]}/index.html"
|
||||||
sed -i -e "s/{{platform}}/${platforms[$i]}/g" -e "s/{{size}}/${sizes[$i]}/g" -e "s/{{slug}}/${slugs[$i]}/g" "public/platforms/${slugs[$i]}/index.html"
|
sed -i -e "s/{{platform}}/${platforms[$i]}/g" -e "s/{{size}}/${sizes[$i]}/g" -e "s/{{slug}}/${slugs[$i]}/g" "public/platforms/${slugs[$i]}/index.html"
|
||||||
|
|
||||||
|
echo "https://compact.video/platforms/${slugs[$i]}/" >> public/sitemap.txt
|
||||||
|
done
|
||||||
|
|
||||||
|
# Generate size pages
|
||||||
|
|
||||||
|
for size in {1..100}
|
||||||
|
do
|
||||||
|
mkdir -p "public/size/${size}mb"
|
||||||
|
cp size-template.html "public/size/${size}mb/index.html"
|
||||||
|
sed -i -e "s/{{size}}/${size}/g" "public/size/${size}mb/index.html"
|
||||||
|
|
||||||
|
echo "https://compact.video/size/${size}mb/" >> public/sitemap.txt
|
||||||
done
|
done
|
||||||
|
|
||||||
# Download ffmpeg libraries
|
# Download ffmpeg libraries
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
https://compact.video/
|
|
||||||
https://compact.video/platforms/discord/
|
|
||||||
https://compact.video/platforms/gmail/
|
|
||||||
https://compact.video/platforms/yahoo-mail/
|
|
||||||
https://compact.video/platforms/messenger/
|
|
||||||
https://compact.video/platforms/signal/
|
|
||||||
https://compact.video/platforms/whatsapp/
|
|
||||||
|
|
||||||
84
size-template.html
Normal file
84
size-template.html
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="Easily compress video files to {{size}}MB online for free to bypass file size limits">
|
||||||
|
<title>Compress videos to {{size}}MB online for free</title>
|
||||||
|
<script defer src="/assets/scripts/ffmpeg/package/dist/umd/ffmpeg.js"></script>
|
||||||
|
<script defer type="module" src="/assets/scripts/main.js"></script>
|
||||||
|
<script>
|
||||||
|
var FILE_SIZE = {{size}};
|
||||||
|
var FILE_SIZE_UNIT = "mb";
|
||||||
|
</script>
|
||||||
|
<link rel="canonical" href="https://compact.video/size/{{size}}mb/">
|
||||||
|
<link rel="shortcut icon" href="/assets/images/icon.png">
|
||||||
|
<link rel="apple-touch-icon" href="/assets/images/icon.png">
|
||||||
|
<link rel="stylesheet" href="/assets/styles/main.css">
|
||||||
|
<link rel="stylesheet" href="/assets/styles/ui.css">
|
||||||
|
<link rel="stylesheet" href="/assets/styles/file-picker-section.css">
|
||||||
|
<link rel="stylesheet" href="/assets/styles/loading-section.css">
|
||||||
|
<link rel="stylesheet" href="/assets/styles/result-section.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1><span class="gradient-text">compact</span>.video</h1>
|
||||||
|
<h2 style="margin-top: 3rem;">Compress your video to {{size}}MB</h2>
|
||||||
|
|
||||||
|
<section id="file-picker-section">
|
||||||
|
<label id="file-drop-area" tabindex="0">
|
||||||
|
<span>Drag and drop a file here!</span>
|
||||||
|
<input id="file-input" type="file" accept="video/*" tabindex="-1">
|
||||||
|
</label>
|
||||||
|
<div id="file-input-spacing" style="margin-top: -1rem">
|
||||||
|
<button class="simple">.</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<video id="uploaded-video" controls autoplay></video>
|
||||||
|
<button id="remove-file" class="simple">Remove video</button>
|
||||||
|
|
||||||
|
<button id="compress" class="primary">Compress</button>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This free online tool allows you to easily compress video files
|
||||||
|
to specific sizes such as {{size}}MB, allowing you to upload
|
||||||
|
videos to platforms that restrict file size when uploading
|
||||||
|
attachments. This tool will find out the highest possible
|
||||||
|
quality your video file can be in while still being below the
|
||||||
|
file size limit. To select a different file size, you can go to
|
||||||
|
the homepage and type in a custom size.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a href="/"><button class="simple">Back to home</button></a>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="loading-section" style="opacity: 0; display: none;">
|
||||||
|
<h3 id="loading-title">Please wait...</h3>
|
||||||
|
<p id="loading-description">Your video is being compressed. This may take a while.</p>
|
||||||
|
|
||||||
|
<div id="progress-container">
|
||||||
|
<div id="progress-indicator"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p id="progress-percentage">0%</p>
|
||||||
|
|
||||||
|
<p><label><input id="notify-checkbox" type="checkbox"> Notify on finish</label></p>
|
||||||
|
|
||||||
|
<button id="cancel" class="simple">Cancel</button>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="result-section" style="opacity: 0; display: none;">
|
||||||
|
<h4 id="result-title">Your video has been compressed!</h4>
|
||||||
|
<p>Result size: <span id="result-size"></span></p>
|
||||||
|
|
||||||
|
<video id="compressed-video" controls autoplay></video><br>
|
||||||
|
|
||||||
|
<button id="download" class="primary">Download</button><br>
|
||||||
|
<button id="share" class="secondary">Share video</button><br>
|
||||||
|
|
||||||
|
<button id="back" class="simple">Go back</button>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user