feat(servicos): topo, entregáveis e cases por serviço, assunto próprio no WhatsApp e títulos curtos

This commit is contained in:
Evandro Fonseca Junior committed 2026-10-14 22:54:18 -03:00
1 parent cf360041bd
commit 2fd8b063d9
33 files changed
+1578 -300

No files matched your search

+44 -37
View File
@@ -2,9 +2,9 @@ import sitemap from "../app/sitemap";
import {
buildBreadcrumbList,
buildCaseJsonLd,
buildOfferServicesJsonLd,
buildPageSocialMetadata,
buildPersonJsonLd,
buildProfessionalServiceJsonLd,
buildProfilePageJsonLd,
buildServiceJsonLd,
buildWebSiteJsonLd,
@@ -29,7 +29,6 @@ it("uses one canonical identity across website, profile and service", () => {
website: `${siteUrl}/#website`,
person: `${siteUrl}/#person`,
profilePage: `${siteUrl}/curriculo#profile-page`,
professionalService: `${siteUrl}/#professional-service`,
});
expect(buildWebSiteJsonLd().publisher).toEqual({ "@id": SEO_IDS.person });
expect(buildProfilePageJsonLd()).toMatchObject({
@@ -74,6 +73,7 @@ it("keeps the root graph limited to verified website and person fields", () => {
image: `${siteUrl}/edev.jpg`,
jobTitle: "Engenheiro da Computação e Desenvolvedor de Software",
homeLocation: { "@type": "Place", name: "Garuva, Santa Catarina, Brasil" },
// só o LinkedIn: a conta do GitHub foi suspensa (404) e o Instagram fica fora por política
sameAs: ["https://www.linkedin.com/in/evandrodevbr/"],
});
@@ -82,7 +82,7 @@ it("keeps the root graph limited to verified website and person fields", () => {
);
});
it("builds a canonical service with only the verified service area", () => {
it("builds a canonical service whose service area is the visible one: Garuva, Joinville, Santa Catarina and Brazil", () => {
const service = representativeService;
const pageUrl = `${siteUrl}/servicos/${service.slug}`;
@@ -96,49 +96,56 @@ it("builds a canonical service with only the verified service area", () => {
areaServed: [
{ "@type": "City", name: "Garuva" },
{ "@type": "City", name: "Joinville" },
{ "@type": "AdministrativeArea", name: "Norte de Santa Catarina" },
{ "@type": "AdministrativeArea", name: "Santa Catarina" },
{ "@type": "Country", name: "Brasil" },
],
});
// a mesma área das três ofertas da home: um valor só em todo o JSON-LD
for (const offer of buildOfferServicesJsonLd()) {
expect(offer.areaServed).toEqual(buildServiceJsonLd(service).areaServed);
}
});
it("describes the business as a ProfessionalService with the service area and the three offers as a catalog", () => {
const business = buildProfessionalServiceJsonLd();
it("describes the three offers as Service nodes tied to the person, with the service area and the page of each offer", () => {
const services = buildOfferServicesJsonLd();
expect(business).toMatchObject({
"@type": "ProfessionalService",
"@id": SEO_IDS.professionalService,
name: siteName,
url: siteUrl,
founder: { "@id": SEO_IDS.person },
});
expect(business.areaServed.map(({ name }) => name)).toEqual([
"Garuva",
"Joinville",
"Santa Catarina",
"Brasil",
]);
const catalog = business.hasOfferCatalog;
expect(catalog["@type"]).toBe("OfferCatalog");
// as mesmas três ofertas da home, com o mesmo nome e a página de cada uma
expect(
catalog.itemListElement.map(({ itemOffered }) => itemOffered.name),
).toEqual([
expect(services).toHaveLength(3);
// as mesmas três ofertas da home, com o mesmo nome e a página de cada uma (a revisão aponta para /ia)
expect(services.map(({ name }) => name)).toEqual([
"Site que traz pedidos pelo WhatsApp",
"Sistema para tirar a operação da planilha",
"Revisão de sistema que já existe, inclusive feito com IA",
"Revisão de sistema que já existe",
]);
expect(
catalog.itemListElement.map(({ itemOffered }) => itemOffered.url),
).toEqual(serviceOffers.map(({ href }) => `${siteUrl}${href}`));
for (const offer of catalog.itemListElement) {
expect(offer["@type"]).toBe("Offer");
expect(offer.itemOffered["@type"]).toBe("Service");
expect(offer.itemOffered.description.length).toBeGreaterThan(30);
expect(services.map(({ url }) => url)).toEqual([
`${siteUrl}/servicos/criacao-de-sites`,
`${siteUrl}/servicos/engenharia-de-software`,
`${siteUrl}/ia`,
]);
expect(services.map(({ url }) => url)).toEqual(
serviceOffers.map(({ href }) => `${siteUrl}${href}`),
);
for (const service of services) {
expect(service["@type"]).toBe("Service");
expect(service.provider).toEqual({ "@id": SEO_IDS.person });
expect(service.areaServed.map(({ name }) => name)).toEqual([
"Garuva",
"Joinville",
"Santa Catarina",
"Brasil",
]);
expect(service.description.length).toBeGreaterThan(30);
}
// nada que o site não publique: sem preço, prazo, endereço de rua, telefone ou e-mail
expect(JSON.stringify(business)).not.toMatch(
/price|priceCurrency|availability|telephone|email|streetAddress|PostalAddress|geo|aggregateRating|review/i,
// ids próprios e estáveis, que não repetem o `#service` que a página de cada serviço emite
const ids = services.map((service) => service["@id"]);
expect(new Set(ids).size).toBe(3);
expect(ids).toEqual([
`${siteUrl}/#service-site`,
`${siteUrl}/#service-sistema`,
`${siteUrl}/#service-revisao`,
]);
// política de docs/seo-geo-operations.md: nenhum tipo de negócio local e nada que o site não publique
expect(JSON.stringify(services)).not.toMatch(
/ProfessionalService|LocalBusiness|OfferCatalog|price|priceCurrency|availability|telephone|email|streetAddress|PostalAddress|geo|aggregateRating|review/i,
);
});