mirror of
https://github.com/lissy93/networking-toolbox.git
synced 2026-12-06 11:12:56 +03:00
Auto meta tags
This commit is contained in:
1 parent
698951b7d2
commit
7c36d5d3d4
6 files changed
+221
-77
No files matched your search
+155
-45
@@ -21,12 +21,42 @@ export const aboutPages: NavItem[] = [
|
||||
export const STANDALONE_PAGES: NavItem[] = [];
|
||||
|
||||
export const TOP_NAV: NavItem[] = [
|
||||
{ href: '/subnetting', label: 'Subnetting' },
|
||||
{ href: '/cidr', label: 'CIDR' },
|
||||
{ href: '/ip-address-convertor', label: 'IP Tools' },
|
||||
{ href: '/dns', label: 'DNS Tools' },
|
||||
{ href: '/diagnostics', label: 'Lookups' },
|
||||
{ href: '/reference', label: 'Ref' }
|
||||
{
|
||||
href: '/subnetting',
|
||||
label: 'Subnetting',
|
||||
description: 'Subnet calculators and network planning tools for IPv4, IPv6, VLSM, and supernetting',
|
||||
keywords: ['subnet', 'calculator', 'subnetting', 'network', 'planning', 'ipv4', 'ipv6', 'vlsm', 'supernet', 'netmask', 'cidr', 'broadcast', 'hosts', 'addressing', 'allocation']
|
||||
},
|
||||
{
|
||||
href: '/cidr',
|
||||
label: 'CIDR',
|
||||
description: 'CIDR tools and converters for network analysis and optimization',
|
||||
keywords: ['cidr', 'subnet', 'mask', 'converter', 'summarizer', 'splitter', 'set operations', 'aggregation', 'deaggregation', 'prefix', 'notation', 'blocks', 'ranges', 'supernet', 'allocation']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor',
|
||||
label: 'IP Tools',
|
||||
description: 'IP address converters, validators, generators, and format transformation tools',
|
||||
keywords: ['ip', 'address', 'converter', 'validator', 'generator', 'format', 'binary', 'hex', 'decimal', 'ipv4', 'ipv6', 'distance', 'random', 'regex', 'enumerate', 'validation', 'transformation']
|
||||
},
|
||||
{
|
||||
href: '/dns',
|
||||
label: 'DNS Tools',
|
||||
description: 'DNS record generators, validators, zone tools, and DNSSEC utilities',
|
||||
keywords: ['dns', 'records', 'generator', 'validator', 'zone', 'dnssec', 'ptr', 'reverse', 'a record', 'aaaa', 'cname', 'mx', 'txt', 'srv', 'caa', 'spf', 'dmarc', 'dkim', 'soa', 'ns']
|
||||
},
|
||||
{
|
||||
href: '/diagnostics',
|
||||
label: 'Lookups',
|
||||
description: 'Network diagnostics, DNS lookups, HTTP analysis, TLS testing, and connectivity checks',
|
||||
keywords: ['diagnostics', 'lookup', 'dns', 'http', 'tls', 'network', 'connectivity', 'ping', 'port', 'check', 'security', 'headers', 'certificate', 'propagation', 'rdap', 'whois', 'analysis']
|
||||
},
|
||||
{
|
||||
href: '/reference',
|
||||
label: 'Ref',
|
||||
description: 'Networking reference guides, explanations, and quick lookup tables',
|
||||
keywords: ['reference', 'guide', 'explanation', 'networking', 'fundamentals', 'cidr', 'vlsm', 'ipv6', 'dns', 'protocols', 'ports', 'asn', 'icmp', 'arp', 'ndp', 'multicast', 'private', 'public']
|
||||
}
|
||||
];
|
||||
|
||||
// Sections that have sub-pages (drives the conditional SubHeader)
|
||||
@@ -71,6 +101,7 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
'/cidr': [
|
||||
{
|
||||
title: 'CIDR Masks',
|
||||
description: 'Convert between CIDR notation and subnet masks',
|
||||
items: [
|
||||
{
|
||||
href: '/cidr/mask-converter/cidr-to-subnet-mask',
|
||||
@@ -137,38 +168,43 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
icon: 'cidr-allocator',
|
||||
keywords: ['cidr', 'allocator', 'bin-packing', 'first-fit', 'best-fit', 'subnet', 'allocation', 'packing']
|
||||
},
|
||||
{
|
||||
{
|
||||
href: '/cidr/alignment',
|
||||
label: 'CIDR Alignment',
|
||||
description: 'Check if IP addresses and ranges align to CIDR prefix boundaries with optimization suggestions',
|
||||
icon: 'cidr-alignment'
|
||||
icon: 'cidr-alignment',
|
||||
keywords: ['cidr', 'alignment', 'check', 'boundary', 'prefix', 'optimization', 'network', 'boundary', 'validation', 'subnet', 'addressing', 'efficiency']
|
||||
},
|
||||
{
|
||||
{
|
||||
href: '/cidr/wildcard-mask',
|
||||
label: 'Wildcard Mask Converter',
|
||||
description: 'Convert between CIDR, subnet masks, and wildcard masks with ACL rule generation',
|
||||
icon: 'wildcard-mask'
|
||||
icon: 'wildcard-mask',
|
||||
keywords: ['wildcard', 'mask', 'converter', 'acl', 'access', 'control', 'list', 'cisco', 'juniper', 'subnet', 'cidr', 'netmask', 'inverse', 'routing', 'firewall']
|
||||
},
|
||||
{
|
||||
title: 'Set Operations',
|
||||
items: [
|
||||
{
|
||||
{
|
||||
href: '/cidr/set-operations/diff',
|
||||
label: 'Difference (A - B)',
|
||||
description: 'Compute A - B set operations on CIDR blocks, ranges, and IP addresses',
|
||||
icon: 'diff'
|
||||
icon: 'diff',
|
||||
keywords: ['set', 'operations', 'difference', 'subtract', 'exclude', 'minus', 'cidr', 'blocks', 'ranges', 'ip', 'addresses', 'network', 'math', 'complement']
|
||||
},
|
||||
{
|
||||
{
|
||||
href: '/cidr/set-operations/overlap',
|
||||
label: 'Overlap (A ∩ B)',
|
||||
description: 'Detect intersections between two sets of IP addresses and ranges',
|
||||
icon: 'intersection'
|
||||
icon: 'intersection',
|
||||
keywords: ['set', 'operations', 'overlap', 'intersection', 'intersect', 'common', 'shared', 'cidr', 'blocks', 'ranges', 'conflict', 'collision', 'detection']
|
||||
},
|
||||
{
|
||||
{
|
||||
href: '/cidr/set-operations/contains',
|
||||
label: 'Contains (A ⊆ B)',
|
||||
description: 'Check if one set fully contains another with detailed containment analysis',
|
||||
icon: 'containment'
|
||||
icon: 'containment',
|
||||
keywords: ['set', 'operations', 'contains', 'subset', 'superset', 'containment', 'analysis', 'inclusion', 'hierarchy', 'cidr', 'blocks', 'ranges', 'network', 'topology']
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -200,7 +236,8 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
href: '/ip-address-convertor/nth-ip',
|
||||
label: 'Nth IP Calculator',
|
||||
description: 'Resolve the IP address at a specific index within networks and ranges with offset support',
|
||||
icon: 'nth-ip'
|
||||
icon: 'nth-ip',
|
||||
keywords: ['nth', 'ip', 'calculator', 'index', 'offset', 'position', 'network', 'range', 'addressing', 'sequence', 'cidr', 'subnet', 'host', 'enumerate']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/random',
|
||||
@@ -239,25 +276,29 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
href: '/ip-address-convertor/notation/ipv6-expand',
|
||||
label: 'IPv6 Expand',
|
||||
description: 'Expand compressed IPv6 addresses to full 128-bit hexadecimal format',
|
||||
icon: 'ipv6-expand'
|
||||
icon: 'ipv6-expand',
|
||||
keywords: ['ipv6', 'expand', 'expansion', 'full', 'format', '128-bit', 'hexadecimal', 'compressed', 'double-colon', 'address', 'canonical', 'notation']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/notation/ipv6-compress',
|
||||
label: 'IPv6 Compress',
|
||||
description: 'Compress expanded IPv6 addresses using :: notation and removing leading zeros',
|
||||
icon: 'ipv6-compress'
|
||||
icon: 'ipv6-compress',
|
||||
keywords: ['ipv6', 'compress', 'compression', 'shorten', 'double-colon', 'notation', 'leading', 'zeros', 'compact', 'format', 'address', 'optimization']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/notation/normalize',
|
||||
label: 'IPv6 Normalizer',
|
||||
description: 'Normalize IPv6 addresses to RFC 5952 canonical form with step-by-step transformation',
|
||||
icon: 'ip-normalize'
|
||||
icon: 'ip-normalize',
|
||||
keywords: ['ipv6', 'normalize', 'normalizer', 'canonical', 'form', 'rfc', '5952', 'standard', 'format', 'address', 'transformation', 'consistent']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/notation/zone-id',
|
||||
label: 'IPv6 Zone ID Handler',
|
||||
description: 'Process IPv6 addresses with zone identifiers for link-local and multicast addresses',
|
||||
icon: 'zone-id-handler'
|
||||
icon: 'zone-id-handler',
|
||||
keywords: ['ipv6', 'zone', 'id', 'identifier', 'link-local', 'multicast', 'scope', 'interface', 'fe80', 'ff02', 'address', 'scoped']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/ipv6/solicited-node',
|
||||
@@ -289,13 +330,15 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
href: '/ip-address-convertor/families/ipv4-to-ipv6',
|
||||
label: 'IPv4 → IPv6',
|
||||
description: 'Convert IPv4 addresses to IPv6 format using IPv4-mapped IPv6 addressing',
|
||||
icon: 'ipv4-ipv6'
|
||||
icon: 'ipv4-ipv6',
|
||||
keywords: ['ipv4', 'ipv6', 'convert', 'converter', 'mapped', 'family', 'translation', 'dual-stack', 'transition', 'ffff', 'embedding', 'address']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/families/ipv6-to-ipv4',
|
||||
label: 'IPv6 → IPv4',
|
||||
description: 'Extract IPv4 addresses from IPv4-mapped IPv6 addresses',
|
||||
icon: 'ipv6-ipv4'
|
||||
icon: 'ipv6-ipv4',
|
||||
keywords: ['ipv6', 'ipv4', 'extract', 'extractor', 'mapped', 'family', 'reverse', 'dual-stack', 'transition', 'ffff', 'embedded', 'address']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -306,13 +349,15 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
href: '/ip-address-convertor/eui64',
|
||||
label: 'EUI-64 Converter',
|
||||
description: 'Convert between MAC addresses and IPv6 EUI-64 interface identifiers with IPv6 generation',
|
||||
icon: 'eui64-converter'
|
||||
icon: 'eui64-converter',
|
||||
keywords: ['eui-64', 'eui64', 'mac', 'address', 'converter', 'ipv6', 'interface', 'identifier', 'slaac', 'auto-configuration', 'link-layer', 'ethernet']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/ula-generator',
|
||||
label: 'ULA Generator',
|
||||
description: 'Generate RFC 4193 Unique Local Addresses with cryptographically secure Global IDs',
|
||||
icon: 'ula-generator'
|
||||
icon: 'ula-generator',
|
||||
keywords: ['ula', 'unique', 'local', 'address', 'generator', 'rfc', '4193', 'global', 'id', 'cryptographic', 'private', 'fc00', 'fd00', 'ipv6']
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -790,19 +835,22 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
href: '/reference/cidr',
|
||||
label: 'CIDR Notation Explained',
|
||||
description: 'What CIDR is, why it replaced IP classes, and how to read network prefixes',
|
||||
icon: 'ref-cidr'
|
||||
icon: 'ref-cidr',
|
||||
keywords: ['cidr', 'notation', 'explained', 'classless', 'routing', 'prefix', 'subnet', 'mask', 'ip', 'classes', 'network', 'addressing', 'fundamentals', 'slash', 'notation']
|
||||
},
|
||||
{
|
||||
href: '/reference/vlsm',
|
||||
label: 'VLSM in Plain English',
|
||||
description: 'Variable Length Subnet Masking - when to use it and common pitfalls',
|
||||
icon: 'ref-vlsm'
|
||||
icon: 'ref-vlsm',
|
||||
keywords: ['vlsm', 'variable', 'length', 'subnet', 'masking', 'explained', 'subnetting', 'networks', 'efficiency', 'addressing', 'design', 'planning', 'pitfalls', 'best', 'practices']
|
||||
},
|
||||
{
|
||||
href: '/reference/supernetting',
|
||||
label: 'Route Summarization / Supernetting',
|
||||
description: 'Combine multiple networks into single routes for efficient routing',
|
||||
icon: 'ref-supernetting'
|
||||
icon: 'ref-supernetting',
|
||||
keywords: ['supernetting', 'route', 'summarization', 'aggregation', 'routing', 'table', 'optimization', 'bgp', 'ospf', 'networks', 'consolidation', 'efficiency', 'prefix', 'summary']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -813,25 +861,29 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
href: '/reference/ipv6-address-types',
|
||||
label: 'IPv6 Address Types & Key Prefixes',
|
||||
description: 'Global unicast, ULA, link-local, multicast, and special IPv6 addresses',
|
||||
icon: 'ref-ipv6-address-types'
|
||||
icon: 'ref-ipv6-address-types',
|
||||
keywords: ['ipv6', 'address', 'types', 'prefixes', 'global', 'unicast', 'ula', 'link-local', 'multicast', 'loopback', 'special', 'fe80', 'fc00', 'fd00', 'ff00', '2001']
|
||||
},
|
||||
{
|
||||
href: '/reference/ipv6-prefix-lengths',
|
||||
label: 'Common IPv6 Prefix Lengths',
|
||||
description: 'Quick reference for /128, /127, /64, /60, /56, /48, /32 with typical uses',
|
||||
icon: 'ref-ipv6-prefix-lens'
|
||||
icon: 'ref-ipv6-prefix-lens',
|
||||
keywords: ['ipv6', 'prefix', 'lengths', 'reference', '/128', '/127', '/64', '/60', '/56', '/48', '/32', 'subnet', 'network', 'addressing', 'allocation', 'hierarchy']
|
||||
},
|
||||
{
|
||||
href: '/reference/ipv6-embedded-ipv4',
|
||||
label: 'IPv4 in IPv6',
|
||||
description: 'IPv4-mapped addresses, 6to4, Teredo, and transition mechanisms',
|
||||
icon: 'ref-ipv4-in-ipv6'
|
||||
icon: 'ref-ipv4-in-ipv6',
|
||||
keywords: ['ipv6', 'ipv4', 'embedded', 'mapped', '6to4', 'teredo', 'transition', 'mechanisms', 'dual-stack', 'tunneling', 'ffff', '2002', '2001:0000', 'migration']
|
||||
},
|
||||
{
|
||||
href: '/reference/ipv6-privacy-addresses',
|
||||
label: 'IPv6 Privacy Addresses',
|
||||
description: 'SLAAC privacy extensions: temporary vs stable interface identifiers',
|
||||
icon: 'ref-ipv6-privacy-address'
|
||||
icon: 'ref-ipv6-privacy-address',
|
||||
keywords: ['ipv6', 'privacy', 'addresses', 'slaac', 'extensions', 'temporary', 'stable', 'interface', 'identifiers', 'rfc', '4941', 'auto-configuration', 'randomization']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -842,31 +894,36 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
href: '/reference/special-use-ipv4',
|
||||
label: 'Special-Use IPv4 Blocks (RFC 6890)',
|
||||
description: 'Reserved IPv4 ranges including private networks, CGNAT, and test blocks',
|
||||
icon: 'ref-special-blocks'
|
||||
icon: 'ref-special-blocks',
|
||||
keywords: ['special', 'use', 'ipv4', 'blocks', 'rfc', '6890', 'reserved', 'private', 'networks', 'cgnat', 'test', 'loopback', '127.0.0.1', '10.0.0.0', '192.168.0.0', '172.16.0.0']
|
||||
},
|
||||
{
|
||||
href: '/reference/private-vs-public-ip',
|
||||
label: 'Private vs Public IP Addresses',
|
||||
description: 'Understanding private/public IPs, NAT implications, and identification',
|
||||
icon: 'ref-public-vs-private'
|
||||
icon: 'ref-public-vs-private',
|
||||
keywords: ['private', 'public', 'ip', 'addresses', 'nat', 'rfc', '1918', 'routable', 'non-routable', 'internet', 'identification', 'comparison', 'difference', 'explained']
|
||||
},
|
||||
{
|
||||
href: '/reference/cgnat',
|
||||
label: 'Carrier-Grade NAT Explained',
|
||||
description: 'CGNAT (100.64.0.0/10), how to identify it, and service impacts',
|
||||
icon: 'ref-carrier-nat'
|
||||
icon: 'ref-carrier-nat',
|
||||
keywords: ['cgnat', 'carrier', 'grade', 'nat', '100.64.0.0', 'rfc', '6598', 'shared', 'address', 'space', 'service', 'provider', 'impacts', 'detection', 'isp']
|
||||
},
|
||||
{
|
||||
href: '/reference/link-local-apipa',
|
||||
label: 'Link-Local & APIPA Addresses',
|
||||
description: 'IPv4 APIPA (169.254/16) and IPv6 link-local (fe80::/10) at a glance',
|
||||
icon: 'ref-link-local-apia'
|
||||
icon: 'ref-link-local-apia',
|
||||
keywords: ['link-local', 'apipa', 'addresses', '169.254.0.0', 'fe80::', 'automatic', 'configuration', 'zero-conf', 'local', 'subnet', 'self-assigned', 'ipv4', 'ipv6']
|
||||
},
|
||||
{
|
||||
href: '/reference/multicast',
|
||||
label: 'IPv4 & IPv6 Multicast Basics',
|
||||
description: 'Multicast scopes, well-known groups, and local subnet limitations',
|
||||
icon: 'ref-multicast-basics'
|
||||
icon: 'ref-multicast-basics',
|
||||
keywords: ['multicast', 'basics', 'ipv4', 'ipv6', 'scopes', 'groups', 'igmp', 'mld', '224.0.0.0', 'ff00::', 'broadcast', 'unicast', 'anycast', 'communication']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -877,25 +934,29 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
href: '/reference/reverse-dns',
|
||||
label: 'Reverse DNS (PTR Records)',
|
||||
description: 'How in-addr.arpa and ip6.arpa work with examples for IPv4 and IPv6',
|
||||
icon: 'ref-reverse-dns'
|
||||
icon: 'ref-reverse-dns',
|
||||
keywords: ['reverse', 'dns', 'ptr', 'records', 'in-addr.arpa', 'ip6.arpa', 'lookup', 'ipv4', 'ipv6', 'hostname', 'resolution', 'explained', 'examples']
|
||||
},
|
||||
{
|
||||
href: '/reference/reverse-zones',
|
||||
label: 'Reverse Zones for CIDR Delegation',
|
||||
description: 'Minimal reverse DNS zones needed to delegate IPv4 and IPv6 CIDR blocks',
|
||||
icon: 'ref-reverse-zones'
|
||||
icon: 'ref-reverse-zones',
|
||||
keywords: ['reverse', 'zones', 'cidr', 'delegation', 'dns', 'minimal', 'ipv4', 'ipv6', 'blocks', 'nibble', 'octet', 'boundaries', 'authority', 'nameserver']
|
||||
},
|
||||
{
|
||||
href: '/reference/icmp',
|
||||
label: 'ICMP & ICMPv6: Common Types',
|
||||
description: 'Practical guide to ICMP message types for network troubleshooting',
|
||||
icon: 'ref-icmp'
|
||||
icon: 'ref-icmp',
|
||||
keywords: ['icmp', 'icmpv6', 'message', 'types', 'ping', 'traceroute', 'destination', 'unreachable', 'time', 'exceeded', 'troubleshooting', 'network', 'protocol', 'error']
|
||||
},
|
||||
{
|
||||
href: '/reference/arp-vs-ndp',
|
||||
label: 'ARP vs NDP',
|
||||
description: 'Side-by-side comparison of IPv4 ARP and IPv6 Neighbor Discovery',
|
||||
icon: 'ref-arp-vs-ndp'
|
||||
icon: 'ref-arp-vs-ndp',
|
||||
keywords: ['arp', 'ndp', 'neighbor', 'discovery', 'comparison', 'ipv4', 'ipv6', 'address', 'resolution', 'protocol', 'layer2', 'mac', 'solicitation', 'advertisement']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -906,25 +967,29 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
href: '/reference/asn',
|
||||
label: 'What is an ASN?',
|
||||
description: 'Autonomous Systems, BGP basics, and how IP addresses map to ASNs',
|
||||
icon: 'ref-asn'
|
||||
icon: 'ref-asn',
|
||||
keywords: ['asn', 'autonomous', 'system', 'number', 'bgp', 'routing', 'internet', 'explained', 'ip', 'addresses', 'mapping', 'iana', 'rir', 'allocation', 'lookup']
|
||||
},
|
||||
{
|
||||
href: '/reference/ports',
|
||||
label: 'Common TCP/UDP Ports',
|
||||
description: 'Quick reference for frequently used port numbers and services',
|
||||
icon: 'ref-ports'
|
||||
icon: 'ref-ports',
|
||||
keywords: ['tcp', 'udp', 'ports', 'common', 'reference', 'services', 'well-known', 'registered', 'dynamic', 'ephemeral', 'firewall', 'security', 'protocols']
|
||||
},
|
||||
{
|
||||
href: '/reference/wildcard-masks',
|
||||
label: 'ACL Wildcard Masks',
|
||||
description: 'Wildcard masks vs netmasks, quick conversions and ACL examples',
|
||||
icon: 'ref-wildcard-masks'
|
||||
icon: 'ref-wildcard-masks',
|
||||
keywords: ['wildcard', 'masks', 'acl', 'access', 'control', 'list', 'netmasks', 'inverse', 'cisco', 'juniper', 'conversions', 'examples', 'firewall', 'security']
|
||||
},
|
||||
{
|
||||
href: '/reference/mtu-mss',
|
||||
label: 'Common MTU/MSS Values',
|
||||
description: 'MTU and MSS values for Ethernet, PPPoE, VPN, and overhead calculations',
|
||||
icon: 'ref-mtu-mss'
|
||||
icon: 'ref-mtu-mss',
|
||||
keywords: ['mtu', 'mss', 'maximum', 'transmission', 'unit', 'segment', 'size', 'ethernet', 'pppoe', 'vpn', 'overhead', 'fragmentation', 'jumbo', 'frames']
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -974,6 +1039,7 @@ export function findSectionKey(pathname: string): string | null {
|
||||
|
||||
// Helper: get page details for SEO from navigation
|
||||
export function getPageDetails(href: string): { title: string; description: string; keywords: string[] } | null {
|
||||
// First check ALL_PAGES (sub-pages)
|
||||
for (const item of ALL_PAGES) {
|
||||
if (item.href === href) {
|
||||
return {
|
||||
@@ -983,5 +1049,49 @@ export function getPageDetails(href: string): { title: string; description: stri
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Then check TOP_NAV (top-level pages)
|
||||
for (const item of TOP_NAV) {
|
||||
if (item.href === href) {
|
||||
return {
|
||||
title: item.label,
|
||||
description: item.description || '',
|
||||
keywords: item.keywords || []
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Check SUB_NAV for section-level metadata (e.g. /cidr)
|
||||
const sectionData = SUB_NAV[href];
|
||||
if (sectionData && sectionData.length > 0) {
|
||||
const firstItem = sectionData[0];
|
||||
// Check if it's a NavGroup with title/description
|
||||
if ('title' in firstItem && 'description' in firstItem) {
|
||||
return {
|
||||
title: firstItem.title,
|
||||
description: firstItem.description || '',
|
||||
keywords: []
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback: check for parent section if current path is a sub-path
|
||||
// e.g. /cidr/mask-converter should use /cidr section metadata
|
||||
const pathSegments = href.split('/').filter(Boolean);
|
||||
if (pathSegments.length > 1) {
|
||||
const parentPath = '/' + pathSegments[0];
|
||||
const parentSectionData = SUB_NAV[parentPath];
|
||||
if (parentSectionData && parentSectionData.length > 0) {
|
||||
const firstItem = parentSectionData[0];
|
||||
if ('title' in firstItem && 'description' in firstItem) {
|
||||
return {
|
||||
title: firstItem.title,
|
||||
description: firstItem.description || '',
|
||||
keywords: []
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { page } from '$app/stores';
|
||||
import '../styles/base.scss';
|
||||
import '../styles/variables.scss';
|
||||
import '../styles/components.scss';
|
||||
@@ -8,15 +9,31 @@
|
||||
import '../styles/pages.scss';
|
||||
|
||||
import favicon from '$lib/assets/favicon.svg';
|
||||
import { getPageDetails } from '$lib/constants/nav.js';
|
||||
import { site, author } from '$lib/constants/site.js';
|
||||
|
||||
import Header from '$lib/components/furniture/Header.svelte';
|
||||
import SubHeader from '$lib/components/furniture/SubHeader.svelte';
|
||||
import Footer from '$lib/components/furniture/Footer.svelte';
|
||||
|
||||
|
||||
let { data, children } = $props(); // Gets data from the server load function
|
||||
|
||||
let darkMode = $state(true); // Stores the theme mode
|
||||
|
||||
// SEO: Get page-specific metadata or fallback to site defaults
|
||||
const seoData = $derived.by(() => {
|
||||
const currentPath = $page.url.pathname;
|
||||
const pageDetails = getPageDetails(currentPath);
|
||||
|
||||
return {
|
||||
title: pageDetails?.title ? `${pageDetails.title} | ${site.title}` : site.title,
|
||||
description: pageDetails?.description || site.description,
|
||||
keywords: pageDetails?.keywords?.length ? pageDetails.keywords.join(', ') : site.keywords,
|
||||
url: `${site.url}${currentPath}`,
|
||||
image: site.image
|
||||
};
|
||||
});
|
||||
|
||||
onMount(() => {
|
||||
initializeTheme();
|
||||
});
|
||||
@@ -56,7 +73,35 @@
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href={favicon} />
|
||||
|
||||
<!-- SEO Meta Tags -->
|
||||
<title>{seoData.title}</title>
|
||||
<meta name="description" content={seoData.description} />
|
||||
<meta name="keywords" content={seoData.keywords} />
|
||||
<meta name="author" content={author.name} />
|
||||
<link rel="canonical" href={seoData.url} />
|
||||
|
||||
<!-- Open Graph Tags -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content={seoData.title} />
|
||||
<meta property="og:description" content={seoData.description} />
|
||||
<meta property="og:url" content={seoData.url} />
|
||||
<meta property="og:image" content={seoData.image} />
|
||||
<meta property="og:site_name" content={site.name} />
|
||||
|
||||
<!-- Twitter Card Tags -->
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content={seoData.title} />
|
||||
<meta name="twitter:description" content={seoData.description} />
|
||||
<meta name="twitter:image" content={seoData.image} />
|
||||
|
||||
<!-- Additional Meta Tags -->
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<!-- Structured Data -->
|
||||
{@html jsonLdTag(data.breadcrumbJsonLd)}
|
||||
</svelte:head>
|
||||
|
||||
|
||||
@@ -24,15 +24,6 @@
|
||||
const cidrTools = extractNavItems(SUB_NAV['/cidr'] || []);
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>CIDR Tools & Converters | {site.title}</title>
|
||||
<meta name="description" content="Comprehensive CIDR tools including subnet mask converters, CIDR summarizer, splitter, and set operations for network analysis and optimization." />
|
||||
<meta name="keywords" content="{site.keywords}, CIDR, subnet mask converter, CIDR summarizer, network tools, IP range calculator" />
|
||||
<meta property="og:title" content="CIDR Tools & Converters" />
|
||||
<meta property="og:description" content="Professional CIDR tools for network engineers including converters, summarizers, and set operations." />
|
||||
<meta property="og:url" content="{site.url}/cidr" />
|
||||
</svelte:head>
|
||||
|
||||
<div class="page-container">
|
||||
<header class="page-header">
|
||||
<h1>CIDR Tools & Converters</h1>
|
||||
|
||||
@@ -10,16 +10,16 @@ import { site } from '$lib/constants/site';
|
||||
export async function GET() {
|
||||
// Collect all unique URLs
|
||||
const urls = new Set<string>();
|
||||
|
||||
|
||||
// Add homepage
|
||||
urls.add('/');
|
||||
|
||||
|
||||
// Add top-level navigation pages
|
||||
TOP_NAV.forEach(item => urls.add(item.href));
|
||||
|
||||
|
||||
// Add all pages from the navigation structure
|
||||
ALL_PAGES.forEach(item => urls.add(item.href));
|
||||
|
||||
|
||||
// Add footer pages (about, etc.)
|
||||
footerLinks.forEach(item => {
|
||||
// Only include internal links (not external GitHub, etc.)
|
||||
@@ -27,7 +27,21 @@ export async function GET() {
|
||||
urls.add(item.href);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Extract and add parent paths for intermediate directories
|
||||
// e.g., from /cidr/mask-converter/cidr-to-subnet-mask, also add /cidr/mask-converter/
|
||||
const allUrls = Array.from(urls);
|
||||
allUrls.forEach(url => {
|
||||
const segments = url.split('/').filter(Boolean);
|
||||
// Generate all parent paths
|
||||
for (let i = 1; i < segments.length; i++) {
|
||||
const parentPath = '/' + segments.slice(0, i).join('/');
|
||||
if (parentPath !== '/' && !urls.has(parentPath)) {
|
||||
urls.add(parentPath);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Convert to sorted array for consistent output
|
||||
const sortedUrls = Array.from(urls).sort();
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import { site } from '$lib/constants/site';
|
||||
import { SUB_NAV } from '$lib/constants/nav';
|
||||
import ToolsGrid from '$lib/components/global/ToolsGrid.svelte';
|
||||
import Icon from '$lib/components/global/Icon.svelte';
|
||||
@@ -34,14 +33,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Subnetting Tools - Subnet, VLSM & Supernet Calculators | {site.name}</title>
|
||||
<meta name="description" content="Comprehensive subnetting and supernetting tools including subnet calculator, VLSM calculator, and supernet calculator for network planning, IP allocation, and route aggregation." />
|
||||
<meta name="keywords" content="{site.keywords}, subnetting, subnet calculator, VLSM, supernet, supernetting, route aggregation, network planning" />
|
||||
<meta property="og:title" content="Subnetting Tools - Subnet, VLSM & Supernet Calculators" />
|
||||
<meta property="og:description" content="Comprehensive subnetting and supernetting tools including subnet calculator, VLSM calculator, and supernet calculator for network planning, IP allocation, and route aggregation." />
|
||||
<meta property="og:url" content="{site.url}/subnetting" />
|
||||
</svelte:head>
|
||||
|
||||
|
||||
<div class="page-container">
|
||||
<header class="page-header">
|
||||
|
||||
@@ -5,13 +5,5 @@
|
||||
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{pages.subnetCalculator.title}</title>
|
||||
<meta name="description" content="{pages.subnetCalculator.description}" />
|
||||
<meta name="keywords" content="{site.keywords}" />
|
||||
<meta property="og:title" content="{pages.subnetCalculator.title}" />
|
||||
<meta property="og:description" content="{pages.subnetCalculator.description}" />
|
||||
<meta property="og:url" content="{site.url}/subnet-calculator" />
|
||||
</svelte:head>
|
||||
|
||||
<SubnetCalculator />
|
||||
Reference in new issue
Block a user