Commit db4f083
committed
feat: rebuild the site's crawlable and citable surface
The site was a single URL whose every link left the domain, so there was
nothing on initphp.org to index beyond the homepage and nothing for an
answer engine to cite: not one Composer package name outside the four in
the terminal box, no PHP version requirements, no PSR claims, no dates.
Content
- Expand src/data/libraries.ts into the single source of truth for every
package: slug, Composer name, wiki, Packagist URL, tagline, summary,
minimum PHP, release version and date, PSR interfaces, required
extensions and dependencies, all verified against Packagist and GitHub.
- Derive category membership and the featured set from it; remove
src/data/featured.ts and the hand-maintained repo URLs in categories.ts,
which could disagree with the catalogue.
- Add 27 pages under /libraries/ plus a /libraries/ hub: install command,
package facts, source/docs/Packagist links and same-category related
libraries. Point the homepage tiles and category lists at them, so the
site finally has an internal link graph.
- Add an eight-entry FAQ, rendered visibly and mirrored in FAQPage JSON-LD
from the same array.
Discoverability
- Add @astrojs/sitemap (29 URLs, lastmod from real release dates),
public/robots.txt with the sitemap and explicit content signals, a 404
page, llms.txt and llms-full.txt.
- Replace the lone Organization node with an @graph: Organization, WebSite,
per-page CollectionPage/WebPage, ItemList, FAQPage, BreadcrumbList and
SoftwareSourceCode/SoftwareApplication per package.
- Per-page titles, canonicals and og:url; description trimmed to 155 chars;
robots opened up with max-image-preview:large and uncapped snippets.
- Lead the h1 with the brand; promote library and featured names from divs
and spans to headings.
Assets
- Generate the favicon set, PWA icons and a 1200x630 og-image from the
master logo (scripts/generate-icons.mjs). The 348 KB, 700x700 master was
serving as both the favicon and the 32x32 navbar logo, and as a square
og:image behind a summary_large_image card.
- Drop 1.4 MB of unreferenced logos; preload the Inter latin subset.
- Fix the footer's relative license link, which 404'd on any nested page.
Tests
- Retire tests/parity.test.mjs and its frozen baseline: it asserted the
page had not changed, which is now the opposite of the intent.
- Add tests/seo.test.mjs covering headings, meta lengths, canonicals,
social images, robots values, JSON-LD @id resolution, per-package facts,
internal link integrity, image attributes, sitemap, robots.txt and the
llms files.1 parent d8d8e87 commit db4f083
46 files changed
Lines changed: 2931 additions & 1688 deletions
File tree
- public
- logos
- scripts
- src
- components
- data
- layouts
- pages
- libraries
- tests
- fixtures
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
12 | 55 | | |
13 | 56 | | |
14 | 57 | | |
15 | 58 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
20 | 62 | | |
21 | 63 | | |
22 | 64 | | |
| |||
33 | 75 | | |
34 | 76 | | |
35 | 77 | | |
36 | | - | |
| 78 | + | |
37 | 79 | | |
38 | 80 | | |
39 | 81 | | |
40 | 82 | | |
41 | 83 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
49 | 102 | | |
50 | 103 | | |
51 | 104 | | |
52 | 105 | | |
53 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
4 | 12 | | |
5 | 13 | | |
6 | 14 | | |
7 | 15 | | |
8 | 16 | | |
9 | 17 | | |
10 | 18 | | |
11 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
12 | 46 | | |
13 | 47 | | |
14 | 48 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
Loading
Loading
Loading
Loading
Binary file not shown.
Loading
0 commit comments