6

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?

Roman10
  • 115
  • 1
  • 6

3 Answers3

5

After hours and hours of trying things, I finally got it to work:

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

What I did was to get rid of the "home" and make the page an html file. Thank you iamabdm and minwka!

Roman10
  • 115
  • 1
  • 6
  • Glad, your problem is solved. Therefore 'xxx.github.io' must be your custom subdomain. – m24197 Apr 26 '21 at 02:21
  • Yes, such noob and silly mistake, but I reached out to you guys and it shook something in the old neurons. It finally worked! Much appreciated! – Roman10 Apr 26 '21 at 12:56
1

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"

minwka
  • 36
  • 3
0

If the file is a html file then the problem is with the address of the URL i.e. https://xxx.github.io/research/ in <a href="https://xxx.github.io/research/">Research</a>.

The last slash is causing the problem. Remove the last slash from the address, i.e. https://xxx.github.io/research and it will be <a href="https://xxx.github.io/research">Research</a>.

m24197
  • 1,038
  • 1
  • 4
  • 12