An open API service indexing awesome lists of open source software.

https://github.com/nicoolandgood/github_as_cdn

Simple CDN example powered by Github pages + tutorial.
https://github.com/nicoolandgood/github_as_cdn

cdn css github html pages tutorial

Last synced: 12 months ago
JSON representation

Simple CDN example powered by Github pages + tutorial.

Awesome Lists containing this project

README

          

# Use Github pages as CDN

## Step 1: create a repository

Create a remote repository on Github then clone it.
```sh
git clone [http or ssh link to your repo]
```

Or push your existing code from a local repo.
```sh
git remote add origin [http or ssh link to your repo]
git push -u origin master
```

Add a file such as an `index.html` at the root of your project folder.

## Step 2: set up Github pages

- Go to the `Setting` of your repository on Github and then go to `Pages`.
- Select the branch you want to use for your page (e.g. `master`).
- Press `Save`.

When the Github page will be deployed, go to `https://[yourusername].github.io/[yourreponame]`.

## Step 3: link files of your CDN to your projects

Let's say we have this file structure in our repository:
```
[yourreponame]
|_ index.html
|_ my_style.css
|_ my_script.js
```

In other projects, you can use your styles and scripts as such:

```html



```