Skip to content

Commit

Permalink
Remove old pages, implement redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
jperson1 committed Mar 6, 2024
1 parent 1244127 commit 1b3127e
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 221 deletions.
4 changes: 2 additions & 2 deletions src/_includes/header.njk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<button type="button" class="usa-nav__close">
<img src="/assets/img/usa-icons/close.svg" role="img" alt="Close" />
</button>
<div class="usa-nav-container">
<div class="usa-nav-container padding-0">
<ul class="usa-nav__primary usa-accordion">
{% for section in global.navigation.primary %}
{% if section.links %}
Expand Down Expand Up @@ -60,7 +60,7 @@
<span class="text-primary-dark">Helpdesk</span>
</a>
</li>
<li class="usa-nav__primary-item flex-align-self-center margin-left-2 desktop:margin-left-15 padding-top-2 desktop:padding-top-0">
<li class="usa-nav__primary-item flex-align-self-center margin-left-2 width-card desktop:width-15 padding-top-2 desktop:padding-top-0">
<span class="text-primary-darker"><strong>OMB#</strong> 3090-0330 <strong>EXP:</strong> 09/30/2026</span>
</li>
</ul>
Expand Down
10 changes: 10 additions & 0 deletions src/_includes/redirect.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url='{{ redirect.to }}'" />
</head>
<body>
You are being redirected to <a href="{{ redirect.to }}">{{ redirect.to }}</a>
</body>
</html>
36 changes: 0 additions & 36 deletions src/audits/index.md

This file was deleted.

56 changes: 0 additions & 56 deletions src/developers/api-versioning.md

This file was deleted.

68 changes: 0 additions & 68 deletions src/developers/getting-started.md

This file was deleted.

43 changes: 0 additions & 43 deletions src/developers/index.md

This file was deleted.

16 changes: 0 additions & 16 deletions src/developers/terms.md

This file was deleted.

46 changes: 46 additions & 0 deletions src/redirects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
# This method of redirecting comes from user @warpfork
# https://github.com/11ty/eleventy/issues/510#issuecomment-824104799

# This file does hijinx with the "pagination" system to generate many small pages from one set of data...
# and uses that do to redirects from some URLs to others.
# We use this to try to keep old links working.
#
# There's limited power to this approach (it only works for specific pages listed; it can't glob),
# but those are limitations inherent to an approach that works via static site gen, rather than via server configuration.
# The related upside of an approach that works via static site gen is the portability.
pagination:
data: redirects
size: 1
alias: redirect
redirects:
# Search resources
- {"from": "/data/resources/", "to": "/search-resources/"}
- {"from": "/data/tribal/", "to": "/search-resources/tribal/"}
# API pages
- {"from": "/developers/", "to": "/api/"}
- {"from": "/developers/dictionary/", "to": "/api/dictionary/"}
- {"from": "/developers/getting-started/", "to": "/api/getting-started/"}
- {"from": "/developers/rollups/", "to": "/api/rollup/"}
- {"from": "/developers/differences/", "to": "/api/differences/"}
- {"from": "/developers/api-versioning/", "to": "/api/versioning/"}
- {"from": "/developers/terms/", "to": "/api/terms/"}
# Audit resources
- {"from": "/audits/", "to": "/audit-resources/"}
- {"from": "/resources/instructions/", "to": "/audit-resources/how-to/"}
- {"from": "/resources/workbooks/federal-awards/", "to": "/audit-resources/sf-sac/federal-awards/"}
- {"from": "/resources/workbooks/notes-to-sefa/", "to": "/audit-resources/sf-sac/notes-to-sefa/"}
- {"from": "/resources/workbooks/federal-awards-audit-findings/", "to": "/audit-resources/sf-sac/federal-awards-audit-findings/"}
- {"from": "/resources/workbooks/federal-awards-audit-findings-text/", "to": "/audit-resources/sf-sac/federal-awards-audit-findings-text/"}
- {"from": "/resources/workbooks/corrective-action-plan/", "to": "/audit-resources/sf-sac/corrective-action-plan/"}
- {"from": "/resources/workbooks/additional-ueis-workbook/", "to": "/audit-resources/sf-sac/additional-ueis-workbook/"}
- {"from": "/resources/workbooks/secondary-auditors-workbook/", "to": "/audit-resources/sf-sac/secondary-auditors-workbook/"}
- {"from": "/resources/workbooks/additional-eins-workbook/", "to": "/audit-resources/sf-sac/additional-eins-workbook/"}
# Info
- {"from": "/resources/instructions/user-access/", "to": "/audit-resources/user-access/"}
- {"from": "/info/updates/", "to": "/updates/"}
- {"from": "/info/updates/archive/", "to": "/updates/archive/"}
- {"from": "/info/announcements/", "to": "/omb/"}
permalink: "{{ redirect.from }}"
layout: redirect.njk
---

0 comments on commit 1b3127e

Please sign in to comment.