From ac6725e23396447c88cde7364c3bdc47a0a546de Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Fri, 9 May 2025 13:31:32 +0200 Subject: Add dynamic faq --- src/pages/index.astro | 78 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 56 insertions(+), 22 deletions(-) (limited to 'src/pages') diff --git a/src/pages/index.astro b/src/pages/index.astro index 6e65c27..9206573 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,5 +1,6 @@ --- import Cidr from "../components/Cidr"; +import { faqs } from "../content/faqs.ts"; import "../styles/global.css"; import { GOOGLE_ANALYTICS_ID } from "../config"; @@ -9,6 +10,16 @@ const metadata = { description: "Instantly compute and visualize CIDR subnets, IP ranges and masks. Free online tool for accurate network design, planning and IT education.", }; + +const faqJsonLd = { + "@context": "https://schema.org", + "@type": "FAQPage", + mainEntity: faqs.map(({ q, a }) => ({ + "@type": "Question", + name: q, + acceptedAnswer: { "@type": "Answer", text: a }, + })), +}; --- @@ -67,29 +78,52 @@ const metadata = { -
-

- CIDR (Classless Inter-Domain Routing) notation is a - compact method for specifying IP address ranges and - network masks. It is widely used in network - configuration and management. -

-

- An IP address consists of 4 octets, each containing 8 - bits that represent values from 0 to 255. In CIDR - notation, a forward slash (/) followed by a number - indicates the length of the network prefix in bits. -

-

- This prefix length determines the network mask and the - number of available host addresses within the specified - IP range. This calculator helps you visualize and - understand these CIDR blocks, making network planning - and configuration easier. -

-
+
+

+ CIDR & Subnetting FAQ +

+ +
+ { + faqs.map(({ q, a }) => ( +
+ + {q} + + + + +
+ {a} +
+
+ )) + } +
+
+ +