Skip to content

Fix navigation bar anchor links#1

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-navigation-bar-structure
Draft

Fix navigation bar anchor links#1
Copilot wants to merge 3 commits intomainfrom
copilot/fix-navigation-bar-structure

Conversation

Copy link

Copilot AI commented Feb 17, 2026

Navigation links were broken due to URL/anchor ID mismatches. URLs contained extraneous dashes (/#-publications) while anchor IDs did not (#publications). Additionally, three sections lacked anchor elements entirely.

Changes

  • _data/navigation.yml: Removed dashes from fragment identifiers

    • /#-publications/#publications
    • /#-educations/#educations
    • /#-internships/#internships
  • _pages/about.md: Added missing anchor elements before section headers

    <span class='anchor' id='publications'></span>
    <span class='anchor' id='educations'></span>
    <span class='anchor' id='internships'></span>
  • .gitignore: Excluded vendor/ and .bundle/ directories

The navigation now renders: Homepage (hardcoded in masthead) → About Me → Publications → Educations → Internships, with all links properly resolving to their corresponding page sections.

Original prompt

The user wants to fix the navigation bar on their academic homepage.
Currently, it shows: Homepage, About Me, News, Publications, Honors and Awards, Educations, Invited Talks, Internships.
The user wants it to show ONLY:

  1. Homepage (Keep this as hardcoded in masthead.html)
  2. About Me (Link to #about-me)
  3. Publications (Link to #publications)
  4. Educations (Link to #educations)
  5. Internships (Link to #internships)

Tasks:

  1. Update _data/navigation.yml to contain only "About Me", "Publications", "Educations", and "Internships" with correct URLs (remove the extra '-' in '/#-publications' etc.).
  2. Update _pages/about.md to ensure headers for Publications, Educations, and Internships have corresponding HTML anchors or consistent IDs that match the navigation links. For example, add <span class='anchor' id='publications'></span> before the Publications header.
  3. Ensure "Homepage" remains in _includes/masthead.html but the loop for other items works correctly.

The current _data/navigation.yml seems to have some of these changes but the user reports it's not working (likely due to URL mismatches or deployment delay). I will force the correct state.

Current image of the problem: image1

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 17, 2026 16:24
Co-authored-by: cqu-student <68796008+cqu-student@users.noreply.github.com>
Co-authored-by: cqu-student <68796008+cqu-student@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix navigation bar on academic homepage Fix navigation bar anchor links Feb 17, 2026
Copilot AI requested a review from cqu-student February 17, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants