Hugo website on GitHub not showing themes - github

My Hugo website is configured to publish in a folder called docs, which is the source (master/docs) for the website on my GitHub repo; however, the website itself won't show any css/js.
I've tried manually changing the reference for css in the index.html file so that the path is khobbs3.github.io/docs/main.....css but that doesn't seem to help either.
The repo: https://github.com/KHobbs3/ktechnology
The website:
https://github.com/KHobbs3/ktechnology
RESOLVED: set up new repos following https://gohugo.io/hosting-and-deployment/hosting-on-github/ tutorial.
Published site: http://khobbs3.github.io

It looks like there are no CSS /js files on the static folder. Hugo uses the static folder to render the js and CSS files and also for images.

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.

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

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

Apply GitHub pages theme on existing html

I have an existing GitHub project that already had a few html pages. Now I made a GitHub pages site of the project using the docs folder in the master branch but when I try to apply an existing jekyll theme to the pages, the theme is not applied. The docs folder contains a file named index.html.
Do I need to add some kind of import statement to my html pages or do I really need to convert them to markdown syntax? Maybe I am doing something wrong here?
The GitHub project is found here
The GitHub pages site for my project is here
From a plain HTML website to a Jekyll website
If you want a plain html website to use layouts, you start your html pages with:
---
layout: page
---
You can freely rename your files from .html to .md, as it is allright for .md pages to contain HTML. Next you simply create your page.html layout file in the _layouts directory.
Using a Github pages theme
If you want to use a Github theme, you can download the theme and put the files in the root. You can achieve the same by just adding this sinlge line to your _config.yml:
theme: jekyll-theme-hacker
The theme name here is 'jekyll-theme-hacker'. Optionally, if you'd like to preview your site on your computer, add the following to your site's Gemfile:
gem "github-pages", group: :jekyll_plugins
Source: https://github.com/pages-themes/hacker#usage
If you have a _layouts directory containing files with the same name as the new theme layout files, they will have precedence over the theme files.
This is the way Jekyll makes it possible to customize themes.
In this case remove the _layouts directory and Github pages will use the desired theme.

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.

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