Render Hook Tests

2 minutes

Render Hook Test Page

This page tests the custom Hugo render hook for link handling. The render hook automatically processes external links and supports bracket-based overrides.

These links should automatically open in new tabs with nofollow:

These links should remain unchanged (no target="_blank", no nofollow):

Example.com - External link that should NOT open in new tab

About Page - Internal link that SHOULD open in new tab

Control Nofollow Behavior

Partner Website - External link with forced nofollow Trusted Docs - External link with nofollow prevented

Combined Controls

Special External Link - External link that won’t open in new tab and won’t have nofollow

Edge Cases

Expected Behavior Summary

Link TypeExpected Result
External https://target="_blank" rel=“nofollow noopener noreferrer”
External http://target="_blank" rel=“nofollow noopener noreferrer”
Internal /pathNo special attributes
[nt]ExternalNo target="_blank"
[ot]Internaltarget="_blank"
[nf]AnyForces nofollow
[f]ExternalNo nofollow attribute

Testing Instructions

  1. Build the site: hugo server -D
  2. Open this page in browser
  3. Right-click each link and inspect element
  4. Verify attributes match expected behavior
  5. Test actual link behavior (new tab vs same tab)