Is it possible to host the angular.js static blog on Github?

I know that on Github sites you can host a static Jekyl based site / blog. Is it possible to do the same with a static site / block based on AngularJS?

+48
angularjs github-pages
May 18 '13 at 16:08
source share
3 answers

I would say yes, given that all angular gigub UI pages are actually angular demo applications:

http://angular-ui.imtqy.com/

http://angular-ui.imtqy.com/bootstrap/

etc.

+37
May 18 '13 at 16:49
source share

You can, but cannot, use html5 mode (removes # from URLs). If you are using html5 mode, you need to redirect all requests to the root URL from its one-page application. Since you cannot use server-side code on GitHub pages, you cannot do this. So, if you don't mind # in the url, go for it. If you want to use html5 mode, you need to look for hosting in another place.

From Angular docs ...

"Using [html5] mode requires URL rewriting on server side, basically you have to rewrite all your links to entry point of your application (eg index.html)" 

EDIT: You can use some smart hacks to do this job if you really want to. Hacks are detailed here . As a result, you will rename your index.html to 404.html and github will serve it on all routes

+90
Jun 21 '13 at 18:45
source share

There is one conflict between Jekyll and Angular.

The fluid that is included in Jekyll also uses {{ }} to evaluate expressions. To change the expressions that Angular interprets (so it does not conflict with Liquid), use:

 var myapp; myApp = angular.module('myApp', []); myApp.config([ '$interpolateProvider', function($interpolateProvider) { return $interpolateProvider.startSymbol('{(').endSymbol(')}'); } ]); 

Mark this blog post

+12
Feb 18 '14 at 6:21
source share



All Articles