github pages ruhoh theme not working - html

I'm using ruhoh (a static site generator) to set up a github pages site. Ruhoh has generated a index.html file associated with its default theme, but github is insisting that the file does not exist. You can see the code here: https://github.com/madCode/madcode.github.io/blob/master/index.html
and the url here: http://madcode.github.io/index.html
As you can see I'm getting a 404 file not found error. I'm not sure what I'm doing wrong. Maybe it has something to do with the generated html?

Related

How to create a custom HTML page in a Hugo website?

I want to add a custom HTML page to my Hugo website here, with its github repo here.
I do not want the Hugo theme to be used in this custom html page, all the needed css/javascript and some html is already in the custom_page.html.
I already found a useful questions/answer, here, but it does not work for me. I do not know why... maybe I don't understand the link I have to use to point to this custom page.
Here is what I have tried :
I have a custom_page.html in the content folder (also tried in the static folder) and I add in a post blog/_index.Rmd the link to what I think could work with the following :
[link](\content\custom_page.html) (when the file is in the static folder I used : [link](\static\custom_page.html) )
I always end up with a 404 page not found
Any advice on how to proceed ?

How to change file for Github pages?

i need a little help...
Actually i have made a GitHub page but i want to change the file which is being displayed to the website made by me ...
Actually it's a .md file and i made a html file...
Now i want to change the file which is being displayed in the site.
I want to switch from .md to html file which is already in my repo for GitHub pages.
If anyone knows how to deal with it, please help
I'm also adding my github repo link : https://github.com/S2Sofficial/swaroop2sky
And here is the github page link:
https://s2sofficial.github.io/swaroop2sky/
Create index.html file, and it will work as your home page.
OR
simply, change the file name of Welcome to Swaroop2sky _ swaroop2sky.html to index.html.
You can not show your website on GitHub page.
You can include html tags in README to format text.
GitHub does not support html format for README. See answer on StackOverflow about README formats.
GitHub does not support iframe either. See answer on SO about iframe.

Jekyll not rendering templated page

I'm running Jekyll 4.0.0 and Bundler version 1.17.2. As this time of posting, it is the latest version of both Jekyll and Bundler.
I have a template called default, which I use to standardize the appearance of navbar, footer, and location of content being displayed.
The directory structure of my website is as follows:
_data: a folder of yml data files for listings of open source projects I worked on
_includes: a folder containing footer and navbar html files
_layouts: a folder containing liquid templated layout files. This is where "default.html" layout file is located.
_posts: a directory of blog posts that I want rendered by Jekyll
CNAME img: image files index.html credits.html
lib: a directory that hosts all of my CSS, fonts, JavaScript files
logo.ico
opensource: a folder containing layouts related to open source
What I'm having trouble with is adding the credits.html page. Using index.html as a template (since index.html renders perfectly), I have the following meta data pasted at the top of credits.html:
---
title: <my name>
layout: default
description: <my description>
---
Under that are all the HTML related to the contents section of the page. When I test my website locally and on github pages, I noticed Jekyll gives me a 404 not found error. I know this is not true because the moment I put credits.html inside another folder (ie: /credits/credits.html) the page renders fine with the url localhost:4000/credits/credits.
I do have permalink set as "pretty" for the entire static website.
Does anyone know why I can't seem to render the credits page? The index page seems to work just fine. I've tried digging through the documentation, but I can't seem to figure out what is affecting that one page.
** EDIT **
I discovered that if I go to localhost:4000/credits/, the page renders perfectly. This is definitely a permalink issue. Can someone point me in the right direction of how I can fix this issue?
I solved the issue!
The reason is because I had permalink enabled in the global configuration file "_config.yml". Inside that file, I had permalink: pretty set. This is why localhost:4000/credits/ worked but not localhost:4000/credits.html.
To resolve this issue, I removed that setting from the global config file. I also realized at the same time that permalink was not necessary for my use case.
For anyone who is in this situation but requires permalink for other sections of your website, set permalink per template file via front matter instead.

Bad rendering of the local index.html from public folder using HUGO

I am creating a web using RStudio and HUGO, by means of the Blogdown package.
When serving the site locally in RStudio, it seems to be rendered properly. All the files are created within the folder /public.
However, when I open the file index.html from the /public folder, I get this appearance.
I am employing the theme Mainroad with this base URL:
baseurl = "/"
Any idea why when opening the HTML file it is not rendered properly?
Thanks to the HUGO forum, I post the answer that worked for me, just in case somebody get here.
It is pretty simple, just by adding two lines at the top of the config.toml file:
relativeURLs = true
uglyURLs = true
Open the html file in a text editor and check the exact links given for the stylesheets. More than likely, it is not resolvable by the web-browser because it starts with a / and so looks like an absolute path.
When viewed via the microserver packaged with hugo, that would be seen as relative to the server. But when view via a file url, it is seen as an absolute path.
Blogdown has released an updated version on CRAN that may address this issue. See this link for discussion: https://github.com/rstudio/blogdown/issues/372

failed to load resource hexo.js

I'm using HexoJS to create a blog. I was able to generate the static files using hexo generate. Even though there are css files and JS files generated, they are not properly linked to the index.html.
So, I have to open each html page and correct each page links given in href and src attributes one by one. I believe that this is not very practical. Can anyone help ?
The localhost is used for preview the website. When we publish our blog, it should be on a server, then the path will be interpreted correctly, we don't need to change any thing. What we saw on http://localhost:4000 will be same when you published your website.
So, we don't have to worry about the broken paths in the public folder.