Navigation Menu Configuration
Customize your site’s navigation menu to include custom pages, external links, and bilingual labels.
What is the Navigation Menu?
The navigation menu appears in your site’s header and provides links to:
- Your stories (automatically generated)
- Custom pages (About, Credits, etc.)
- Objects index (automatically included)
- External resources (optional)
How It Works
Navigation is configured through _data/navigation.yml. This data-driven approach gives you complete control over menu structure and labels.
When navigation.yml exists, Telar uses it to build your menu. If the file is missing, a hardcoded fallback menu appears with basic links (Stories, Objects, About).
Creating Your Navigation File
Step 1: Create the File
Add navigation.yml to the _data/ directory:
_data/
├── navigation.yml # Your custom navigation config
├── objects.json # Generated objects data
└── project.json # Generated project data
Step 2: Define Your Menu Structure
Here’s a basic configuration:
menu:
- title_en: "Stories"
titulo_es: "Historias"
url: "/"
- title_en: "Objects"
titulo_es: "Objetos"
url: "/objects/"
- title_en: "About"
titulo_es: "Acerca de"
url: "/about/"
- title_en: "Credits"
titulo_es: "Créditos"
url: "/credits/"
Required Fields
Each menu item needs:
| Field | Purpose | Example |
|---|---|---|
title_en |
English label | "About" |
titulo_es |
Spanish label | "Acerca de" |
url |
Page URL | "/about/" |
Optional Fields
| Field | Purpose | Example |
|---|---|---|
external |
Opens in new tab | true |
Menu Item Types
Internal Pages
Link to pages within your site:
- title_en: "Methodology"
titulo_es: "Metodología"
url: "/methodology/"
The URL should match your page’s filename (methodology.md → /methodology/).
External Links
Link to external resources:
- title_en: "Project Archive"
titulo_es: "Archivo del Proyecto"
url: "https://archive.example.org"
external: true
When external: true, the link opens in a new tab with target="_blank".
Stories Homepage
Link to the stories list:
- title_en: "Stories"
titulo_es: "Historias"
url: "/"
Objects Index
Link to the objects catalog:
- title_en: "Objects"
titulo_es: "Objetos"
url: "/objects/"
Complete Example
Here’s a full navigation configuration for a research project:
menu:
# Stories homepage
- title_en: "Stories"
titulo_es: "Historias"
url: "/"
# Objects catalog
- title_en: "Objects"
titulo_es: "Objetos"
url: "/objects/"
# Custom pages
- title_en: "About"
titulo_es: "Acerca de"
url: "/about/"
- title_en: "Methodology"
titulo_es: "Metodología"
url: "/methodology/"
- title_en: "Team"
titulo_es: "Equipo"
url: "/team/"
- title_en: "Credits"
titulo_es: "Créditos"
url: "/credits/"
# External link
- title_en: "Full Archive"
titulo_es: "Archivo Completo"
url: "https://archive.example.org"
external: true
Bilingual Labels
How Language Selection Works
Telar displays menu labels based on your site’s language setting (telar_language in _config.yml):
- If
telar_language: en→ Showstitle_enlabels - If
telar_language: es→ Showstitulo_eslabels
Fallback Behavior
If a menu item is missing the appropriate language label, Telar falls back gracefully:
- Try current language label (
title_enortitulo_es) - If missing, try the other language
- If both missing, show URL as label
Menu Order
Menu items appear in the order you list them in navigation.yml:
menu:
- title_en: "Stories" # Appears first
...
- title_en: "Objects" # Appears second
...
- title_en: "About" # Appears third
...
Updating the Menu
Adding a New Page
When you create a new custom page:
- Create the markdown file (
components/texts/pages/contact.md) - Add it to
navigation.yml:
- title_en: "Contact"
titulo_es: "Contacto"
url: "/contact/"
- Rebuild your site
The menu updates automatically.
Removing a Page
To remove a page from the menu:
- Delete or comment out the entry in
navigation.yml:
# - title_en: "Old Page"
# titulo_es: "Página Antigua"
# url: "/old-page/"
- Rebuild your site
The page file can remain in components/texts/pages/ but won’t appear in navigation.
Reordering Items
Change the order in navigation.yml:
menu:
# Move "About" to the top
- title_en: "About"
titulo_es: "Acerca de"
url: "/about/"
- title_en: "Stories"
titulo_es: "Historias"
url: "/"
# Rest of menu...
Fallback Menu
If _data/navigation.yml doesn’t exist, Telar shows a hardcoded fallback menu:
- Stories (homepage)
- Objects (catalog)
- About (if
about.mdexists)
This ensures your site always has basic navigation, even without configuration.
Troubleshooting
Menu Not Updating
If your menu changes don’t appear:
- Check YAML syntax: Use a YAML validator to verify
navigation.ymlis valid - Rebuild the site: Run
bundle exec jekyll buildto regenerate - Clear browser cache: Use Ctrl+Shift+R (Cmd+Shift+R on Mac) to hard refresh
- Verify file location: File must be at
_data/navigation.yml(notdata/or_data/nav.yml)
Wrong Language Showing
If menu labels appear in the wrong language:
- Check
telar_languagein_config.yml - Verify you’re using correct field names (
title_enandtitulo_es, nottitleorlabel) - Ensure both language labels are present
External Link Not Opening in New Tab
Add the external: true field:
- title_en: "External Resource"
titulo_es: "Recurso Externo"
url: "https://example.com"
external: true # Required for new tab
Best Practices
Clear, Descriptive Labels
Use labels that clearly describe the destination:
✓ Good:
- title_en: "Research Methodology"
titulo_es: "Metodología de Investigación"
✗ Avoid:
- title_en: "Info"
titulo_es: "Info"
Consistent Ordering
Keep related items together:
# Project pages
- title_en: "About"
- title_en: "Team"
- title_en: "Methodology"
# Content pages
- title_en: "Stories"
- title_en: "Objects"
# External resources
- title_en: "Archive"
Limit Menu Length
Keep menus focused (5-7 items is ideal). For larger sites, consider grouping content differently or using footer links for secondary pages.
Related Documentation
- Custom Pages - Creating pages to link in navigation
- Configuration Reference - Complete
_config.ymloptions includingtelar_language - Customization Overview - Other customization options
New in v0.6.0: Customizable navigation with bilingual labels and external link support.