Ais..2025 11 19..1222..web.ssg..11ty..relaun.website

· eog's blog


πŸ‘€ User #

11ty:

target: relaunc website. use old text and pics. no js and new style. but keeping rough structure. i list the "sections":

  1. logo + navi in header
  2. hero pic
  3. depending on page: sipmle paragraphs OR 3 columns w/ header pics (possibnly cards)
  4. footer

Q 1: now: how to extract important meta tags and text (incl. links) and pic-urls for 11ty?

my ideas:

Q 2: How to iport into 11ty.


πŸ‘† ChatGPT #

Below is a clear, practical workflow to get your existing site content into 11ty, without JavaScript on the frontend, and keeping the structure simple.

βœ… Q1: How to extract important meta tags, text (incl. links) and image URLs?

You basically want to capture only content, not layout. Here are solid options (from most reliable β†’ to least):

Option A β€” β€œSource of Truth” per page β†’ Markdown + Front-Matter (Best)

For each old page:

Open your page in the browser.

Copy only the text content, links, and img URLs.

Create a Markdown file:

yaml Copy code #

Page headline #

Paragraph text…

Link

Why this is best: βœ” readable βœ” easy to edit βœ” 11ty supports Markdown beautifully βœ” scales well if more pages later

Option B β€” One central YAML file (OK but harder to maintain)

Example:

yaml Copy code pages: home: title: "Home" hero: "/img/hero.jpg" body: | Welcome text... about: title: "About" hero: "/img/about.jpg" body: | Our story...

Why NOT ideal:

Harder to edit big text blocks

Mixing all pages into one file creates future headaches

Markdown is better for long content Use YAML only for small configuration, not entire pages.

Option C β€” JSON (similar drawbacks to YAML)

Better for structured data (e.g., cards), not for paragraphs. Example:

json Copy code { "cards": [ { "title": "A", "img": "/img/a.jpg", "text": "Lorem..." }, { "title": "B", "img": "/img/b.jpg", "text": "Lorem..." } ] }

Use JSON for:

3-column card layout

team members

products

blog index

Not ideal for full page content.

πŸ”₯ Recommendation (most realistic workflow) β†’ Use Markdown files for pages β†’ Use JSON/YAML only for repeatable data lists (cards) β†’ Put meta tags in front-matter βœ” Which meta tags should you extract?

You only need the important SEO + social ones:

makefile Copy code title description og:title og:description og:image

Plus:

hero/feature image URLs

existing internal links

any alt text on images (SEO!)

πŸ“‚ Recommended folder structure in 11ty pgsql Copy code . └── src/ β”œβ”€β”€ _data/ β”‚ └── cards.json ← for 3-column card data β”œβ”€β”€ index.md ← home page β”œβ”€β”€ about.md β”œβ”€β”€ contact.md β”œβ”€β”€ assets/ β”‚ └── images/ └── _includes/ β”œβ”€β”€ layout.njk β”œβ”€β”€ header.njk β”œβ”€β”€ footer.njk └── card.njk

βœ… Q2: How to import this into 11ty? When you create a Markdown page:

index.md

yaml Copy code #

layout: layout.njk title: Home description: "Welcome to our site" hero: "/assets/images/hero.jpg" #

Welcome #

Intro text…

11ty automatically exposes all front-matter variables (title, hero, etc.) to your templates.

Example layout (layout.njk) njk Copy code

{% include "header.njk" %}

{% if hero %}

{% endif %}

{{ content | safe }}

{% include "footer.njk" %}

How to handle your 3-column card pages

cards.json:

json Copy code [ { "img": "/assets/images/p1.jpg", "title": "Step 1", "text": "Lorem..." }, { "img": "/assets/images/p2.jpg", "title": "Step 2", "text": "Lorem..." }, { "img": "/assets/images/p3.jpg", "title": "Step 3", "text": "Lorem..." } ]

Page that uses them:

services.md

yaml Copy code #

layout: layout.njk title: Services cards: cards #

Template inside layout:

njk Copy code {% for card in cards %}

{{ card.title }}

{{ card.text }}

{% endfor %}

🎯 Final Recommendation Summary For content pages:

➑️ Use Markdown + front-matter per page (best for long text)

For repeatable blocks (cards, team, 3-column icons):

➑️ Use JSON or YAML in _data/.

For layout:

➑️ Create simple Nunjucks templates (header.njk, footer.njk, etc.)

For importing:

➑️ 11ty automatically reads Markdown, JSON, YAML in src/ and _data/.

If you want, I can show you:

βœ… a ready-to-copy folder template for your project βœ… extraction script (optional) to auto-pull text + images from your old site βœ… a sample 3-column responsive CSS (no JS) Just tell me!

last updated: