Github repo url displaying readme.md instead of index.html - github

My repo on Github is only displaying the readme.md when I open the url. I have my index.html in a public folder along w/ a stylesheet.
I'm using tailwind and I followed along w/ a youtube tutorial video and thats how his setup was. I looked it up and read that the index should be living in the same location as the readme.md, because github pages is deploying the root, I tried moving my html out of the public folder and where the readme.md is and I'm still having the same issue.
Any help or suggestions would be appreciated, I'm fairly new at coding so I'm sure there's a simple solution to this that I just haven't thought of or know of.
Here is the repo/docs:
https://github.com/RachelNapier/writers_block_landing_page
And here is the repo URL:
https://rachelnapier.github.io/writers_block_landing_page/
Thanks so much, in advanced!

You can only use repository root or the docs folder to host your index.html, see this
If you move your files under the public folder to the root and configure Github pages to use the root folder under your target branch, it would be ok:
For instance, I've forked your repo and moved the files accordingly here, it gives :
https://bertrandmartel-bot.github.io/writers_block_landing_page/
Also, you would need to replace relative links to ../images by images/ like here

Related

Unable to host project to GitHub Pages

My repo: https://github.com/shoegazzz/simple-trello-clone
When following a link https://shoegazzz.github.io/simple-trello-clone/ :
404 File not found The site configured at this address does not contain the requested file. If this is your site, make sure that the filename case matches the URL. For root URLs (like http://example.com/) you must provide an index.html file. Read the full documentation for more information about using GitHub Pages.
I read the documentation, watched videos and discussions on the topic, renamed the repository to the username, but it still does not work. Tell me what should be done here?
first things first: please leverage the usage of the .gitignore file (in the root directory of your repository). You can copy-paste the content provided in this file: https://github.com/github/gitignore/blob/main/Node.gitignore into your .gitignore file. This will ignore the node_modules directory from getting staged and ultimately from getting pushed into the repository.
Now, the problem you described occures when there is no information for GitHub Pages. GitHub Pages is searching for an index.html which isn't there, as by default GitHub Pages is watching the root directory of your repository.
Please have a look at GitHub Actions to Deploy your project to GitHub Pages. This is the best source I could find in a short matter of time: https://github.com/gitname/react-gh-pages
If you have any follow-up questions, feel free to ask.
TL;DR: You need to provide the built static-website content for GitHub Pages to work with.

Display README.md in repository directories

Github repo I'm referencing: https://github.com/Dallas-Marshall/PersonalProjects/tree/master/discord_bot
I have a Personal Projects Repository on Github and have a README.md file in the root folder explaining the repo. However, the issue I am having is that inside a directory of the repo I have created another README.md file to explain that specific project but Github is not displaying it.
I have ensured the file is named correctly, is up to date on Github and have scanned settings to try and find an option to display it to no avail as yet.
Does anyone know how to get this file to display when viewing the directory that I have linked above.
Many Thanks,
Dallas Marshall
Your readme in the linked repo folder is empty. GitHub will start displaying it once it got content in it.

Page Build Error from static /docs folder on Github Pages

I have a static site, built locally by Jekyll, in a /docs folder inside the master branch of my repo, and have set my GH Pages settings to serve from that folder.
However, I keep getting Your site is having problems building: Page build failed. For more information, see https://help.github.com/articles/troubleshooting-github-pages-build-failures.
Some notes:
The repo itself is a Jekyll project, however, as I am using a private submodule GH Pages won't serve this as a Jekyll site, therefore this is why I have compiled the site locally to /docs and set this to be where GH Pages serves from.
The files in /docs are all compiled and just HTML, CSS and JS. No folders or files with _ preceding.
I have added .nojekyll in both the /docs folder and also in the root of the project, just in case.
The error message above is the only information GitHub is returning; no specific error code.
As far as I can tell, this is just a basic static website and GH should have no problem serving it. The only thing I can think is that it's getting confused by the fact that it's inside a jekyll project, but the only fix I can see for that is .nojekyll and that hasn't worked.
Does anyone have any ideas? I'm afraid I can't share the repo as it is a private company repo.
Posting this answer immediately so others may find it useful.
The private submodule breaks the build process, even though the pages site is set to serve from the /docs subfolder. Removing the submodule fixes the issue and serves the site as expected.

is it possible to change where github pages looks for index.html?i

I have searched alot but I can't find a solution. I'm using middleman aand my directory structure is like this
Project
--Source
---javascript
---stylesheets
---index.html.erb
---submit.html.erb
When I deployed my project on github and tried to access the site it's giving me 404 error that it cannot find the index.html page can you tell me that if there is a way I can change the link to index.html
I have tried this solution but this does not works
Can I have my Github Pages index.html in a subfolder of the repository?
Here's the link to my git repo
https://github.com/Gardezi1/Gardezi1.github.io

How to save both my _site and jekyll build on github

Right now i have the following setup:
My jeyll build is in ~/jekyll-sites
My .git folder is in ~/jekyll-sites/_site
I'm now able to sync the jekyll generated ~/jekyll-sites/_site with my repo at: https://github.com/nielsrasmus/nielsrasmus.github.io
and it works perfect.
But i would also like to to save the whole jekyll build on github.
The question is:
Is it possible to make another repo called: nielsrasmus.github.io-source and sync the whole jekyll build here?
If so, what would be the best way to do it?
I've looked at so many answers that does not quite match what I want. So I'm pretty confused right now :-/
As long as you're not using any Jekyll plugins, you can actually push your Jekyll source to Github, and their servers will automatically generate the _site folder and serve it for you. You won't see this _site directory show up in your repository, but the generated files will be accessible from http://nielsrasmus.github.io
A great reference for how to do this is Tom Preston-Warner's personal blog, which is (naturally) hosted on Github Pages. Note that he placed the _site directory in his .gitgnore file, and Jekyll says "it's probably a good idea" for you to do the same, but you might be able to skip this part.
Both you and Tom are using the User Pages option, so your site gets generated as long as your content is in the Master branch (if you were using Project pages, it would use the gh-pages branch instead).
I think I solved the issue.
I installed the mac version of github and fiddled around, read a lot of man pages and finally I could make it happen :-)
What helped me was to click on the + sign in the bottom of the screen, as shown on the screenshot. Here I could point my repos at a local dir.
nielsrasmus/jekyll-sites: points to the root of the jekyll build.
nielsrasmus/nielsrasmus.github.io: points to the generated site at ~/jekyll-sites/_site