The documentation for geoplot is rendered via GitHub Pages, off of the gh-pages branch of its repository. However, some of the images on the following page fail to render: https://residentmario.github.io/geoplot/quickstart/quickstart.html.
Take as an example the image QuickStart_21_2.png and the image QuickStart_10_1.png. Both of these files are located in the _images folder in the gh-pages branch of the repository, but whilst the former is served correctly, the latter serves a 404.
Why would these files not be rendered?
This turned out to be due to some interesting dynamics around filename casing conventions and (probably) some kind of intermediate cache at GitHub. More details here: https://github.com/ResidentMario/geoplot/issues/175.
Related
I try to include a GIF for my README.md in Github, since Github allows to use and render GIFs in .md files.
As far as I am concerned I often cannot find any image or video files on Repositories of well maintained Github Repositories, but they still can use their own files in their READMEs.
A few examples:
https://raw.githubusercontent.com/junegunn/i/master/fzf.png
https://raw.githubusercontent.com/vim/vim/master/runtime/vimlogo.gif
How can I achieve similar links, without tracking and pushing e.g. GIFs in my Repo on Github?
I tried out the following:
I open an issue in my Repo, drag and drop my .gif file into it, copied the content into my README.md.
This turns out successfully, but i receive an not readable link:
https://user-images.githubusercontent.com/21893471/47281234-9f9b23ff-21ff-88ad-98f1-5555d1239ba807.gif
(dummy link)
I followed this description. It also works, but then an extra branch is created and thus the GIFs will be downloaded as well when someone clones the Repository.
TL;DR; You can't.
Those "readable" links are links directly into content stored in that repository. For example, that Vim image lives in this directory in the code: https://github.com/vim/vim/tree/master/runtime, and will be downloaded by anyone who clones the repository.
I'm having some issues with getting the proper page to display. I've looked up different answers and they don't seem to be working for me.
https://github.com/samus94/portfolio2.1
Please let me know what I've done wrong here.
It was displaying the readme before, and I think it still is.
First, You've posted a link to your GitHub repository, not your GitHub Page. The address for GitHub pages always looks like https://<yourname>.github.io/<reponame>.
To get this URL you can go into the settings for your repo and find the GitHub Pages section. Make sure you have GitHub Pages enabled, then look for the URL your site is published at.
Finally, GitHub Pages requires your repository have a very specific structure. It expects there to be an index.html file at the root of the repository. This means you have to either move everything in your /src directory to the root, or move the index.html and update the URLs to your javascript and CSS.
All of these requirements are outlined clearly in the GitHub Pages documentation.
Deploying static HTML + CSS + JS sites (NO jekyll) to Github Pages,
using Github Actions was harder than I though.
Theres is very few quality documentation about this specific topic, except this one:
Steps overview:
Setup a custom action in github
Push changes and the action executes automatically
Your page is deployed to github pages
One important thing: I had no need of changing any property in the yml; don't worry about customizations.
I wrote a readme.md file for my git page. Now I wanna advertise for my program on some forums. I don't want to always update every single forum entry, so I though I just link to my git repo and they people can get the information about my tool just by reading the readme (in the future, all I need to is update this single file).
However, the source files are placed on the top and 99% of the people that will visit my repo won't have a clue about code. Therefore it would attract people more if they just see the readme.md instead of code (which might scare them away "oh I don't get it and it looks to hard to get a fast overview leave").
Is there a way to switch the code section with the readme.md section?
Is there a way to switch the code section with the readme.md section?
There is not for now in a classic GitHub repo.
One workaround would be to limit the number of top elements to a minimum, moving all those folders into a src/ or project/ subfolder.
That would make the code section very short, and the README (just below) that much more visible.
A different repo, as commented by the OP TrudleR, is available with GitHub pages, like a project site using the gh-pages branch.
For that approach, I like to declare that branch as a submodule in the master branch of the same project repo: that way, I can update my project pages while updating the sources of the project itself.
Update August 2016: Simpler GitHub Pages publishing now allows to keep your page files in a subfolder of the same branch (no more gh-pages needed):
Those pages can be in a subfolder of the same branch now.
I'm looking at using GitHub Pages to host my blog and Jekyll to present it.
Presumably, whatever I commit will appear at <yourname>.github.io through Jekyll and at https://github.com/<yourname>/<yourname>.github.io in rawer form. See this page showing links to live sites and to the source repos used to construct them.
Advice on SEO suggests that duplicating content within and across domains is bad SEO practice. See this Google support page on duplication and this Moz page on issues with duplication both of which also offer possible solutions.
My question is two-fold:
Is content duplication actually a problem for GitHub Pages in practice?
If so, how does one apply solutions like canonical linking or noindex to the GitHub repo so that search engines know that your Jekyll site is the canonical one?
Update:
Might be worth noting that I uploaded a "hello world" index file to my GitHub Pages repo and then checked the source for the page on GitHub. The GitHub source already contains a canonical link
<link rel="canonical" href="https://github.com/guypursey/guypursey.github.io/blob/master/index.html" data-pjax-transient>
I assume it's this that would need changing for each file to point to the Jekyll version of the site but I can't see a setting in GitHub to handle it.
Duplicate content is unavoidable when using GitHub Pages with users and organizations if the repository is public
In general this shouldn't be a problem. See a previous answer.
You do have a couple of options:
Google and other search engines can't obviously access private repository which requires a paid plan.
Switch to a project page. This will use a gh-pages branch instead of the master branch. Since GitHub's robots.txt only allows search engine crawling of the master branch and disallows other branches. So if the site is in gh-pages branch this will prevent Google from seeing the repository.
If you have a site called http://username.github.com and a project called projectname, do you
use http://github.com/username/projectname/tree/gh-pages to a) mirror your master branch, or b) create a webpage describing the project (to be reflected in http://username.github.com/projectname), or
not have a http://github.com/username/projectname/tree/gh-pages
branch at all?
What I understand of gh_pages as presented in pages.github.com, is that it is for:
creating a separate branch: your repo has now two roots (one for master and all the dev branches, one for gh_pages for GitHub published content).
The root for gh_pages branch has a special treatment when managed by GitHub.
"publish content to the web": and that can be any content you want.
So if you don't need a full space for documentations, you can just go with a readme.md file or an index.html page ("user page").
help.github.com itself is organized as documents within a gh_pages branches.
I usually don't have a project page at all (most of my public github projects are mirrors of other open-source projects), but on the ones where I do, I have a web page describing the project.
Although I just had an idea: might be neat to make a project's gh-pages branch contain a highlighted, hyperlinked version of your code (run it through Doxygen and have it only generate cross-referenced source instead of documentation, for example).