Skip to content

Tom/blog update ai app builder#1791

Merged
tgberkeley merged 5 commits intomainfrom
tom/blog-update-ai-app-builder
Mar 27, 2026
Merged

Tom/blog update ai app builder#1791
tgberkeley merged 5 commits intomainfrom
tom/blog-update-ai-app-builder

Conversation

@tgberkeley
Copy link
Copy Markdown
Collaborator

No description provided.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 27, 2026

Greptile Summary

This PR updates the enterprise-ready-ai-app-builder.md blog post (revised title, description, shorter keyword list, richer image alt text, and corrected euro currency symbol) and enriches the blog's JSON-LD structured data by adding url, wordCount, and keywords to the BlogPosting schema node.\n\nKey changes:\n- blog_jsonld() in meta.py now accepts optional word_count and keywords parameters and includes url directly in the BlogPosting node, improving schema.org compliance.\n- page.py extracts keywords from the frontmatter meta list and computes a word count from document.content, then passes both to blog_jsonld.\n- The blog <h1> now renders meta[\"title\"] rather than meta.get(\"title_tag\") or meta[\"title\"], aligning with the documented intent in blog.py that title_tag is for <title> / OG / Twitter only — though this silently changes the displayed H1 for 20+ existing posts that define title_tag.\n- word_count is derived from a raw str.split() on the markdown source, which inflates the count by including code block contents and markdown syntax tokens.

Confidence Score: 4/5

Safe to merge; all changes are non-breaking SEO/structured-data improvements with two minor P2 concerns worth addressing.

The code changes are additive (new optional parameters, H1 fix), no runtime errors are introduced, and the blog content updates are editorial. Two P2 concerns remain: (1) raw markdown word count inflation could misreport schema.org wordCount, and (2) the H1 change affects all blog posts with title_tag. Neither blocks the happy path but both are worth a deliberate sign-off.

pcweb/pages/blog/page.py — word_count calculation and H1 title logic change affecting all blog posts.

Important Files Changed

Filename Overview
blog/enterprise-ready-ai-app-builder.md Blog content update: revised title/description for better SEO, added title_tag, trimmed keyword list, updated image alt texts for accessibility, and corrected currency format from "250,000 euros" to "€250,000".
pcweb/meta/meta.py blog_jsonld extended with optional word_count and keywords parameters for schema.org enrichment, and url now included in the BlogPosting node (was already a required parameter but previously unused inside the posting dict).
pcweb/pages/blog/page.py Page renderer extracts keywords from meta tags and computes word_count from raw markdown content (inflated by code blocks/syntax) to pass to blog_jsonld; H1 now correctly uses meta["title"] instead of meta.get("title_tag"), aligning with the documented intent in blog.py.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["blog/*.md\n(frontmatter: title, title_tag,\ndescription, meta keywords, faq)"] --> B["pcweb/pages/blog/page.py\npage()"]

    B --> C["Extract keywords_list\nfrom meta[name=keywords]"]
    B --> D["Compute word_count\nvia document.content.split()"]
    B --> E["Use meta[title] for H1\n(not title_tag)"]

    C --> F["blog_jsonld()\npcweb/meta/meta.py"]
    D --> F
    F --> G["JSON-LD BlogPosting node\n+ url, wordCount, keywords"]
    F --> H["JSON-LD FAQPage node\n(if faq present)"]

    B --> I["blog.py route setup"]
    I --> J["seo_title = title_tag or title\nused for title + OG/Twitter meta"]
Loading

Reviews (1): Last reviewed commit: "updated enterprise ready ai app builder" | Re-trigger Greptile

Comment on lines +197 to +202
# Compute word count from the document content.
word_count = (
len(document.content.split())
if hasattr(document, "content") and document.content
else None
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 word_count includes non-prose tokens from raw markdown

document.content.split() operates on the raw markdown source, so the resulting word count will include code fence contents, markdown syntax tokens (e.g. ##, **, -), inline backtick spans, and full URLs. For posts with multiple code samples the inflated count could be substantial, and schema.org's wordCount is defined as "the number of words in the text of the Article."

A lightweight improvement is to strip code blocks and markdown syntax before counting:

import re

def _prose_word_count(content: str) -> int:
    # Remove fenced code blocks
    text = re.sub(r"```.*?```", "", content, flags=re.DOTALL)
    # Remove inline code
    text = re.sub(r"`[^`]+`", "", text)
    # Remove markdown link syntax, keeping the label
    text = re.sub(r"\[([^\]]+)\]\([^)]+\)", r"\1", text)
    # Strip remaining markdown symbols
    text = re.sub(r"[#*_>~|`\[\]()!]", " ", text)
    return len(text.split())

This wouldn't need to be perfect, but would give a much closer approximation to actual prose word count.

Comment on lines 254 to 256
rx.el.h1(
meta.get("title_tag") or meta["title"],
meta["title"],
class_name="lg:text-5xl text-3xl text-m-slate-12 dark:text-m-slate-3 font-[575] mb-6 text-center text-balance",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 H1 change silently impacts all blog posts that defined title_tag

The diff removes the fallback:

- meta.get("title_tag") or meta["title"]
+ meta["title"]

There are currently 20+ published blog posts (e.g. using-table-component.md, top-7-enterprise-ai-app-builders.md, structuring-a-large-app.md, etc.) where title_tag was chosen specifically to be a shorter or more keyword-rich variant of title. For those posts the H1 displayed to visitors will now change — in some cases from a longer SEO-optimised string to a shorter display string (or vice versa).

The comment in blog.py clarifies that title_tag is intended for <title> / OG / Twitter only, so this change does align with that documented intent. But it is worth confirming the switch is deliberate for all existing posts, not just this new one, since Google uses H1 content as a ranking signal and mismatching H1 with prior crawl history can temporarily affect rankings.

@tgberkeley tgberkeley merged commit 60bb9d6 into main Mar 27, 2026
10 checks passed
@tgberkeley tgberkeley deleted the tom/blog-update-ai-app-builder branch March 27, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants