https://github.com/websemantics/gh-pages-spa
Easy way to enable Single Page Applications for GitHub Pages
https://github.com/websemantics/gh-pages-spa
Last synced: 10 months ago
JSON representation
Easy way to enable Single Page Applications for GitHub Pages
- Host: GitHub
- URL: https://github.com/websemantics/gh-pages-spa
- Owner: websemantics
- Created: 2016-08-21T19:26:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-12T01:49:20.000Z (about 8 years ago)
- Last Synced: 2025-03-24T13:21:23.530Z (11 months ago)
- Language: JavaScript
- Homepage: https://websemantics.github.io/gh-pages-spa/
- Size: 19.6 MB
- Stars: 42
- Watchers: 2
- Forks: 17
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
Awesome Lists containing this project
README

> This is a tiny package to enable building Single Page Applications for [GitHub Pages](https://pages.github.com/).
### [Live demo](http://websemantics.github.io/gh-pages-spa/)
## Getting Started
Use the template provided in the `example` folder or, follow the easy steps below,
1- Create a new project with two pages `index.html` and `404.html`.
2- Install this package with either [Bower](https://bower.io/) or [NPM](https://www.npmjs.com/),
```bash
npm install ghspa
```
3- Include file `ghspa.js` in each page, as follows,
```html
```
4- Set `404.html` page title to `404`, as follows,
```html
404
```
5- This package supports the [two types](https://help.github.com/articles/user-organization-and-project-pages/) of GitHub Pages, **User/Organization** and **Project** Pages. The global parameter `projectPages` is set to [`window.projectPages || true`](ghspa.js#L54) which will be always `true` by default for **Project** Pages. To enable **User/Organization** Pages or [Custom Domains](https://help.github.com/articles/using-a-custom-domain-with-github-pages/) change the parameters in ghspa.js from `window.projectPages || true` to `false`,
## Credits
This project was built with these resources,
[SPA Github Pages](https://github.com/rafrex/spa-github-pages), host single page apps with github pages.
[Pokemon Go](http://www.flaticon.com/packs/pokemon-go), a free SVG icon set.
[Semantic-UI](http://semantic-ui.com/), a development framework that helps create beautiful, responsive layouts using human-friendly HTML.
## License
[MIT license](http://opensource.org/licenses/mit-license.php)
Copyright (c) Web Semantics, Inc.