Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@welpo
Copy link
Owner

@welpo welpo commented Feb 2, 2025

Summary

Fix navigation menu handling of external URLs and update documentation to clarify external URL support.

Related issue

Fixes #480

Changes

This PR fixes a bug where external URLs in the navigation menu were being treated as relative URLs, resulting in incorrect paths like http://127.0.0.1:1111/https://example.com/. The fix:

  1. Adds URL type detection to check if URLs start with "http"
  2. Handles external URLs directly without using get_url()
  3. Updates documentation to clarify external URL support and usage

This implements the same fix that was previously applied to the footer menu (#212).

Type of change

  • Bug fix (fixes an issue without altering functionality)
  • New feature (adds non-breaking functionality)
  • Breaking change (alters existing functionality)
  • UI/UX improvement (enhances user interface without altering functionality)
  • Refactor (improves code quality without altering functionality)
  • Documentation update
  • Other (please describe below)

Checklist

  • I have verified the accessibility of my changes
  • I have tested all possible scenarios for this change
  • I have updated theme.toml with a sane default for the feature
  • I have updated config.toml in tabi-start
  • I have made corresponding changes to the documentation:
  • Updated config.toml comments
  • Updated theme.toml comments
  • Updated "Mastering tabi" post in English
  • (Optional) Updated "Mastering tabi" post in Spanish
  • (Optional) Updated "Mastering tabi" post in Catalan

@welpo welpo added the bug Something isn't working label Feb 2, 2025
@netlify
Copy link

netlify bot commented Feb 2, 2025

Deploy Preview for tabi-demo ready!

Name Link
🔨 Latest commit f75eedf
🔍 Latest deploy log https://app.netlify.com/sites/tabi-demo/deploys/679f71fe309e4c000842e3db
😎 Deploy Preview https://deploy-preview-481--tabi-demo.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.

@welpo welpo merged commit 5b5bdda into main Feb 2, 2025
8 checks passed
@welpo welpo deleted the fix/external-nav-urls branch February 2, 2025 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect handling of external URLs in the navigation menue

1 participant