From 083a8cacdd89636f586f42f0c077af0bae4ef84e Mon Sep 17 00:00:00 2001 From: PeninsulaInd Date: Thu, 23 Oct 2025 15:37:31 -0500 Subject: [PATCH] Fixed NOT TESTED: now actually listens to # of links. Also makes See Also smaller. --- DEPLOY_BATCH_ANALYSIS.md | 247 ++++++++++++++++++++++++++ JOB_FIELD_REFERENCE.md | 161 +++++++++++++++++ check_link_counts.py | 34 ++++ src/generation/batch_processor.py | 11 ++ src/generation/job_config.py | 12 +- src/interlinking/content_injection.py | 58 ++++-- test_tiered_links.py | 34 ++++ 7 files changed, 546 insertions(+), 11 deletions(-) create mode 100644 DEPLOY_BATCH_ANALYSIS.md create mode 100644 JOB_FIELD_REFERENCE.md create mode 100644 check_link_counts.py create mode 100644 test_tiered_links.py diff --git a/DEPLOY_BATCH_ANALYSIS.md b/DEPLOY_BATCH_ANALYSIS.md new file mode 100644 index 0000000..1dffc30 --- /dev/null +++ b/DEPLOY_BATCH_ANALYSIS.md @@ -0,0 +1,247 @@ +# Deploy-Batch Analysis for test_shaft_machining.json + +## Quick Answers to Your Questions + +### 1. What should the anchor text be at each level? + +**Tier 1 Articles (5 articles):** +- **Money Site Links:** Uses `main_keyword` variations from project + - "shaft machining" + - "learn about shaft machining" + - "shaft machining guide" + - "best shaft machining" + - "shaft machining tips" + - System tries to find these phrases in content; picks first one that matches + +- **Home Link:** Now in navigation menu (not injected into content) + +- **See Also Links:** Uses article titles as anchor text + +**Tier 2 Articles (20 articles):** +- **Lower Tier Links:** Uses `related_searches` from CORA data + - Depends on what related searches were in the shaft_machining.xlsx file + - If no related searches exist, falls back to main_keyword variations + +- **Home Link:** Now in navigation menu (not injected into content) + +- **See Also Links:** Uses article titles as anchor text + +**Configuration:** +- Anchor text rules come from `master.config.json` → `interlinking.tier_anchor_text_rules` +- Can be overridden in job config with `anchor_text_config` + +### 2. How many links should be in each article? + +**Tier 1 Articles:** +- 1 link to money site (https://fzemanufacturing.com/capabilities/shaft-machining-services) +- 4 "See Also" links (to the other 4 tier1 articles) +- **Total: 5 links per tier1 article** (plus Home in nav menu) + +**Tier 2 Articles:** +- 2-4 links to tier1 articles (random selection, count is `interlinking.links_per_article_min` to `max`) +- 19 "See Also" links (to the other 19 tier2 articles) +- **Total: 21-23 links per tier2 article** (plus Home in nav menu) + +**Your JSON Configuration:** +```json +"interlinking": { + "links_per_article_min": 2, + "links_per_article_max": 4 +} +``` +This controls the tiered links (tier2 → tier1). Each tier2 article will get between 2-4 random tier1 articles to link to. + +### 3. Should "Home" be a link? + +**YES** - Home is a link in the navigation menu at the top of every page. + +**How it works:** +- The HTML template (`basic.html`) includes a `