How to add multiple pages to my site #23746
-
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 |
Beta Was this translation helpful? Give feedback.
Replies: 13 comments 2 replies
-
You are using absolute path and you have to use relative path instead. In the “a” tag replace:
To:
Same at page1.html file. 😃 |
Beta Was this translation helpful? Give feedback.
-
Thank You. Im supriesed I havn’t seen that anywhere. |
Beta Was this translation helpful? Give feedback.
-
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…
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)
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.
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. |
Beta Was this translation helpful? Give feedback.
-
I am unable to link the pages on my site. it shows 404 page not found |
Beta Was this translation helpful? Give feedback.
-
It Says 404 Not Found |
Beta Was this translation helpful? Give feedback.
-
Works now
|
Beta Was this translation helpful? Give feedback.
-
This was a great help and explanation to my problem thank you |
Beta Was this translation helpful? Give feedback.
-
How would I do it using markdown instead of HTML? Would I just refer it to
? Or is there something different I have to do? |
Beta Was this translation helpful? Give feedback.
-
Comme collect your drinks when you want. Premium advice right there.
|
Beta Was this translation helpful? Give feedback.
-
THANK YOU |
Beta Was this translation helpful? Give feedback.
This comment was marked as spam.
This comment was marked as spam.
-
how can i upload a multiple page website in github . My website needs 2 pages the home.html and index.html . But only index.html is shown in my online public website . How can i make the home page show first before the index one ? Please answer me ! |
Beta Was this translation helpful? Give feedback.
-
you can use relative path instead of absolute ;) |
Beta Was this translation helpful? Give feedback.
You are using absolute path and you have to use relative path instead.
In the “a” tag replace:
To:
Same at page1.html file. 😃