I've used GitHub pages to generate a beautiful website for my project (this one). Now I want to keep the documentation of my project up to date, and having everything in a single README.md file is probably not scalable to the many features we are adding.
So, I thought that the best place to keep the documentation is the GitHub wiki, but I'd like to integrate the wiki to the gh-pages generated site, keeping the beautiful layout.
How would I take the GitHub wiki and generate an HTML web site with a customizable layout?
Here is an example URL for a wiki:
https://github.com/golang/go/wiki
On the same page you will find a clone link:
https://github.com/golang/go.wiki.git
Then run the Markdown files through Hugo or even create a new repository
to the host site based on the Wiki.
You could include your wiki as subtree.
BTW, GitHub Pages now no longer need the gh-pages branch. Create a repository named your-user-name.github.io; it will automatic generate to a website. See GitHub Pages for more detail.
Related
I want to update Topic/page titles on my GitHub wiki (which is currently using Markdown syntax). When I do that using the GUI it renames the Markdown files, and breaks all of the links.
I know that I can rename the Topic files in the Git repository and push the changes, but that doesn't help the broken links.
Is there a way to avoid this, and make GitHub Wiki's behave more like other Wiki products? I could not find an better way on GitHub documentation.
Welcome to StackOverflow. As best I can determine you cannot rename a GitHub Wiki page without its markdown file also being updated to the new name. The two are tightly coupled.
This Web Applications (StackExchange) Question has some alternatives you may consider, i.e. instead of renaming the page, create a copy. Then edit the original page so that it directs visitors to the new page via a link. This way the original page link remains valid but directs visitors to the new page.
I recently created a global wiki for my company in a Github repo. It's an empty repository which I created just to use its wiki.
My problem: on the front page of this wiki repo, the Readme is displayed. And this Readme is empty, except for a link to the wiki's home.
I want to display this home on the front page of the repo. Is it possible?
Probably is better to use https://pages.github.com/ you could even go further and use hugo, in long term could be easy to maintain since you just keep track of all your articles/posts within a repo.
Regarding your question probably a redirect from the main repo to the wiki may work, check the docs for more info: https://help.github.com/categories/github-pages-basics/
With a redirect, I mean that you will need to have an index.html redirecting to the wiki URL.
I am creating a blog using github pages and jekyll. I wonder if there is a way to embed code snippets from a github file (i.e., a file in a repo) in a blog post. I can find a solution on this page about embedding gists: https://gist.github.com/benbalter/5555251.
No direct solution for github files, though.
Jekyll has a pretty nifty syntax-highlighting system (provides _sass/sytax-highlighting.scss is present and correct), so it would be possible to just copy the code over into a blogpost, using `s to wrap the code.
As per actually embedding from a Github repo, there is a pretty nifty project here, if you want to check it out.
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.
Is there any document about the whole process of building my blog with github pages?I have read the official introduction,but less help.
There are two different ways to create a GitHub page:
Create a repo called YOUR_USERNAME.github.io
Create a branch called gh-pages on a standard repo
Later, you must put some HTML files and commit. You will see the page running. You can also use Jekyll which has a template engine but it's a bit hard to start with it.