Skip to content

Instantly share code, notes, and snippets.

View notepraiya's full-sized avatar
🦄

notepraiya

🦄
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@notepraiya
notepraiya / gist:0e18e2dfa966d88a99627cbb0913ed15
Created December 2, 2020 01:24
deploying SPA with React/BrowserRouter to project-based github pages
GitHub Pages doesn't natively support single page apps. When there is a fresh page load for a url like example.tld/foo,
where /foo is a frontend route, the GitHub Pages server returns 404 because it knows nothing of /foo
- https://github.com/contentful/gallery-app-react/issues/7#issue-483385870
1. Edit package.json
Add "homepage": "https://notepraiya.github.io/react-beginner-chat",
2. Edit App.js
@notepraiya
notepraiya / gh-pages-deploy.md
Created November 27, 2020 08:49 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).