Skip to content

Migrate user-facing APOD links to science.nasa.gov/apod - #52

Merged
gtracymuse merged 1 commit into
mainfrom
gtracymuse/apod-url-migration-47
Sep 27, 2026
Merged

gtracymuse merged 1 commit into
mainfrom
gtracymuse/apod-url-migration-47

Conversation

@gtracymuse

Copy link
Copy Markdown
Collaborator

Addresses #47.

What changed

All user-facing links back to APOD now point at the new site (science.nasa.gov/apod), per the build instruction in #47:

  • Daily email footer (src/services/apodService.js): Archive → https://science.nasa.gov/apod/archive, About APOD → https://science.nasa.gov/apod/apod-about/ (both verified live, HTTP 200)
  • Native-video fallback card: the "Watch Video on NASA APOD" button previously deep-linked to apYYMMDD.html, which 404s on the new site (it has no date-addressable per-day URLs), so it now links to the APOD home
  • Signup confirmation template (src/templates/added-email.html) and public site nav (public/index.html → "Official APOD"): now link the new APOD home
  • preview_apod_email.js and the tracked preview snapshots updated to match

Deliberately unchanged

src/services/apodScraper.js still scrapes apod.nasa.gov — per the decision in #47 to keep DOM parsing as the primary ingestion mechanism and not switch to the NASA APOD API. The classic date-based URLs still return HTTP 200, and the new site has no equivalent deep URLs, image-asset hosts, or scrapable DOM, so ingestion URLs stay as-is. Explanation-content deep links (other APOD days referenced inside explanation text) are also unchanged — they still resolve on the old host.

Verification

  • npm test: 7 files, 28 tests, all passing
  • New URLs verified live: science.nasa.gov/apod/ (200), /apod/archive (200), /apod/apod-about/ (200)

Follow-ups (not in this PR)

  • Adapt scraping selectors if/when the old host goes dark or redirects (new WordPress DOM, slug URLs — needs evaluation then)
  • Optional: official NASA API strictly as a last-resort fallback in fetchAPOD(), per gtracy's comment

APOD's main site is moving from apod.nasa.gov to science.nasa.gov/apod
(#47). Update all user-facing links back to APOD across the email
content, signup templates, and public site:

- Email footer: Archive -> science.nasa.gov/apod/archive,
  About APOD -> science.nasa.gov/apod/apod-about/ (verified live)
- Native-video fallback card: per-day apYYMMDD.html deep links 404 on
  the new site (no date-addressable URLs), so link the APOD home
- Signup confirmation template and public site nav -> new APOD home
- preview_apod_email.js and tracked preview snapshots updated to match

Deliberately unchanged: the scraper (apodScraper.js) still targets
apod.nasa.gov, which still returns HTTP 200 — per the decision in #47
to keep DOM parsing as the primary ingestion mechanism and not switch
to the NASA APOD API. New-site deep links and image assets have no
new-host equivalents, so ingestion URLs stay as-is.

Addresses #47
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.

1 participant