Convert large pngs to webp, and create sitemap.xml

This commit is contained in:
Seth Call 2025-03-23 21:36:36 -05:00
parent 93dc5ccd35
commit 8d49ea0368
24 changed files with 81 additions and 29 deletions

View File

@ -15,9 +15,11 @@ ActiveAdmin.register JamRuby::AffiliatePartner, :as => 'Affiliates' do
#filter :partner_user
filter :partner_name
filter :id
filter :current_quarter_in_cents
filter :cumulative_earnings_in_cents
filter :jamtracks_sold
filter :subscriptions_count
filter :current_quarter_in_cents
filter :referral_user_count
scope("Sorted By Current Quarter", default: true) { |scope| scope.where('partner_user_id IS NOT NULL').order('current_quarter_in_cents desc') }
scope("Sorted By Jamtracks Sold", default: false) { |scope| scope.where('partner_user_id IS NOT NULL').order('jamtracks_sold desc') }

View File

@ -10,6 +10,49 @@ const ArtistTemplatePageModule = require("./build/components/jamtracks/JKJamTrac
var csvFilePath = `jamtracks-for-env/jam_tracks_for_jam_ui.${process.env.USER}.csv`
var artistCsvFilePath = `jamtracks-for-env/jam_tracks_for_jam_ui_artists.${process.env.USER}.csv`
var sitemapPath = path.join(__dirname, ".", "build", "sitemap.xml");
const clear_sitemap = () => {
fs.writeFileSync(sitemapPath, "");
// Add the root element
fs.writeFileSync(sitemapPath, `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n`, { flag: 'a' });
// Add the root url
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}</loc></url>\n`, { flag: 'a' });
// Add standard URLs specific to this site, such as:
// All prefix with /public
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/</loc></url>\n`, { flag: 'a' });
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/privacy</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/help</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/knowledge-base</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/help-desk</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/forum</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/unsubscribe</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/downloads</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/public/downloads-legacy</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/auth/login</loc></url>\n`, { flag: 'a' });
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/auth/register</loc></url>\n`, { flag: 'a' } );
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/auth/forget-password</loc></url>\n`, { flag: 'a' } );
// Add the closing root element
}
const add_song_to_sitemap = (artistSlug, songSlug) => {
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/backing-tracks/${artistSlug}/${songSlug}</loc></url>\n`, { flag: 'a' });
}
const add_artist_to_sitemap = (artistSlug) => {
fs.writeFileSync(sitemapPath, `<url><loc>${process.env.REACT_APP_BASE_URL}/backing-tracks/${artistSlug}</loc></url>\n`, { flag: 'a' });
}
const close_sitemap = () => {
fs.writeFileSync(sitemapPath, "</urlset>", { flag: 'a' } );
}
/**
* Loads a CSV file into an array of objects.
* @param {string} csvPath - The path to the CSV file.
@ -59,6 +102,8 @@ const init = () => {
process.env.PUBLIC_URL = process.env.REACT_APP_BASE_URL;
}
clear_sitemap();
//const __dirname = path.resolve(path.dirname(''));
@ -94,6 +139,8 @@ const generateSongPages = async (render) => {
const fullPath = process.env.REACT_APP_BASE_URL + location;
const logoPath = process.env.REACT_APP_BASE_URL + "/favicon.svg";
add_song_to_sitemap(original_artist_slug, name_slug);
console.log(`Generating ${artist} - ${song}`);
const html = render
@ -209,6 +256,7 @@ const generateArtistPages = async (render) => {
const fullPath = process.env.REACT_APP_BASE_URL + location;
const logoPath = process.env.REACT_APP_BASE_URL + "/favicon.svg";
add_artist_to_sitemap(original_artist_slug);
console.log(`Generating ${artist}`);
const songs = matchingSongs.map((song) => {
@ -272,6 +320,8 @@ const generateArtistPages = async (render) => {
console.log(`Generated: ${outputFilePath}`);
}
close_sitemap();
console.log("All pages generated!");
});
};

View File

@ -4,7 +4,7 @@ const Dotenv = require("dotenv-webpack");
const environment = process.env.ENVIRONMENT || 'development';
const node_env = process.env.NODE_ENV || 'development';
const debug = node_env == 'development';
module.exports = {
entry: "./client-hydrate.js",
output: {
@ -42,7 +42,7 @@ module.exports = {
react: path.resolve('./node_modules/react'),
}
},
devtool: 'eval-source-map',
devtool: debug ? 'eval-source-map' : 'source-map',
mode: node_env,
plugins: [
new Dotenv({

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@ -7,15 +7,15 @@ import {JamTrackPreviewProvider} from '../../context/JamTrackPreviewContext'
import {useHistory} from "react-router-dom";
import useJamTrackShopping from "../../hooks/useJamTrackShopping";
import UserAuth, {useAuth} from '../../context/UserAuth';
const awesome1 = '/img/landing/jamtracks/Top 10 Image - Number 1.png';
const awesome2 = '/img/landing/jamtracks/Top 10 Image - Number 2.png';
const awesome3 = '/img/landing/jamtracks/Top 10 Image - Number 3.png';
const awesome4 = '/img/landing/jamtracks/Top 10 Image - Number 4.png';
const awesome5 = '/img/landing/jamtracks/Top 10 Image - Number 5.png';
const awesome6 = '/img/landing/jamtracks/Top 10 Image - Number 6.png';
const awesome7 = '/img/landing/jamtracks/Top 10 Image - Number 7.png';
const awesome8 = '/img/landing/jamtracks/Top 10 Image - Number 8.png';
const awesome9 = '/img/landing/jamtracks/Top 10 Image - Number 9.png';
const awesome1 = '/img/landing/jamtracks/Top 10 Image - Number 1.webp';
const awesome2 = '/img/landing/jamtracks/Top 10 Image - Number 2.webp';
const awesome3 = '/img/landing/jamtracks/Top 10 Image - Number 3.webp';
const awesome4 = '/img/landing/jamtracks/Top 10 Image - Number 4.webp';
const awesome5 = '/img/landing/jamtracks/Top 10 Image - Number 5.webp';
const awesome6 = '/img/landing/jamtracks/Top 10 Image - Number 6.webp';
const awesome7 = '/img/landing/jamtracks/Top 10 Image - Number 7.webp';
const awesome8 = '/img/landing/jamtracks/Top 10 Image - Number 8.webp';
const awesome9 = '/img/landing/jamtracks/Top 10 Image - Number 9.webp';
// To test this component in isolation, go to:
// http://beta.jamkazam.local:4000/public/backing-tracks/artist/song
// But this is only for development

View File

@ -7,15 +7,15 @@ import {JamTrackPreviewProvider} from '../../context/JamTrackPreviewContext'
import {useHistory} from "react-router-dom";
import useJamTrackShopping from "../../hooks/useJamTrackShopping";
import UserAuth, {useAuth} from '../../context/UserAuth';
const awesome1 = '/img/landing/jamtracks/Top 10 Image - Number 1.png';
const awesome2 = '/img/landing/jamtracks/Top 10 Image - Number 2.png';
const awesome3 = '/img/landing/jamtracks/Top 10 Image - Number 3.png';
const awesome4 = '/img/landing/jamtracks/Top 10 Image - Number 4.png';
const awesome5 = '/img/landing/jamtracks/Top 10 Image - Number 5.png';
const awesome6 = '/img/landing/jamtracks/Top 10 Image - Number 6.png';
const awesome7 = '/img/landing/jamtracks/Top 10 Image - Number 7.png';
const awesome8 = '/img/landing/jamtracks/Top 10 Image - Number 8.png';
const awesome9 = '/img/landing/jamtracks/Top 10 Image - Number 9.png';
const awesome1 = '/img/landing/jamtracks/Top 10 Image - Number 1.webp';
const awesome2 = '/img/landing/jamtracks/Top 10 Image - Number 2.webp';
const awesome3 = '/img/landing/jamtracks/Top 10 Image - Number 3.webp';
const awesome4 = '/img/landing/jamtracks/Top 10 Image - Number 4.webp';
const awesome5 = '/img/landing/jamtracks/Top 10 Image - Number 5.webp';
const awesome6 = '/img/landing/jamtracks/Top 10 Image - Number 6.webp';
const awesome7 = '/img/landing/jamtracks/Top 10 Image - Number 7.webp';
const awesome8 = '/img/landing/jamtracks/Top 10 Image - Number 8.webp';
const awesome9 = '/img/landing/jamtracks/Top 10 Image - Number 9.webp';
// To test this component in isolation, go to:
// http://beta.jamkazam.local:4000/public/backing-tracks/artist/song
// But this is only for development

View File

@ -16,7 +16,7 @@ context = window
<div className="row awesome-thing">
<div className="awesome-item">
<h3> <div className="awesome-number">1</div>Huge, High Quality Multi-Track Catalog</h3>
<p><img src="/assets/landing/Top 10 Image - Number 1.png" className="awesome-image" width="405" height="212"/>
<p><img src="/assets/landing/Top 10 Image - Number 1.webp" className="awesome-image" width="405" height="212"/>
JamKazam offers a catalog of 3,700+ songs. Each song is reviewed for quality, and every recording
is a complete multi-track, with fully isolated tracks for each part of the music - e.g. lead vocal,
backing vocals, lead guitar, rhythm guitar, keys, bass, drums, etc. This gives you complete creative control
@ -28,7 +28,7 @@ context = window
<div className="row awesome-thing">
<div className="awesome-item">
<h3> <div className="awesome-number">2</div>Solo, Mute, Pan or Set Level on Any Part</h3>
<p><img src="/assets/landing/Top 10 Image - Number 2.png" className="awesome-image left" width="150" height="191" />
<p><img src="/assets/landing/Top 10 Image - Number 2.webp" className="awesome-image left" width="150" height="191" />
When learning to play a part, it's incredibly valuable to be able to hear just one part in isolation.
Once you've learned your part, you can turn around and mute just that one part, and then play along with the rest of the band.
Or if you prefer, you can turn that part down low but keep it around as a subtle hint. Or pan the recorded track into
@ -40,7 +40,7 @@ context = window
<div className="row awesome-thing">
<div className="awesome-item">
<h3> <div className="awesome-number">3</div>Make Custom Mixes</h3>
<p><img src="/assets/landing/Top 10 Image - Number 3.png" className="awesome-image" width="224" height="276" />
<p><img src="/assets/landing/Top 10 Image - Number 3.webp" className="awesome-image" width="224" height="276" />
When you've customized the JamTrack mix, you can easily save your custom mixes to use them again later without
having to recreate them. Your custom mixes are saved to the JamKazam cloud, so you can access them from almost
any Internet-connected device. If you want to use your mixes outside the JamKazam app, you can also export custom mixes
@ -52,7 +52,7 @@ context = window
<div className="row awesome-thing">
<div className="awesome-item">
<h3> <div className="awesome-number">4</div>Slow Down For Practice</h3>
<p><img src="/assets/landing/Top 10 Image - Number 4.png" className="awesome-image left" width="220" height="203" />
<p><img src="/assets/landing/Top 10 Image - Number 4.webp" className="awesome-image left" width="220" height="203" />
You can easily slow down playback of your JamTrack by a specific % without changing pitch, so that the song still
sounds "right", just slower. This is great for building your technique on tougher sections while gradually increasing tempo.
You can also make JamTracks play faster if you want to hit the jets.
@ -63,7 +63,7 @@ context = window
<div className="row awesome-thing">
<div className="awesome-item">
<h3> <div className="awesome-number">5</div>Change Pitch/Key</h3>
<p><img src="/assets/landing/Top 10 Image - Number 5.png" className="awesome-image" width="228" height="200" />
<p><img src="/assets/landing/Top 10 Image - Number 5.webp" className="awesome-image" width="228" height="200" />
If you're a singer and you need to bring the song down into your vocal range, or if you're an instrumentalist
and want to change the piece to a different key, the JamKazam app lets you change the pitch of any JamTrack up or down
by a specified number of semitones (half steps).
@ -74,7 +74,7 @@ context = window
<div className="row awesome-thing">
<div className="awesome-item">
<h3> <div className="awesome-number">6</div>Apply VST &amp; AU Audio Plug-In Effects</h3>
<p><img src="/assets/landing/Top 10 Image - Number 6.png" className="awesome-image left" width="350" height="240" />
<p><img src="/assets/landing/Top 10 Image - Number 6.webp" className="awesome-image left" width="350" height="240" />
The free JamKazam app lets you easily apply VST &amp; AU plugin effects to your live performance, mixed together
seamlessly with JamTrack playback. For example, guitarists can apply popular amp sims like AmpliTube to get
just the right guitar tone to match the song, and vocalists can apply effects like reverb, pitch correction, etc.
@ -85,7 +85,7 @@ context = window
<div className="row awesome-thing">
<div className="awesome-item">
<h3> <div className="awesome-number">7</div>Use MIDI Instruments</h3>
<p><img src="/assets/landing/Top 10 Image - Number 7.png" className="awesome-image" width="320" height="257" />
<p><img src="/assets/landing/Top 10 Image - Number 7.webp" className="awesome-image" width="320" height="257" />
The free JamKazam app also lets you use MIDI instruments, and mix and record this instrumental audio with JamTracks.
For example, keys players can use MIDI keyboard controllers with VST &amp; AU plugins to generate traditional piano sounds,
Rhodes electric piano, Hammond organ, and other classic keys tones. And drummers who use electronic kits can use their favorite
@ -135,7 +135,7 @@ context = window
<div className="row awesome-thing">
<div className="awesome-item">
<h3> <div className="awesome-number">10</div>JamTracks Work With All Your Stuff</h3>
<p><img src="/assets/landing/Top 10 Image - Number 10.png" className="awesome-image" width="160" height="326" />
<p><img src="/assets/landing/Top 10 Image - Number 10.wep" className="awesome-image" width="160" height="326" />
You can use your JamTracks with any device that can run a standard web browser for playback of the JamTracks.
If you want to mix your live performance with the JamTrack for recordings, and to access other advanced
features, you'll need to use a JamKazam app. Our app is currently available for Mac and Windows computers,