Replies: 2 comments 1 reply
-
|
SEO is always a tricky thing to handle in the world of dynamic JavaScript stuff. In terms of alphaTab the main music sheet is anyhow rather a graphical object and not really "search indexable". Beside the general song/file information there is not much "text" a robot could add to the search index. Until some extend engines like Google will execute dynamic JavaScript and re-scan the updated DOM, but it has a lower search ranking. Having server-side generated HTML has generally a higher rank on indexing. I guess the main question is what parts should be indexed and how do search engines support it. This also depends on how the "content" is presented (is it mainly an alphaTab player, some sort of lecture where alphaTab provides some interactive UI etc.) From a gut feeling the most important parts are:
Looking more concrete to alphaTab it can help there in these ways:
In all cases, you would likely to some sort of server-side caching in a database and on file system to avoid recomputing things on every page load. |
Beta Was this translation helpful? Give feedback.
-
|
have now built a workflow based on Pupetteer that is simple but works really well. I display all alphaTab scores on an internal page of my website. In my case, this is easy to do because all scores are managed centrally. Then I use a Puppeteer script to take screenshots of the individual elements in WebP format. The name of the image was defined in the backend and is specified in the "data-uid" HTML attribute. import puppeteer from "puppeteer";
async function takeScreenshot(url) {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({
width: 1800,
height: 3600,
deviceScaleFactor: 2, // retina
});
await page.goto(url, { waitUntil: "networkidle2" });
await page.screenshot({
path: "screenshots/page.webp",
type: "webp",
});
const elements = await page.$$(".at-elements");
for(const element of elements ) {
const uid = await page.evaluate(el => el.getAttribute("data-uid"), element);
await element.scrollIntoView();
await element.screenshot({
path: "screenshots/" + uid + ".webp",
type: "webp",
});
}
await browser.close();
}
takeScreenshot("https://my-page-with-all-alpha-tab-scores");I then manually upload the screenshots to my web space. This step can, of course, be automated. For this to work, the backend must of course check whether a WebP image is available for the score. If so, it will be displayed. If not, the alphaTab element will be displayed as normal. Perhaps this will help someone else in a similar scenario. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I know this isn't an alphaTab topic per se, but I'll ask anyway ;-)
Has anyone here ever thought about optimising the sheet music generated by JavaScript for SEO?
And do you have any ideas or suggestions that would also work in a non-JS server environment, such as PHP?
For example, with the idea that generated sheet music could appear as SVG or another graphic format in Google & Co search results?
Beta Was this translation helpful? Give feedback.
All reactions