(entry: SectionPageEntry)
| 189 | }); |
| 190 | |
| 191 | export const createSectionStructuredData = (entry: SectionPageEntry) => ({ |
| 192 | '@context': 'https://schema.org', |
| 193 | '@graph': [ |
| 194 | { |
| 195 | '@type': 'BreadcrumbList', |
| 196 | itemListElement: [ |
| 197 | { |
| 198 | '@type': 'ListItem', |
| 199 | position: 1, |
| 200 | name: 'Libros gratis de programación', |
| 201 | item: siteConfig.url, |
| 202 | }, |
| 203 | { |
| 204 | '@type': 'ListItem', |
| 205 | position: 2, |
| 206 | name: getSectionPageTitle(entry), |
| 207 | item: getSectionCanonicalUrl(entry), |
| 208 | }, |
| 209 | ], |
| 210 | }, |
| 211 | { |
| 212 | '@type': 'CollectionPage', |
| 213 | name: getSectionPageTitle(entry), |
| 214 | description: getSectionMetaDescription(entry), |
| 215 | inLanguage: siteConfig.language, |
| 216 | url: getSectionCanonicalUrl(entry), |
| 217 | isPartOf: { |
| 218 | '@type': 'WebSite', |
| 219 | name: siteConfig.name, |
| 220 | url: siteConfig.url, |
| 221 | }, |
| 222 | mainEntity: { |
| 223 | '@type': 'ItemList', |
| 224 | name: `Libros gratis de ${entry.displayName}`, |
| 225 | numberOfItems: entry.section.books.length, |
| 226 | itemListElement: entry.section.books.map((book, index) => ({ |
| 227 | '@type': 'ListItem', |
| 228 | position: index + 1, |
| 229 | item: bookStructuredData(book), |
| 230 | })), |
| 231 | }, |
| 232 | }, |
| 233 | { |
| 234 | '@type': 'FAQPage', |
| 235 | mainEntity: [ |
| 236 | { |
| 237 | '@type': 'Question', |
| 238 | name: `¿Dónde encontrar libros gratis de ${entry.displayName} en español?`, |
| 239 | acceptedAnswer: { |
| 240 | '@type': 'Answer', |
| 241 | text: `En ${siteConfig.name} tienes una selección curada de ${entry.section.books.length} libros gratis de ${entry.displayName} en español, con enlaces directos a recursos PDF y HTML cuando están disponibles.`, |
| 242 | }, |
| 243 | }, |
| 244 | { |
| 245 | '@type': 'Question', |
| 246 | name: `¿Estos libros de ${entry.displayName} son gratis?`, |
| 247 | acceptedAnswer: { |
| 248 | '@type': 'Answer', |
nothing calls this directly
no test coverage detected