Adding README.md to Hexo on GitHub Pages - github

I built a Hexo blog and hosted it on GitHub Pages. Since Hexo has no default README.md file, I'd like to add one myself.
I manually added the README.md through the console as 'hexo deploy'. The README file disappeared.
Then I copied the README file into a non-specific local folder and redeployed the website. Hexo parsed the README.md file into README.md.html, which I'm not interested in.
Adding README.md into the public or .deploy folders and running 'hexo g' also results in deleting the file.
Suggestions?

I have answer a same question here.
you must do as follow two steps:
put README.md under source folder.
declare REAMDE.md after skip_render field in _config.yml.
this method is suit for hexo 3.0.1, and I have successed.

Related

Github pages is showing my ReadMe file not the html file?

Why is my github pages showing my readme file and not the index.html?
repo:
https://github.com/TomAk1993/To-do-list
githubpages:
https://tomak1993.github.io/To-do-list/
Not seeing any index.html file in your github. If todolist.html is the one refering to, maybe try renaming it to index.html. That should work.

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.

why everytime readme file is being published?

I am struggling to figure out why the only thing I see on github page is the read me file.
I followed the instructions to publish to a github page here :
https://abhiverma04.github.io/dummycv/
my repo
https://github.com/abhiverma04/dummycv
Looks like readme.md takes priority over index.html.
You can either make orphan gh-page branch and put all your files (except readme.md) to this branch. Or create /docs folder and copy all your files to the /docs folder except of readme.md. And after this action enable the relevant sourcesetting in GitHub pages as it is described in the GitHub documentation

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.

Configure github to use some other file as README

Because of how Eclipse and EGit organize files and directories, I have my README.md file not in the root directory of my git repository but one folder deeper. How can I tell github to show some_folder/README.md as project's readme?
In the root directory of your repo, create a folder named .github.
Create a file named README.md in this folder.
Save the relative path of the file you want to use as the repo README in .github/README.md.
This causes README.md to be interpreted as a symbolic link (symlink) file.
Example:
This repo has files named README.md and cmod-readme.md in its root directory. Normally the former would be used as the README shown on the repo's main page, but instead the latter is used.
The repo contains a .github/README.md file, which contains the relative path to cmod-readme.md, i.e., ../cmod-readme.md.
The fact that GitHub will follow symlinks when locating a repo's README doesn't seem to be documented, although the .github folder is mentioned on this page in GitHub's docs:
If you put your README file in your repository's root, docs, or hidden .github directory, GitHub will recognize and automatically surface your README to repository visitors.
It's also interesting that (based on the example repo linked above) GitHub apparently prioritizes the README.md file in .github over a file of the same name in the respository's root.
This seemed to do it for me:
https://stackoverflow.com/a/49981731/7452130
Github wouldn't interpret my .github/README.md file as a symlink unless I created a symlink on my system and then pushed it.