Skip to content

Conversation

nginx-jack
Copy link
Collaborator

@nginx-jack nginx-jack commented Jul 25, 2025

I know. I can't help myself. More redocly changes.

This removes the concept of a redocly "layout" in hugo, and instead, uses it as a standard partial in our default single.html .
The main benefit of this is that you can have other content on a page besides redocly.

The frontmatter you need:

tags:
  - api
doctypes:
  - reference
nd-api-reference: "./api/example.json"

This stops the redocly js files loading on every page.

This implementation essentially uses a css breakout, to make it spread beyond the grid.
It's still using the data-grid attribute.

Examples across all three types of media queries.

Screenshot 2025-07-29 at 15 08 21 Screenshot 2025-07-29 at 15 08 12 Screenshot 2025-07-29 at 15 07 54

@nginx-jack nginx-jack requested a review from a team as a code owner July 25, 2025 12:32
Copy link

Deploy Preview will be available once build job completes!

Name Link
😎 Deploy Preview https://frontdoor-test-docs.nginx.com/previews/nginx-hugo-theme/329/

@lamATnginx
Copy link
Collaborator

Do we want tiny redocly width?

@nginx-jack
Copy link
Collaborator Author

Do we want tiny redocly width?

Let me see if there's an easy way to expand it beyond our max content grid size 🤔

@danielledeleo
Copy link
Contributor

Redocly really needs to be full width. It's really unusable and looks awful when it's letterboxed inside our docs.

@danielledeleo
Copy link
Contributor

Screenshot 2025-07-29 at 12 06 06 PM

@danielledeleo
Copy link
Contributor

The Redocly search field is hidden by the floating navbar when scolling.

Screenshot 2025-07-29 at 12 11 29 PM Screenshot 2025-07-29 at 12 11 52 PM

Copy link
Contributor

@danielledeleo danielledeleo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove side padding, add gray borders top and bottom.

Scrolling hides the Redocly sidebar behind the navbar.

@lamATnginx lamATnginx merged commit f00d54e into mainframe Aug 12, 2025
4 checks passed
@lamATnginx lamATnginx deleted the redocly-shortcode branch August 12, 2025 15:19
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.

4 participants