Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Tricat Lvl 2
Message 1 of 4

How to add multiple pages to my site

Solved! Go to Solution.

Im just learning how to use html and some basic CSS and I was wondering how I could add multiple pages without using Jekyll or any third party help. Is there anyway to do this using only html and the repo?

EDIT: What I ment was how do I link to another HTML file through my index.html file, I thought I did it right and it works when I try it offline but Im not sure how to get it to work through the repo copy. 

 

SITE: https://borealblizzard.github.io/

REPO: https://github.com/BorealBlizzard/BorealBlizzard.github.io

3 Replies
Solution
Tricat Lvl 3
Message 2 of 4

Re: How to add multiple pages to my site

You are using absolute path and you have to use relative path instead.

In the "a" tag replace:

<a href="https://BorealBlizzard.github.io/page1.html/">Page 2</a>

To:

<a href="page1.html">Page 2</a>

Same at page1.html file. Smiley Happy

Highlighted
Tricat Lvl 2
Message 3 of 4

Re: How to add multiple pages to my site

Thank You. Im supriesed I havn't seen that anywhere.

Tricat Lvl 3
Message 4 of 4

Re: How to add multiple pages to my site

Hi,

 

I just wanted to add a bit more information in regards to linking to pages in other directories. As iordic stated you can link to other pages in the current directory like so..

 

<a href="help/">Help</a>

 

This will link to the page "/my-project/help/", if you're viewing the page on your local file system you'll have to append index.html. (You can use a JS snippet like this to automatically append it, too) Once we're down one level in the directory you can do the following to link to pages up one level (or however many levels)

 

<a href="../">Home</a>

 

This link will take you back to the root-level of your project : "/my-project/," from "/my-project/help/." The dots ".." refer to a parent directory, you can chain them together (i.e. `href="../../../"`) depending how deep your page is. If you want to link to the current page, you can create a link like this :

 

<a href="./">Home</a>

 

The single dot "." refers to the current directory.

 

If you want some more examples, you can look over the code for one of my projects. It doesn't use Jekyll, just static HTML pages so it can be used online or offline without setting anything up.