← All TILs · seo

A schema.org Person block is what actually helps you rank for your own name

seo - 2026-09-05

I wanted my TIL site to show up when someone searches my name, and went looking for an "SEO script" to do it. There isn't one — nothing you paste in makes a search engine rank you first. What actually helps is giving it structured, machine-readable proof of who a page belongs to, so it can confidently attach your name to it.

The relevant piece is a schema.org Person block, embedded as JSON-LD in the page <head>:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Person",
  "name": "Abdellatif Housni",
  "url": "https://til.housni.eu/",
  "sameAs": [
    "https://github.com/abdelhousni",
    "https://www.linkedin.com/in/abdelhousni/"
  ]
}
</script>

Two things matter more than they look like they should:

I generate this at build time in Python rather than hand-writing HTML, since a dict serialized with json.dumps() is much harder to get subtly wrong than string-templating quotes into JSON by hand:

def build_person_schema():
    data = {
        "@context": "https://schema.org",
        "@type": "Person",
        "name": SITE_AUTHOR,
        "url": f"{SITE_URL}/",
        "sameAs": AUTHOR_SAME_AS,
    }
    return f'<script type="application/ld+json">\n{json.dumps(data, indent=2)}\n</script>'

No tracking, no third party involved — it's static JSON sitting in the page, same as any other meta tag.

Created 2026-09-05T05:21:14+02:00, updated 2026-09-29T22:48:40+02:00 · History · Edit