Skip to content

[WEB-3950] Simplified docs routing, port page content from YAML to JSON #2383

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

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

jamiehenson
Copy link
Member

@jamiehenson jamiehenson commented Jan 15, 2025

There's a lot of file bluster in this PR but the purpose is quite simple. It does three things:

  1. take the remaining YAML page furniture (just the homepage) and port it to a JSON structure to resemble the nav data structures
  2. take all of the internal links inside the Textile files, and add a /docs prefix
  3. remove all conditional path prefixing logic

The result is a lot more simplicity around page routing - links are as they are, there's no more conditional "other" logic when comparing to the main site.

Review site: https://ably-docs-web-3950-norm-xg6o5u.herokuapp.com/docs

Word of bot

This pull request includes various updates to documentation links and configuration files. The main changes involve updating URLs to ensure consistency and accuracy, as well as removing redundant configurations.

Documentation Updates:

Configuration Changes:

  • Updated the node orb version in .circleci/config.yml from 5.2.0 to 5.3.0.
  • Removed redundant nginx rewrite rules for /docs in config/nginx.conf.erb.

Testing and Cleanup:

  • Removed the test for nginx /docs rewriting in the CircleCI configuration.

Summary by CodeRabbit

  • Documentation
    • Updated all documentation links to use a new “/docs” prefix.
    • Ensured a consistent and clear navigation structure across all help resources.
    • Enhanced the clarity of API, authentication, channels, pricing, push notifications, and other reference materials for end-users.

Copy link

coderabbitai bot commented Jan 15, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This pull request makes widespread documentation updates across numerous files. Nearly all URL references––whether in redirect paths, inline hyperlinks, or reference links––have been changed to include a /docs prefix for a consistent documentation structure. In addition, a few deprecated properties in a client options file were removed.

Changes

File(s) Change Summary
content/** (including files under account, api, asset‑tracking, auth, basics, channels, chat, connect, general, getting‑started, livesync, metadata‑stats, partials, platform, presence‑occupancy, pricing, protocols, pub‑sub, push, root, spaces) Updated hyperlinks, inline references, and redirect_from paths to include a /docs prefix, standardizing all documentation URLs to the new structure.
content/partials/types/_client_options.textile Removed deprecated properties (tls, idempotentRestPublishing, fallbackHosts, useBinaryProtocol) and updated associated documentation links accordingly.

Poem

Hop, hop, I’m the doc‐updating bunny,
Hopping through links and paths so sunny,
Every URL now proudly wears /docs on its tail,
Neatly aligned and never to fail,
I nibble on changes with a joyful heart,
Celebrating clear docs––a true work of art!


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ably-ci ably-ci temporarily deployed to ably-docs-web-3950-norm-k6n8uf January 15, 2025 17:13 Inactive
@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from ed97940 to cc77806 Compare January 15, 2025 17:13
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-k6n8uf January 15, 2025 17:14 Inactive
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-k6n8uf January 15, 2025 17:31 Inactive
@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from dfb96f0 to 481033c Compare January 15, 2025 17:38
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-k6n8uf January 15, 2025 17:38 Inactive
@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from 481033c to a830666 Compare January 15, 2025 17:42
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-k6n8uf January 15, 2025 17:42 Inactive
@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from a830666 to 0443772 Compare January 16, 2025 13:59
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-k6n8uf January 16, 2025 14:00 Inactive
@jamiehenson jamiehenson changed the title Web 3950 normalised docs routing [WEB-3950] Simplified docs routing, port page content from YAML to JSON Jan 16, 2025
@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from 0443772 to 1478e0c Compare January 16, 2025 14:15
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-k6n8uf January 16, 2025 14:16 Inactive
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-k6n8uf January 16, 2025 14:29 Inactive
@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from 1368333 to 497a41f Compare January 16, 2025 14:30
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-k6n8uf January 16, 2025 14:30 Inactive
@jamiehenson jamiehenson force-pushed the web-4082-docs-nav-redesign branch 2 times, most recently from bb08d1a to f3cf6b0 Compare January 16, 2025 15:10
@jamiehenson jamiehenson force-pushed the web-4082-docs-nav-redesign branch 5 times, most recently from d2aa49e to b386ccb Compare February 3, 2025 11:45
@kennethkalmer kennethkalmer force-pushed the web-3950-normalised-docs-routing branch from 497a41f to 5e9dd03 Compare February 6, 2025 15:58
@jamiehenson jamiehenson force-pushed the web-4082-docs-nav-redesign branch 3 times, most recently from 98236b7 to d37f16a Compare February 17, 2025 17:47
Base automatically changed from web-4082-docs-nav-redesign to main February 18, 2025 13:05
@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from 5e9dd03 to f9ef027 Compare February 19, 2025 12:00
@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from 4567470 to dce810a Compare February 24, 2025 16:19
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-xg6o5u February 24, 2025 16:19 Inactive
expect(__PATH_PREFIX__).toBe('/docs');

const { getByTestId } = render(<StaticImage src="/images/example.png" />);
const { getByTestId } = render(<StaticImage src={'/docs/images/example.png'} />);
Copy link
Member

Choose a reason for hiding this comment

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

@jamiehenson I think these should not actually have changed and they are hiding an issue that we see as broken images on the homepage.

The src on the homepage for LiveSync is /docs/static/1740413963000127948506/bf86f/livesync.png but on disk the asset is at public/static/1740413963000127948506/bf86f/livesync.png, so no /docs in the path.

When we deploy to production the value of ASSET_PREFIX kicks in and the src will be https://docs.ably.com/static/1..../livesync.png, solving the routing issue through the website.

@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from dce810a to 7021f8d Compare February 25, 2025 12:32
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-xg6o5u February 25, 2025 12:32 Inactive
@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from 7021f8d to afafbe4 Compare February 25, 2025 12:45
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-xg6o5u February 25, 2025 12:45 Inactive
@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from afafbe4 to 5172bf8 Compare February 25, 2025 12:55
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-xg6o5u February 25, 2025 12:55 Inactive
@jamiehenson
Copy link
Member Author

Alright @kennethkalmer I think I've got the right end of it this time - I've also taken the opportunity to convert a few gatsby config files to TS. This is in the third commit, the only logical difference is the removal of pathPrefix, as suggested.

I've also updated a few more textile replacements that were missed (relying on regex this time instead of bots), and undone the StaticImage change as mentioned above.

Review link here: https://ably-docs-web-3950-norm-xg6o5u.herokuapp.com/docs

@kennethkalmer
Copy link
Member

@jamiehenson initial impressions look good! I'm gonna rebuild the review app with the ASSET_PREFIX set to itself so we can spot any issues not visible now 🤞

@kennethkalmer kennethkalmer temporarily deployed to ably-docs-web-3950-norm-xg6o5u February 25, 2025 14:33 Inactive
Copy link
Contributor

@m-hulbert m-hulbert left a comment

Choose a reason for hiding this comment

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

Checked as many links as I could manually and using search. Only came up with the one that I've commented on 👌

@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from 5172bf8 to fe08395 Compare February 25, 2025 15:50
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-xg6o5u February 25, 2025 15:50 Inactive
@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from fe08395 to d408672 Compare February 25, 2025 15:58
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-xg6o5u February 25, 2025 15:58 Inactive
Copy link
Member

@kennethkalmer kennethkalmer left a comment

Choose a reason for hiding this comment

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

After switching the ASSET_PREFIX things still worked as expected on the review app 🎉 .

I think we're good to go, but keep an eye on ContentKing for alerts after this goes live

@jamiehenson
Copy link
Member Author

Sweet, will kick this off tomorrow and keep watch 🏰

@jamiehenson jamiehenson force-pushed the web-3950-normalised-docs-routing branch from d408672 to 4ecd317 Compare February 26, 2025 12:20
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-3950-norm-xg6o5u February 26, 2025 12:20 Inactive
@jamiehenson jamiehenson merged commit 50ae89b into main Feb 26, 2025
5 checks passed
@jamiehenson jamiehenson deleted the web-3950-normalised-docs-routing branch February 26, 2025 12:25
@m-hulbert m-hulbert mentioned this pull request Apr 11, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants