I am building a GitHub blog with FastPages.
The automated process to create articles from Jupyter notebooks is working fine. However, the "Subscribe" button at the bottom of the page points to https://my_git_account.github.io/My_FastPages_Blog/feed.xml, which leads to an error page saying, "This XML file does not appear to have any style information ..."
I have followed FastPages's instruction here, and checked this issue. Unfortunately, there were no clear answers.
I'd like to modify the "Subscribe" button to point to the RSS link (for example https://feedrabbit.com/?url=https://my_git_account.github.io/My_FastPages_Blog/feed.xml.
Any advice on how should I do this? As I struggled to find my way by modifying the _config.yml file and the index.html files, it was not working, as whenever I ran: make server. All the files were generated as before.
I really appreciate any help you can provide.
After a while, I found the answer by myself.
In case someone needs this, here is what I did:
I went to download the footer.html from Jekyll Git repo.
Next, I override its HTML contents:
<p class="feed-subscribe">
<a href="https://feedrabbit.com/?url=https:put_the_link_you_want_HERE">
<svg class="svg-icon orange">
<use xlink:href="{{ 'assets/minima-social-icons.svg#rss' | relative_url }}"></use>
</svg><span>Subscribe</span>
</a>
</p>
I hope the Fastpages team can update this solution, the Subscribe button in their template has been unused for so long.
Related
I have my code with the following structure, where I only have a style.css, favicon.png, logo.png, and an external Javascript file in their respective folders.
index.html
assets
CSS
img
I'm looking to convert it to a template on GitHub, where a user can use it and change only the <title> of the head, the main <h1> and <h2> of the body, the logo.png (next to the <h1>) and the favicon.
I have no idea how to do it, as an example, I put this Github project, where using the template just edit .upptimerc.yml to configure your site, and Github Actions makes the deploy in Github Pages every time you modify it. While the source code is in another repository.
If someone could give me something to guide me or give me an example even with a "Hello world" HTML I would appreciate it. I couldn't find anything on the internet beyond the basics.
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.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I created a GitHub pages repository. For some reason when I name it
https://[username].github.io, it doesn't work, but it works when I name it https://[username].github.io/index.html.
Why?
It got fixed automatically. I just had to wait for a while for the settings to take effect.
Pushing a second commit fixed this for me.
Seeing other answers where changes fix this, my guess is that you need to trigger a few of deployments to get it to work.
Every push will trigger a new deployment. You can track deployments at https://github.com/username/username.github.io/deployments.
If you don't use Jekyll, the workaround is to place a file named .nojekyll in the root directory.
My index.html had the following DOCTYPE setting:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" http://www.w3.org/TR/html4/strict.dtd">
Changing it to:
<!DOCTYPE html>
Fixed the issue for me.
Faced this today (Oct-06-2019)
I double-checked every setting, all of them, didn't fix issue for me unless I changed some content in my index.html file. I also added some files to the repo to make it "alive" but in vain.
So, In my case, I opened up my index.html right in the browser, clicked on edit and added a single word, commit to master branch, refreshed and it took less than 5 seconds and it was up again.
P.S. I tried pretty much all solutions given anywhere nothing else worked for me.
I also encountered the same problem today (05/28/2020). Suppose that you have done everything right (instructions in https://pages.github.com/), you should have a repo named username.github.io and index.html set up.
What worked for me was that I chose a Jekyll theme. First, go to Settings of the repo. In GitHub Pages section, look for Theme Chooser then click on Choose a Theme. It will redirect you to a GitHub page that has multiple themes that you can choose from. Choose a theme that you like then click Select Theme. After doing these steps, I refreshed my username.github.io and the page worked correctly.
This happened to me and as soon as I did another commit the issue resolved itself. I just added a space to the index.html file in my dist folder, committed and pushed that change to my gh-pages branch and BAM! Now I can access username.github.io/repository/index.html by just going to username.github.io/repository.
I had this exact same problem. If you try the link found in the designated repo > Settings > GitHub Pages after an hour after posting all your code, the GitHub page will work.
Similar problem. I had to create random change to my html, go through the git add/commit/push process. That fixed it for me! Now I can access to my page without having to add .html at the end of the url.
If you are not using Jekyll, delete the _config.yml file from the repository. This fixed the issue for me.
You may also try to push the local repository again.
Pretty late to the party but here is how I fixed it for myself today.
Go to settings for your repository: You can find Settings tab in your repo page.
Scroll down to GitHub Pages section on the settings page.
In the panel, you will have a Source info that states : 'Your GitHub Pages site is currently being built from the gh-pages branch'.
However, in my cases, all code was in master branch. So I selected the branch from dropdown as master and in merely a minute, it was published successfully.
I had a similar problem for the private repository. My Git project contained index.html in root but the page did not display under http(s)://<username>.github.io/<projectname> path.
The solution for either way (public repository or not) is in enabling GitHub pages in project repository settings under 'GitHub pages'.
However, be aware that enabling pages under private repository make the .html files public.
I encountered the same issue on deploying automatically a bookdown page from the gh-pages branch with Github Actions:
When I tried to access the url proposed by Github in the GitHub Pages section of the repository settings
https://<username>.github.io/<reponame>/
I got a Error404: Page not found response.
However, manually adding "index.html" at the end of the url displayed the page.
https://<username>.github.io/<reponame>/index.html
Adding manually a CNAME file with the following content to the gh-pages branch solved the issue permanently:
https://<username>.github.io/<reponame>/index.html
It's more a workaround though...
EDIT:
Adding a CMAKE file solved the problem only temporarily as it was removed upon invoking the gh actions workflow.
Either:
i) change gh-actions workflow to create the CMAKE file at the end (still a workaround...)
or how I could solve it in the specific case of using bookdown:
ii) in the YAML header of the index.Rmd file, I added
url: "https://<username>.github.io/<reponame>/"
There is also a more subtle problem which causes this issue.
If you are using image files with huge sizes in the index.html, this problem occurs.
Reducing the size of the images being loaded solved this problem for me.
In Settings>Github Pages, make sure that the branch selected there is the same as the one you are working with. I had the same problem and the branch was master instead of main so I changed it and it is fixed now.
I am extremely new to coding and still learning the ins and outs of Git and Github. I am having an issue where my Github pages opens to an .html file that I deleted rather than my index.html. I am at a blockage where I've typed my question into google in various forms and have tried to figure this issue out myself, but with my limited knowledge, I'll be honest I'm just getting confused and finding myself heading down a rabbit hole. Can anyone help me out?
This is my github repo https://github.com/khayes8/Triviagame
and this is my github pages link https://khayes8.github.io/Triviagame/Finalscore.html
In correct url of your Github Page is https://khayes8.github.io/Trivia-game/index.html
And I found a javascript in the repository which file /assets/javascript/app.js at line 69.
setTimeout(function(){
window.location.href='Finalscore.html'});
The statement redirect your page from /index.html to /Finalscore.html. Because you are already deleted Finalscore.html so you will get a 404 no found page.
I added a project site to my Github project. But some photos are not displaying in the site.
Img code:
<img src="img/screenshot2.PNG" class="img-responsive" alt=""> </div>
folder structure (img is a folder):
img
Screenshot2.png
index.html
I tried with .png and .PNG (some earlier SO answers suggested it) and none of them work
Any solutions?
Nevermind, I solved it.
If anyone has the same problem.
GitHub Pages are case sensitive. Not only for folders, but also for image names.
Write what you see.
It is Screenshot2.png. With a lower-case png and a capital S at the start.
As #dnivog mentioned, GitHub's servers take a little time to update files.
If nothing of the above addresses your situation, just check back in a little while. ⏳
Adding my two cents for googlers: Git Pages seem to ignore the directories starting with underscore, so make sure you don't have <a href="_images/whatever.jpg">.
yes, i have the same problem
There are two most powerful ways to solve it
pay attention to the writing of image extensions, because on github pages Images.png is different from images.png
if in your code you write src on image like this src="/images/images.png" just remove / at the beginning of the section, and it will solve your problem.
While hosting a website on Github,I faced the same issue.The image file was saved as an .jpg extension on my local(in small letters) and It was working fine. I pushed the same to github. That did not work.
I had to change the extension to .JPG (in caps)since it was the original extension of the image.Github Pages are case sensitive to the name of the files being uploaded.
I had this problem today. I solved it by:
Double-check the Case Sensitive of the images (i.e. Screenshot.png isn't the same as Screenshot.PNG or even screenshot.png)
Double-check the PATH of the image. For me; It was ../img/myImg.jpg, and I changed it to ./img/myImg.jpg to point to the current directory of the project
After fixing the 2 mentioned issue above, it worked fine... Hope it help you get unstuck!
I had a folder on my laptop named "assets", but when I pushed to Github it became "Assets". I had to change it in my HTML so I could view the images on the Github page
The repo on my laptop:
The repo on GitHub:
I had a similar issue, except I used git-lfs to manage the images. GitHub Pages doesn't support LFS, which will prevent the image from being displayed.
I tried using both JPG or jpg but it didn't work.
I tried below steps and it worked fine.
Try using the complete path. Let's say your image is inside repo-name/img/pic.jpg. Then use https://username.github.io/repo-name/img/pic.jpg instead of just /img/pic.jpg.
for anyone still scrolling through the answers:
do the following steps:
Make sure the image has actually been uploaded on your remote. On your main repo page , click on the name of the image, and see if it opens: if yes continue to next step
Load the site with "Github pages"
Open up inspect element (DevTools) , go to the html element in your .html file OR your CSS Style where you have defined your src
Here try out all the various solutions that people have described above [what worked for me: I added ./to the beginning of my src => ./name-image
whichever solution works, make that change in your local html or CSS and push to github.
I had this exact same problem, GitHub Pages appears to be case-sensitive for images, and I wrote .JPG instead of .jpg, once I changed my image extension to be lowercase it worked.
I struggled quite a while until I saw one post by Elharony: https://stackoverflow.com/users/5560399/elharony
talking about case sensitivity. It turned out Jupyter notebook is case insensitive for image files, but GitHub is. That solved my problem.
If you are importing file into your JS file and using relative path.
Remember to have the relative path from the HTML file and not from JS file as it'll finally compile into the HTML file only.
my original <img src="images/walnut.png" change to <img src="/blob/main/images/walnut.png"
Will work on github hosting pages
You can try by putting the "image link address" from the github repository, in the 'src' attribute of the 'img' tag of the HTML code of your file.
In case anyone has this problem while using jekyll to build a github site, there's yet another variation on this problem. It's a variation of the several answers above to prepend '.' or '..' on the image path in regular html. In the case of jekyll, which renders markdown source files, what should be prepended is {{site.baseurl}}, where baseurl is provided in the jekyll config file and is the root directory of the github repo. In other words:
![image 1](/images/image1.png "Image 1")
will render locally,
![image 1](./images/image1.png "Image 1")
will render on github pages as per the several answers above, and
![image 1]({{site.baseurl}}/images/image1.png "Image 1")
will render both locally and on github pages, which is the best way to do it with jekyll since all the coding of the site can be done locally in advance of pushing to github.
I had the same issue In my case the issue was of /
<img src="/Images/shared/desktop/logo.svg" alt="" class="logo" />
I was using this for my Image in html in local machine it was working fine
but in github its not displaying image
but when I removed / from the path it worked
<img src="Images/shared/desktop/logo.svg" alt="" class="logo" />
I had the same problem with GitHub pages:
instead of ../img/image.png, I wrote ../img/image.PNG and now it works fine.
I know this is not a solution but somehow worked for me.
Just in case if someone encounters this error!
I had the same problem, and I changed 'img' folder to 'image', then it worked.