openvibers/openrestream Commits
Pages name a crawlable icon (apple-touch-icon) and the installable app's manifest, both the shared set (only the data: favicon before, no manifest) (#87)
Changes
@@@ -79,6 +79,10 @@ function renderPage({ title, body, user, canonicalPath = '/', robots = 'noindex,try { footerSsr = require('openvibe-shared/footer').ssr({ service: 'openre', variant: 'compact', updates: '/updates' }); } catch { footerSsr = '<footer id="ov-footer"></footer>'; }let icon = '';try { icon = require('openvibe-shared/app-icon').headTags({ site: 'network' }); } catch { icon = ''; }++ // A crawlable icon (search engines cannot use the data: favicon) and the installable app's manifest: the shared set.++ try {++ icon += `\n<link rel="apple-touch-icon" href="${require('openvibe-shared/app-icons').url('openre', 192)}">\n<link rel="manifest" href="${ovServe.manifestUrl('openre')}">`;++ } catch { /* the inline favicon is enough to render */ }return `<!DOCTYPE html><html lang="en"><head>@@@ -79,6 +79,9 @@ t('the front page leads with open restreaming, links to Live for browser go-liveassert.ok(r.text.includes(`href="${api.config.liveUrl}"`), 'browser go-live opens OpenVibe.Live, where it runs today');assert.match(r.text, /Going live from a browser happens on OpenVibe\.Live for now/);assert.match(r.text, /href="\/shared\/showcase\.css\?v=[0-9a-f]{12}"/);++ // A crawlable icon and the installable app's manifest (the shared set): search engines cannot use the data: favicon.++ assert.match(r.text, /<link rel="apple-touch-icon" href="\/shared\/icons\/[a-z0-9-]+-192\.png\?v=[0-9a-f]{12}">/);++ assert.match(r.text, /<link rel="manifest" href="\/shared\/manifest\/openre\.webmanifest\?v=[0-9a-f]{12}">/);// The showcase sits in main.ore's column, which has its gutter already: no second one, so the sign-in line and// "Recently shipped" line up with the sections above.assert.ok(r.text.includes('main.ore .sc-hero,main.ore .sc-sec,main.ore .sc-cta{padding-left:0;padding-right:0}'));
@@ -79,6 +79,10 @@ function renderPage({ title, body, user, canonicalPath = '/', robots = 'noindex,
@@ -79,6 +79,10 @@ function renderPage({ title, body, user, canonicalPath = '/', robots = 'noindex,
try { footerSsr = require('openvibe-shared/footer').ssr({ service: 'openre', variant: 'compact', updates: '/updates' }); } catch { footerSsr = '<footer id="ov-footer"></footer>'; }
try { footerSsr = require('openvibe-shared/footer').ssr({ service: 'openre', variant: 'compact', updates: '/updates' }); } catch { footerSsr = '<footer id="ov-footer"></footer>'; }
let icon = '';
let icon = '';
try { icon = require('openvibe-shared/app-icon').headTags({ site: 'network' }); } catch { icon = ''; }
try { icon = require('openvibe-shared/app-icon').headTags({ site: 'network' }); } catch { icon = ''; }
+ // A crawlable icon (search engines cannot use the data: favicon) and the installable app's manifest: the shared set.
+ try {
+ icon += `\n<link rel="apple-touch-icon" href="${require('openvibe-shared/app-icons').url('openre', 192)}">\n<link rel="manifest" href="${ovServe.manifestUrl('openre')}">`;
+ } catch { /* the inline favicon is enough to render */ }
return `<!DOCTYPE html>
return `<!DOCTYPE html>
<html lang="en">
<html lang="en">
<head>
<head>
@@ -79,6 +79,9 @@ t('the front page leads with open restreaming, links to Live for browser go-live
@@ -79,6 +79,9 @@ t('the front page leads with open restreaming, links to Live for browser go-live
assert.ok(r.text.includes(`href="${api.config.liveUrl}"`), 'browser go-live opens OpenVibe.Live, where it runs today');
assert.ok(r.text.includes(`href="${api.config.liveUrl}"`), 'browser go-live opens OpenVibe.Live, where it runs today');
assert.match(r.text, /Going live from a browser happens on OpenVibe\.Live for now/);
assert.match(r.text, /Going live from a browser happens on OpenVibe\.Live for now/);
assert.match(r.text, /href="\/shared\/showcase\.css\?v=[0-9a-f]{12}"/);
assert.match(r.text, /href="\/shared\/showcase\.css\?v=[0-9a-f]{12}"/);
+ // A crawlable icon and the installable app's manifest (the shared set): search engines cannot use the data: favicon.
+ assert.match(r.text, /<link rel="apple-touch-icon" href="\/shared\/icons\/[a-z0-9-]+-192\.png\?v=[0-9a-f]{12}">/);
+ assert.match(r.text, /<link rel="manifest" href="\/shared\/manifest\/openre\.webmanifest\?v=[0-9a-f]{12}">/);
// The showcase sits in main.ore's column, which has its gutter already: no second one, so the sign-in line and
// The showcase sits in main.ore's column, which has its gutter already: no second one, so the sign-in line and
// "Recently shipped" line up with the sections above.
// "Recently shipped" line up with the sections above.
assert.ok(r.text.includes('main.ore .sc-hero,main.ore .sc-sec,main.ore .sc-cta{padding-left:0;padding-right:0}'));
assert.ok(r.text.includes('main.ore .sc-hero,main.ore .sc-sec,main.ore .sc-cta{padding-left:0;padding-right:0}'));