Repository navigation
feat(seo): meta description dinâmica, Open Graph, sitemap e dados estruturados - #45
Merged
tecrodrigocastro merged 10 commits intoOct 21, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumo
Implementa os 5 pontos do audit de SEO:
x-layouts.appganhou um propdescriptioncom fallback genérico, usado por cada página/post/evento.og:title,og:description,og:image,og:url,og:type,twitter:card), com imagem de fallback (farol-cena.png) eog:imageespecífico quando o post tem imagem de capa./sitemap.xmldinâmico — gerado porSitemapController, lista as páginas estáticas + todos os posts publicados (comlastmod). Não inclui eventos individualmente (não existe rota de evento único, só listagem — URLs com#fragmentoseriam sinal de conteúdo duplicado). Referenciado norobots.txt.<link rel="canonical">calculado a partir deAPP_URL+ URI atual, consistente independente de como o domínio foi acessado.Organization(nome, logo, redes sociais)BlogPosting(headline, autor, datas, publisher)/eventos→ umEventpor item da listagem (só quando há eventos futuros)Bônus
<meta name="robots" content="noindex, nofollow">robots.txtagora bloqueia/admine/membrodo crawlingPost::getExcerpt()novo método que extrai o primeiro parágrafo docontent_blockscomo resumo em texto puro, usado como meta description/og:description do postPegadinha encontrada
A chave
'@context'do JSON-LD colide com a diretiva nativa do Blade@context(usada pelo helpercontext()) — o compilador substitui o texto literal em qualquer lugar do arquivo, mesmo dentro de uma string PHP. Resolvido concatenando'@'.'context'pra evitar o match do regex do compilador.Test plan
vendor/bin/pint --testvendor/bin/phpstan analysephp artisan test(57 testes, incluindoSeoTest.phpnovo cobrindo meta tags, JSON-LD e sitemap)npm run build/,/blog/{slug}e/eventos