Skip to content

Add redirects for marine life data network documentation pages#73

Open
Nesar976 wants to merge 3 commits intoioos:gh-pagesfrom
Nesar976:fix-redirects-marine-life-docs
Open

Add redirects for marine life data network documentation pages#73
Nesar976 wants to merge 3 commits intoioos:gh-pagesfrom
Nesar976:fix-redirects-marine-life-docs

Conversation

@Nesar976
Copy link
Copy Markdown

This PR adds redirects for legacy MBON documentation pages so they correctly point to the corresponding pages in the Marine Life Data Network documentation.

The following redirects were added:
• mbon-data-flow.html → marine_life_data_network/data-flow.html
• metadata-eml.html → marine_life_data_network/metadata-eml.html

No other content or files were modified. The changes are intentionally minimal and limited to addressing the redirect requirements described in Issue #68.

Fixes #68

@MathewBiddle
Copy link
Copy Markdown
Contributor

This requires the jekyll-redirect-from plugin. To keep our documentation sites easier to maintain, we don't use plugins. This could be something we might consider, but I'd hate to confuse our community with the addition of plugins.

@ocefpaf or @mwengren do you have opinions on adding jekyll plugins to our documentation pages?

@ocefpaf
Copy link
Copy Markdown
Member

ocefpaf commented Jan 26, 2026

I'm not familiar with plugins, but do we need the redirect? Can we remove the pages?

@srstsavage
Copy link
Copy Markdown
Contributor

@Nesar976 Did you test this locally?

@Nesar976
Copy link
Copy Markdown
Author

Nesar976 commented Jan 26, 2026

I tested this locally with bundle exec jekyll serve. The legacy URLs load directly and don’t actually redirect without using a plugin like jekyll-redirect-from. Since the project prefers not adding plugins, I wanted to flag this and confirm how you’d like to proceed. Happy to update the PR accordingly.

ii1 ii2 ii3

@srstsavage
Copy link
Copy Markdown
Contributor

Maybe not the most elegant solution, but adding the following tags seems to work well without a plugin (example for _docs/mbon-data-flow.md):

<meta http-equiv="refresh" content="0; url=https://ioos.github.io/marine_life_data_network/data-flow.html" />
<link rel="canonical" href="https://ioos.github.io/marine_life_data_network/data-flow.html" />

The old page partially loads before the browser follows the <meta> refresh tag to the new URL, but it seems to work reliably.

If we wanted to support this approach widely it could be added to an include in ioos/documentation-theme-jekyll, checking for the existence of redirect_to in the front matter:

{% if page.redirect_to %}
  <meta http-equiv="refresh" content="0; url={{ page.redirect_to }}" />
  <link rel="canonical" href="{{ page.redirect_to }}" />
{% endif %}

But like @ocefpaf mentioned, if it makes more sense to remove the pages and update any needed links maybe that's sufficient?

Reference: https://excessivelyadequate.com/posts/redirect.html

@Nesar976
Copy link
Copy Markdown
Author

Thanks for the feedback. To keep things simple and avoid plugins, I’ll update the legacy pages to use a lightweight meta refresh + canonical link so existing URLs continue to work and point to the new docs. I’ll push that shortly. Happy to remove the legacy pages instead if that’s preferred.

@Nesar976
Copy link
Copy Markdown
Author

I’ve pushed the update replacing redirect_to with a simple meta refresh and canonical link on the legacy pages. This avoids plugins while keeping existing URLs working and pointing to the new docs. Let me know if you’d prefer removing the legacy pages instead.

@srstsavage
Copy link
Copy Markdown
Contributor

@MathewBiddle @ocefpaf Any arguments against the meta refresh approach? Seems to work fine, is simple, and avoids plugins.

@ocefpaf
Copy link
Copy Markdown
Member

ocefpaf commented Jan 28, 2026

If we need the redirect, I'll leave that to @MathewBiddle, this approach is better than the plugin one. If not, I prefer to remove the pages rather than adding more stuff for future maintenance.

@MathewBiddle
Copy link
Copy Markdown
Contributor

Let's remove the unnecessary pages and be done. Most folks using the content here are/should be aware of the new website.

@Nesar976
Copy link
Copy Markdown
Author

Sounds good. Before I update the PR, could you please confirm which legacy pages you’d like removed? I want to make sure I’m deleting the correct files and not removing anything still in use.

@MathewBiddle
Copy link
Copy Markdown
Contributor

The pages that have the line

{% include warning.html content="As of 2024-09-13 the content on this website is currently being migrated to the Marine Life Data Network website <https://ioos.github.io/marine_life_data_network/>, please refer to the content there." %}

I think there are five:
https://github.com/search?q=repo%3Aioos%2Fmbon-docs%20%7B%25%20include%20warning.html%20content%3D%22As%20of%202024-09-13%20the%20content%20on%20this%20website%20is%20currently%20being%20migrated%20to%20the%20Marine%20Life%20Data%20Network%20website%20%3Chttps%3A%2F%2Fioos.github.io%2Fmarine_life_data_network%2F%3E%2C%20please%20refer%20to%20the%20content%20there.%22%20%25%7D&type=code

@Nesar976
Copy link
Copy Markdown
Author

Thanks for confirming. I’ve removed the five legacy pages that contained the migration warning include, as discussed. No other files were modified. Please let me know if anything else needs adjustment.

@Nesar976
Copy link
Copy Markdown
Author

Nesar976 commented Feb 4, 2026

Hi @MathewBiddle , @srstsavage
Just a gentle follow-up on this — I wanted to check if there’s anything else needed from my side or if the current changes look good to proceed. Happy to make any adjustments if required. Thanks!

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.

Redirect documentation pages for data flow and and how-to guide to marine_life_data_network docs

4 participants