mirror of
https://github.com/layer-systems/website.git
synced 2026-09-12 05:33:12 +02:00
* new web os frontend * add docs * Add CNAME and restore NIP-05 nostr.json for GitHub Pages The Pages custom domain (layer.systems) is only stored in repo settings; a CNAME file in the build output makes it survive Pages reconfiguration. Restore public/.well-known/nostr.json, which this branch had dropped — removing it would break the existing NIP-05 identifiers on layer.systems. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YtQoCzkP7Bo8nruhxojPi * Ignore eslint and tsc build caches Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YtQoCzkP7Bo8nruhxojPi * Rebrand page title and metadata to LAYER.systems The site ships on layer.systems, so the document title, meta and OG description, and the web manifest now carry that name instead of "Nostr OS". OsShell sets the title at runtime, so it is updated too — otherwise the tab would fall back to the old branding after hydration. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YtQoCzkP7Bo8nruhxojPi * Rename remaining visible "Nostr OS" strings to LAYER.systems Covers the About window heading, the mobile shell header and the app icon's aria-label, so the visible branding matches the page title. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YtQoCzkP7Bo8nruhxojPi --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
84 lines
2.4 KiB
JavaScript
84 lines
2.4 KiB
JavaScript
import fs from 'fs';
|
|
import path from 'path';
|
|
|
|
export default {
|
|
meta: {
|
|
type: 'problem',
|
|
docs: {
|
|
description: 'Require web manifest file and proper HTML link tag',
|
|
category: 'Best Practices',
|
|
},
|
|
fixable: null,
|
|
schema: [],
|
|
messages: {
|
|
missingManifestFile: 'Web manifest file not found. Expected {{expectedPath}}',
|
|
missingManifestLink: 'Missing web manifest link tag in HTML head',
|
|
invalidManifestLink: 'Web manifest link tag has incorrect rel or href attribute',
|
|
},
|
|
},
|
|
|
|
create(context) {
|
|
const { filename } = context;
|
|
|
|
// Only run this rule on HTML files
|
|
if (!filename.endsWith('.html')) {
|
|
return {};
|
|
}
|
|
|
|
return {
|
|
Program(node) {
|
|
const { sourceCode } = context;
|
|
const htmlContent = sourceCode.getText();
|
|
|
|
// Check for manifest link tag in HTML
|
|
const manifestLinkRegex = /<link[^>]*rel=["']manifest["'][^>]*>/i;
|
|
const manifestMatch = htmlContent.match(manifestLinkRegex);
|
|
|
|
if (!manifestMatch) {
|
|
context.report({
|
|
node,
|
|
messageId: 'missingManifestLink',
|
|
});
|
|
return;
|
|
}
|
|
|
|
// Extract href from the manifest link
|
|
const hrefMatch = manifestMatch[0].match(/href=["']([^"']+)["']/i);
|
|
if (!hrefMatch) {
|
|
context.report({
|
|
node,
|
|
messageId: 'invalidManifestLink',
|
|
});
|
|
return;
|
|
}
|
|
|
|
const manifestPath = hrefMatch[1];
|
|
|
|
// Resolve the manifest file path relative to the project root
|
|
const htmlDir = path.dirname(filename);
|
|
let resolvedManifestPath;
|
|
|
|
if (manifestPath.startsWith('/')) {
|
|
// Absolute path - check in public directory first, then project root
|
|
const publicPath = path.resolve(htmlDir, 'public' + manifestPath);
|
|
const rootPath = path.resolve(htmlDir, '.' + manifestPath);
|
|
resolvedManifestPath = fs.existsSync(publicPath) ? publicPath : rootPath;
|
|
} else {
|
|
// Relative path
|
|
resolvedManifestPath = path.resolve(htmlDir, manifestPath);
|
|
}
|
|
|
|
// Check if the manifest file exists
|
|
if (!fs.existsSync(resolvedManifestPath)) {
|
|
context.report({
|
|
node,
|
|
messageId: 'missingManifestFile',
|
|
data: {
|
|
expectedPath: manifestPath,
|
|
},
|
|
});
|
|
}
|
|
},
|
|
};
|
|
},
|
|
}; |