The github pages blog can upload but cannot display the content - github

I have a github.io blog which can display very well before. But recently when I added a new articles and pushed it to github(by "hexo generate" and "hexo deploy"), I found that there isn't any contet words on my blog. In github blog repository ((https://github.com/zwdnet/zwdnet.github.io) I can see the pages pushed successfully. And when I check the blog's source code in my brower, I can see the newest article. My blog url is: https://zwdnet.github.io/ It is a Chinese blog. I can visit other github.io blogs, so maybe this is not the network problem. How can I solve this problem? Reseting the github pages? Thanks for any helping!

After opening your website, according to the console errors. Your blog is missing the JQuery $ library.
Check the header part of your code, add in a JQuery link will fix this problem.
Add this in the header tag.
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

Related

GitHub Pages (jekyll blog) showed 404

I tried to build up a Jekyll blog website using GitHub pages. I could check the homepage, but the subpages (about & blogposts) showed 404.
To find out where the problem is, I opened a new repo. And I set up the basic things of a Jekyll site using jekyll new . locally and uploaded them to the Github repo. I did not change anything after this step.
And then, I used jekyll serve to run the local test, and everything went well. The layout looked nice and I could check the first blog "Welcome to Jekyll!"(built by default).
However, when I used the link of GitHub Pages to check, the layout of the homepage looked quite different, and I could not check the default blogpost "Welcome to Jekyll!", which showed me 404.
How can I fix it?
This is my repo: https://github.com/jl-xie-kcl/blog20211122
(you can check the screenshots in issue 2 https://github.com/jl-xie-kcl/blog20211122/issues/2)
Those pages do work, your links are just incorrect because your blog is not at the root of your domain — and this goes the same for the style and images not working, by the way:
The link to your about page: https://jl-xie-kcl.github.io/blog20211122/about
The link to your blog post: https://jl-xie-kcl.github.io/blog20211122/jekyll/update/2021/11/22/welcome-to-jekyll.html
In order to fix this, you will have to change the baseurl value in your _config.yml to:
baseurl: "/blog20211122"
As stated by the comment on this configuration line:
baseurl: "" # the subpath of your site, e.g. /blog

How can I create a link from my github README.md to some static html in the repository?

I want the link to resolve as a web page, not as a github source of a web page.
check out this link
They suggest trying
[a link](https://github.com/user/repo/blob/branch/other_file.md)
but without screenshots or examples, we don't know exactly what you are trying to accomplish

Remove md Webpage header in github

I made a .md file in my GitHub repo. The site automatic added a header with the link to the repo index page. I can't find any way to remove it.The repo name is called school The webpage is on /school/ss/1
Link to the code: Github
What it shows
Follow the "Layouts" instructions as shown on the Primer theme github site to edit website style: https://github.com/pages-themes/primer#layouts
Then, in your _layouts/default.html, remove lines 13-15 which add the title to your page
In their issues, I propose a simpler way to do this: https://github.com/pages-themes/primer/issues/21

In GitHub Wiki, how do I make a link to another page with a title containing colons?

I know how to make a page link in GitHub's wiki. Normally you can just do:
[Arbitrary Link Text](Wiki Page Name)
Ref: Stack Overflow question Linking to other Wiki pages on GitHub? [closed].
But, in my GitHub repository I have a wiki page named "ExampleModule::ExampleClass" with two colons. How do I make a link for it?
I've tried:
[Arbitrary Link Text](ExampleModule::ExampleClass)
It doesn't work.
Based on the answer, here's my discovering:
Say if I have a page in a GitHub project's wiki repository called overview>:
Link to overview from wiki repository Home page:
[Overview](wiki/overview)
Link to overview from wiki repository that is NOT Home:
[Overview](../wiki/overview)
Link to overview from project repository:
[Overview](../../wiki/Overview)
If you create a page named Example::Page, you could link it with:
[Click here](wiki/Example::Page)
The colon isn't a problem.
I made a simple example here.

Linking to other Wiki pages on GitHub?

GitHub wikis allow you to link to other pages in the wiki like so:
[[Wiki Page Name]]
However, I want to display different text than the wiki page name when making the link. Is there a way to do this? Am I linking to wiki pages all wrong?
Using the Markdown link syntax
[Link Text](WikiPage)
seems to work in the edit preview but not on the actual wiki page. At least for me the generated link is WikiPage instead of wiki/WikiPage and I get the famous GitHub 404.
However the MediaWiki syntax
[[Link Text|WikiPage]]
works for me, even for Markdown wiki pages.
GitHub by default uses Markdown syntax for the wikis so you can just do:
[Arbitrary Link Text](Wiki Page Name)
Check out Markdown and this blog post for more information about their wikis and the other markup syntaxes they support.
This solution has issues when you're on the home page because it creates relative URLs. Check out Sven's answer, below.
The internal-ref part is relative to your project. For wiki pages use:
[Page Name](wiki/Page-Name)
In the preview the link will be broken but when the page is saved it will work.
The most common use [Link Text](WikiPageURL)
The second way: [[Link Text|WikiPageURL]]
The third way, if you do not want to repeat and need to use the hyperlink several times: [Link Text] and at the end of the page use once [Link Text]:WikiPageURL
Check the wiki editor's help. It tells you:
To create a reference link, use two sets of square brackets. [my internal link][internal-ref] will link to the internal reference internal-ref.