htmlhyperlinkgithub-pagesmultipage

How do I link pages in GitHub Pages


Essentially I am trying to link to my my GitHub Pages index.html file to the other files in the repository to make a multi page website.

The URL is correct, I have tried a bunch of ways and I am simply getting no where. The main branch is called home, in it is the index.html file, as well as the other files, see below:

Main Branch is called home

The links inside the html file are:

<li class="masthead__menu-item">
          <a href="https://xxx.github.io/home/research/">Research</a>
        </li>

The file "research" is inside the home branch. I have tried naming it "research.html" I have tried deleteing the "home" from the above link so it directly links to research, see below:

<li class="masthead__menu-item">
          <a href="https://xxx.github.io/research/">Research</a>
        </li>

Nothing seems to work. What am I doing wrong?


Solution

  • Looking at the screenshot and the html you provided, I don't see any *.html extensions following the name of the files you're trying to link to.

    For example: try renaming the file "research" to "research.html"