how to let git hub pages link to other .md pages? - github

I cnamed to my git hub pages. It displayed README.md as default home page.
Now I want to add some hyperlinks to other .md files(such as /blog/list.md). But web browsers can only identify .md files as downloadable files. So web browsers will not display .md files as web pages.
how to solve this problem?
In fact, I can put some HTML pages that hyperlinks to. But Markdown page saves a great amount of time at all.

You want to write in Markdown and server as regular HTML content, so try to use static site generator like Jekyll providing by GitHub Pages.
You can find instructions at GitHub Help, then add more Markdown pages and Jekyll will silently translate another-page.md to another-page.html for you.

Related

Can I embed a google document in Github's readme.md using markdown?

I am trying to embed a google docs in Github's readme.md using markdown. Is this possible?
I have done the following:
Published the document to web and copied the iframe code.
Pasted the code in markdown. Nothing happens.
Pasted the code between and nothing happens.
Any suggestions?
This isn't possible. When GitHub renders a README or other text document on the site, it gets passed through a filter to sanitize it and remove anything potentially malicious, including JavaScript and iframes. That's because these documents are rendered in the context of the github.com domain, and any malicious code could steal user credentials or otherwise create privacy or security problems.
Note that even if you could bypass the sanitizer, GitHub sends a Content-Security-Policy header that restricts JavaScript to a single, specific domain and rejects all frames, so your browser would not render such content, and it would use the report URI to send a notification to GitHub that a violation had been detected.
You could save the Google Doc as Markdown, AsciiDoc, or HTML and place it in your repository for people to use if you want it to be visible on GitHub.

There isn't a GitHub Pages site here

I tried to setup two repository github pages. Just wondering why one works and the other doesn't.
Works - https://ngaisteve1.github.io/calculator/
Doesn't Work - https://ngaisteve1.github.io/BlackJackJS/
Second question is, is it possible for my to deploy my html with Javascript in GitHub pages or is it GitHub pages is only deploy html page?
Both links work now. GitHub Pages might take a moment to deploy your most recent changes.
You can host any static content, including client-side JavaScript (GitHub Pages will not run any code for you on its back end).

GitHub Pages with repos as links

I'm just a regular user on GitHub. I don't have an enterprise or anything like that. I was wondering can I still create a https://myusername.github.io/ page like a blog or portfolio, and can that page contain links to individual repo github pages like https://myusername.github.io/myrepo1 That way this can act like a portfolio website.
Is this possible? I keep having issues with setting up the https://myusername.github.io/ page but the repo-based url works fine and is easy to set up
A User GitHub page will contain markdown files which, in turn, can include any URL you want.
Incuding URLs referencing your other repositories.

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

How do I get a multipage site from GitHub Pages' automatic generator?

I am using the 'Automatic Generator' of GitHub Pages, and I see it only generates a single index.html and other web resources.
How it works if I want to have a multi-page website generated from other markdown files?
You can get github to generate .html files from .markdown files by ensuring the top of the .markdown starts with the ---- block like this:
---
title: This will be used as the title-tag of the page head
---
hello
=====
**You are here!**
Found this here:
http://xlson.com/2010/11/09/getting-started-with-github-pages.html
Github will automatically create pages for you, if you include the markdown file.
index.html - yourname.github.io/project-name/
about.md - yourname.github.io/project-name/about
foo.md - yourname.github.io/project-name/foo
Tested this and working.
If you want to get into the really fun stuff - you need to get into Jekyll http://jekyllrb.com/
You pull the generated page, make any modification and addition you like (including adding new pages and links between the pages), then commit and push.
The generated single page helps you to make you start. You can duplicate its layout to generate other similar-looking pages by hand.
See Help.
Github Pages uses the Jekyll site generator which suports converting any number of markdown files to HTML for you, and applying the surrounding template via a layout file. See github's documentation on using Jekyll: https://help.github.com/articles/using-jekyll-with-pages
The trick is that you have to download a jekyll template/theme and include it in your gh-pages branch on your own (standard jekyll configuration), instead of just allowing Github Pages to auto-generate the one file using its own built-in themes.
GitHub Pages' automatic generator only generates one page.
You can add the new file directly, github page publishes all data (including data inside the subfolders) for you.
Just made gh-pages-generator - the utility to generate site with the navigation from multiple markdown files having links to each other.
"Github pages" hosts web page from index.md / readme.md as main page . However if you have an index.html file then it'll be hosted from html file.However , if you are trying to host a multi page website using "Jekyll themes" then Jekyll theme is not straightaway deployed in subsidiary pages .
Case 1) You are using markdowns to host your pages
index.md -> main page
page1.md -> page 1 of your website
..
so on
To generate a multiple page website using github page just give relative path to the required page without extension i.e.
make a button
Go to next page
And by clicking on this button you will be directed to page1 with jekyll theme deployed