Internal Linking Conventions

This guide documents how to correctly create internal links in TSX components for the ColivingLiguria website.


Key Rule: Hyphens in URLs, Spaces in Filenames

Quartz automatically converts spaces in filenames to hyphens in URLs:

Filename in /content/URL Path
Active Contracts//Active-Contracts/
Contract for Event Organiser.md/Contract-for-Event-Organiser
Impianto Idraulico.md/Impianto-Idraulico

IMPORTANT

When writing href attributes in TSX, always use hyphens (not spaces).


How to Find Correct Paths

  1. Locate the .md file in the /content/ directory.
  2. Remove the .md extension.
  3. Replace spaces with hyphens (-).
  4. Prepend with / for an absolute path from the site root.

Example

File: content/Rules/Policies/Contracts/Active Contracts/Contract for Event Organiser.md

Correct URL:

<a href="/Rules/Policies/Contracts/Active-Contracts/Contract-for-Event-Organiser">...</a>

Common Pitfalls

❌ Wrong✅ Correct
/Rules/Policies/Contracts/Contract-for-Residents/Rules/Policies/Contracts/Passive-Contracts/Contract-for-Residents
/Houses/Renovation-Projects/BIM/Houses/Chiappella/Renovation/BIM
/People/Team/Team/People/Teams/Teams

TIP

Always verify the full path by navigating the /content/ directory. Don’t assume subdirectory names.


For external URLs (e.g., WhatsApp, GitHub), use target="_blank":

<a href="https://wa.me/393396379372" target="_blank">WhatsApp</a>
<a href="https://github.com/SimoneTestino/ColivingLiguria" target="_blank">GitHub</a>

Verification Checklist

Before committing link changes:

  • File exists in /content/ at the exact path
  • Spaces replaced with hyphens
  • No .md extension in URL
  • Full directory path included (e.g., Active-Contracts/, not just root)