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.
- Host: GitHub
- URL: https://github.com/nicoolandgood/github_as_cdn
- Owner: Nicoolandgood
- Created: 2022-08-30T12:40:41.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-18T13:12:18.000Z (over 3 years ago)
- Last Synced: 2025-04-12T06:59:47.818Z (12 months ago)
- Topics: cdn, css, github, html, pages, tutorial
- Language: HTML
- Homepage: https://nicoolandgood.github.io/github_as_cdn/
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```