github-pages

Adding custom fonts to GitHub pages

ぃ、小莉子 提交于 2019-11-28 07:54:26
问题 I just hosted my new website on GitHub. I use there a few custom fonts, which I uploaded right next to the index.html and style.css files: The font code: @font-face { font-family: "gogoiadeco"; src: url('gogoia-deco-webfont.eot'); src: url('gogoia-deco-webfont.eot?#iefix') format('embedded-opentype'), url('gogoia-deco-webfont.woff') format('woff'), url('gogoia-deco-webfont.ttf') format('truetype'), url('gogoia-deco-webfont.svg#Gogoia') format('svg'); font-weight: normal; font-style: normal; }

Cross-Origin Resource Sharing on GitHub Pages

我只是一个虾纸丫 提交于 2019-11-28 06:17:50
Is there a way to enable Cross-Origin Resource Sharing (CORS) for a static page hosted on GitHub Pages to allow cross-origin requests in Javascript? For example, can we instruct GH Pages somehow to add these HTTP response headers: Access-Control-Allow-Origin:* Access-Control-Allow-Methods:GET,POST Access-Control-Max-Age: 1000 Access-Control-Allow-Headers:* Couldn't find anything in their documentation , and this ... ...GitHub Pages does not support customer server configuration files such as .htaccess or .conf... ... doesn't sound very promising - or is there a way? EDIT: Yay! Looks like

MathJax not rendering some equations properly on Github pages

陌路散爱 提交于 2019-11-28 06:02:29
问题 I've configured Mathjax on my Github pages site and it can render some equations properly but not others. It can render properly the following equations: \\[ \frac{1}{n^{2}} \\] \\[ J(\theta) = \frac{1}{2m}[\sum_{i=1}^m(h_\theta (x^{(i)}) - y^{(i)})^2 + \lambda\sum_{j=1}^n\theta^2_j] \\] But it can't render equations like below: \\[ F'(\theta_*)=\lim\limits_{\theta\to\theta_*}\frac{F(\theta)-F(\theta_*)}{\theta-\theta_*} \\] Can someone please see where the problem might be? 回答1: You should

Committing via travis ci failing

孤街浪徒 提交于 2019-11-28 04:42:47
I am trying to use grunt-gh-pages extension to commit to my gh-branch. It works fine locally but when I use TRAVIS-CI it fails. It gives the following error message - Warning: fatal: remote error: You can't push to git://github.com/tusharmath/tusharm.com.git Use https://github.com/tusharmath/tusharm.com.git Use --force to continue. And when I update the repo option I get the following error - Warning: remote: Anonymous access to tusharmath/tusharm.com.git denied. fatal: Authentication failed for 'https://github.com/tusharmath/tusharm.com.git/' Use --force to continue. Aborted due to warnings.

angular2 base url and relative paths on gh-pages

不打扰是莪最后的温柔 提交于 2019-11-28 04:24:01
问题 I'm trying to deploy my project site on gh-pages, it's angular2 app with webpack, I set the base url to my repo name and everything loads fine except the relative paths in the templates, here is what I mean import {Component} from '@angular/core'; @Component({ selector: 'header', template: ` <img class="fb-logo" [src]="fbLogo"/> <img class="ang-logo" [src]="angularLogo"/> ` }) export class Header{ angularLogo = '../../assets/img/angular-logo.png'; fbLogo = '../../assets/img/share/facebook.svg

List Subcategories in GitHub Pages

半城伤御伤魂 提交于 2019-11-28 03:44:43
问题 Edit: I've created a repository here that tests jibe's answer below. I just end up getting a blank page when I visit /animals , so any help is appreciated! This is a follow-up to this question: Hierarchical Categories in GitHub Pages In that question, I found out how to list the posts of a particular hierarchical category. Now I'm trying to figure out how to list the subcategories of a particular hierarchical category. I'm using Jekyll on GitHub pages, and I want to have hierarchical

git branch: gh-pages

落爺英雄遲暮 提交于 2019-11-28 03:22:55
I have a repo on GitHub. Recently I have discovered GitHub's pages and I want to use them. I would like to create this new branch and then, when I need to, either commit on master branch or on gh-pages branch. How can I do this? Do I have to create another folder inside my repo? You might find this tutorial useful: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster") . To me this approach seems simpler then doing a git checkout gh-pages each time you want to edit your gh-pages content. Let me know what you think ^_^ Edit: I updated

How to change the default order pages in Jekyll?

萝らか妹 提交于 2019-11-28 03:19:17
My blog is built with Jekyll on Github. In the navigation bar, the default order is Pages, Messages, About, Archives. I want to change the list to Pages, Archives, About, Messages. What should I do? I think it is related to the code below {% assign pages_list = site.pages %} I think site.pages is what I should change, but I don't know how. The order of your navbar menu is determined by the HTML template in _layout (which may be pulling in HTML fragments from _includes . It sounds like your navbar is being programatically generated from the list of pages provided in site.pages using the liquid

Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g [duplicate]

谁说胖子不能爱 提交于 2019-11-28 03:13:49
This question already has an answer here: Cannot push to GitHub - keeps saying need merge 30 answers Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes. I was trying to push local octopress blog to remote branch. But its saying above error. another is: Do i have to manage or push the local changes to source or origin branch .? When i do username.github.io ,i shall see my remote version of the local blog.(i used rake deploy command) But i dont see the updated blog at my username.github.io.I have doubt on branch for

Can I create routes with react-router for a github-pages site?

岁酱吖の 提交于 2019-11-28 01:39:05
Ok, so I've made a SPA using React and React-Router and have pushed it to github pages, but none of the routes I have written work when I refresh or click back in my browser. I had the same problem when I was serving the page locally, but then followed along to this SO answer and made a server.js file which provided a redirect to my static HTML page at each route. Here is what the file looks like: "use strict"; let express = require('express'); let path = require('path'); let app = express(); app.use(express.static('public')); app.get('/contact', function(req, res){ res.sendFile('public/index