Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display banner for versioned docs #1217

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sarjona
Copy link
Member

@sarjona sarjona commented Dec 20, 2024

William Entriken requested this at https://tracker.moodle.org/browse/MDLSITE-7820. To implement it, we're taking advantage of the banner setting: https://docusaurus.io/docs/versioning#configuring-versioning-behavior.

Use the banner parameter to display a message for old versioned docs:
https://docusaurus.io/docs/versioning#configuring-versioning-behavior
Copy link

netlify bot commented Dec 20, 2024

Deploy Preview for moodledevdocs ready!

Name Link
🔨 Latest commit 9a3700b
🔍 Latest deploy log https://app.netlify.com/sites/moodledevdocs/deploys/67652e37b874540008a0ce19
😎 Deploy Preview https://deploy-preview-1217--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🔴 43 🟢 95 🟢 100 🟢 90 🟢 100 Report
/docs/5.0/apis/commonfiles 🟠 59 🟢 93 🟢 100 🟢 100 🟢 100 Report
/general/development/gettingstarted 🟠 55 🟢 95 🟢 100 🟢 90 🟢 100 Report
/general/releases 🟠 58 🟢 95 🟢 100 🟢 100 🟢 100 Report

@andrewnicols
Copy link
Member

Can you give an example of where you want to use this?

we already have some custom version-specific banners

@andrewnicols
Copy link
Member

I’d prefer to do this in a different test. Check out how it looks sit. This patch on 4.1 for example

@sarjona
Copy link
Member Author

sarjona commented Dec 20, 2024

Hi @andrewnicols!
I'm not sure if I understand your question. The idea of this patch is to implement what William Entriken requested at https://tracker.moodle.org/browse/MDLSITE-7820:

Add a warning that you are reading version 4.4 of the docs but a newer version is available. https://moodledev.io/docs/4.4/apis/commonfiles/version.php

Docusaurus implements this with the banner setting, so the patch is enabling this, to display a banner at the top of all the versioned doc pages:
MDLSITE-7820_banner

@andrewnicols
Copy link
Member

Compare against the message here: https://moodledev.io/general/releases/4.1

this is what I want to show as it has version-specific information and is factually incorrect.

it is not correct to say that 4.5 is “no longer actively maintained”.

If I recall the existing banner shown here is meant to be shown on all pages of versioned docs and something has broken that. The Docusaurus banner is too limiting.

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.

2 participants