Github pages 404ing on single file - github

I have a built react app in the docs directory of my project. The project is set to have it's github page source to that directory. All that works fine.
https://pgooch.github.io/find-your-ross/#/
As you can see, it all works, notably the image assets, which are located here.
https://github.com/pgooch/find-your-ross/tree/master/docs/static/media
While all of that works absolutely great, the markdown file in that directory 404's.
https://pgooch.github.io/find-your-ross/static/media/_linked_readme.d73385c3.md
The file appears in the repo as you'd expect (it's at the very bottom of the list). I have; waited more than 8 hours, tried different browsers on different devices, and checked that the permissions were good, confirmed that the file names were cased the same. No difference. This file 404s when viewed directly or fetched (as can be seen by clicking about).

The reason why the _linked_readme.d73385c3.md file is not coming up on GitHub pages is due to Jekyll ignoring the file which has a name starting with an underscore.
If you are not using Jekyll, just add an empty .nojekyll file within the docs folder. You can just create the file and commit it on GitHub UI or create the file on your local machine, commit it and push it to the GitHub repo. Once the file is added within the docs folder, the _linked_readme.d73385c3.md file will come up on your GitHub pages site.
Or if you have the option of renaming your file, just drop the underscore at the beginning of the file and rename it from _linked_readme.d73385c3.md to linked_readme.d73385c3.md.
Reference: GitHub

Related

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.

CONTRIBUTING.md does not render as a web page on github pages

i'm in the process of moving my contributing.md file from the project root to the docs/ directory so it can be with the rest of the documentation. Other markdown files in docs render properly when viewed in github pages. For example, the page
https://jtablesaw.github.io/tablesaw/userguide/toc
renders the page toc.md as expected.
however,
https://jtablesaw.github.io/tablesaw/contributing
returns a 404, while simply adding the .md extension
https://jtablesaw.github.io/tablesaw/contributing.md
returns the page as markdown source
The github project is https://github.com/jtablesaw/tablesaw.
and the contributing.md file is in the docs/ folder.
Zachary's answer is correct but there is a way to modify the jekyll's configuration to include the specific page.
Here is an example: https://masterex.github.io/test-docs/contributing
You have to modify _config.yml as follows:
theme: jekyll-theme-minimal
include: contributing.md
Here is github's relevant help page.
After forking your repo, playing around with it for a bit, and banging my head against the wall because I didn't understand why it wasn't working, I realized something:
Github Pages doesn't support building Jekyll pages from files that have names that Github recognizes for other purposes. These file names include (in addition to their lowercase versions):
CONTRIBUTING.md
ISSUE_TEMPLATE.md
PULL_REQUEST_TEMPLATE.md
ISSUE_AND_PULL_REQUEST_TEMPLATE.md
CODEOWNERS.md
On the other hand, despite that README.md is also a Github keyword file, it looks like Github Pages supports using files with the README.md name because it purposely will interpret them the same way as an index.md or index.html file. See this link from the Github blog for more information.
To answer your specific question on how you could get the file to show at the /tablesaw/contributing path, you could rename it and move it to the /docs/contributing/index.md or /docs/contributing/README.md path.
U̶n̶f̶o̶r̶t̶u̶n̶a̶t̶e̶l̶y̶,̶ ̶a̶t̶ ̶l̶e̶a̶s̶t̶ ̶i̶n̶ ̶t̶h̶e̶ ̶p̶r̶e̶s̶e̶n̶t̶,̶ ̶t̶h̶e̶r̶e̶'̶s̶ ̶c̶u̶r̶r̶e̶n̶t̶l̶y̶ ̶n̶o̶ ̶w̶a̶y̶ ̶t̶o̶ ̶k̶e̶e̶p̶ ̶i̶t̶ ̶w̶i̶t̶h̶ ̶t̶h̶e̶ ̶s̶a̶m̶e̶ ̶f̶i̶l̶e̶ ̶n̶a̶m̶e̶ ̶a̶n̶d̶ ̶h̶a̶v̶e̶ ̶G̶i̶t̶h̶u̶b̶ ̶P̶a̶g̶e̶s̶ ̶b̶u̶i̶l̶d̶ ̶a̶ ̶p̶a̶g̶e̶ ̶f̶o̶r̶ ̶i̶t̶.̶
Edit: #Master_ex notes correctly that you can use the include configuration option in the _config.yml file to include files that would normally be excluded by Github:
theme: jekyll-theme-minimal
include: contributing.md
In reference to the original example, this will allow Github Pages to build a page successfully at the /docs/contributing path.

GitHub gives "This file is empty" for obviously non-empty files & folders

I'm trying to upload some project files into a GitHub repository. The files are a small Maven project, nothing out of the ordinary. However, when I try to upload them through GitHub's GUI, it uploads only some of the files, namely assembly.xml and pom.xml; for others, it simply displays the message "This file is empty", which makes absolutely no sense, since the folder I'm trying to upload is obviously not empty, it's "src", containing the source code and some other resources.
I'm just stumped here. What the hell? I've read through all the tutorials and they all pass this by without a second thought. This must be a bug or a quirk of some kind.
Actually I also had the same issue with github .According to me you would be having an empty file in the src folder which stops the uploading of other files

Keeping essential config/configure files hidden on public Github forks

I wish to fork a Github project that has config/configure files within it.
How can I run it alongside my desktop and live website project. But ensure that my config/configure files used on my desktop and live website (with all my db usernames etc) never get accidently copied/pushed over?
this is about envoronment setting. what i saw before is one can have different settings of config in the same location and the program can use an environment variable to determine what configs to be loaded. In addition, confidential settings should be saved in env variable instead of github. hope this helps.
Consider using .gitignore file.
If you create a file in your repository named .gitignore, Git uses it to determine which files and directories to ignore, before you make a commit.
Read more here.

File shows up in the list of files to commit in GitHub for Windows whereas it is present in .gitignore?

I use GitHub for Windows. How comes dstc1/dstc_scripts_src/score.csv shows up in the list of files to commit whereas it is present in .gitignore?
Looks like the .csv was accidentally committed to the repo, so it showed up despite the .gitignore rules.
If a file is in the repo then it will show up regardless of what .gitignore says about it -- it's a behavior listed in the docs, you can check out the Notes section as well for a few details.
Here's a similar issue with steps on how to get out of it.