Skip to content

Commit

Permalink
Homepage Redesign (#107)
Browse files Browse the repository at this point in the history
* initial commit

* Gatsby + Redesign

* pulling the correct package.json and README.md files

* use v10 lts

* framework, not player

* add city video with sound and mailing list signup link

* improved theme pre-rendering

* update to the index.css approach

* add GA back and update sea

* more defensive heroTheme check

* change footer ordering

* add fantasy craft video

* respect reduced motion preference

* update getting started guide to include themes

* update readme

* vjs icon instead of Gatsby, fix player flash, SEO stuff, docs link

* make AdvancedExample responsive (for both homepage and /advanced)

* just go ahead and use the right vjs aspect ratio class

* responsive blog page

* update advanced page SEO title tag

* updated to a real 404 page

* higher res version of the fantasy video

* fix footer docs link

* responsive getting started page

* remove left table of contents, adjust padding in the hero

* set google analytics cookieExpires field to 0

* https://www.gatsbyjs.org/packages/gatsby-plugin-google-analytics/#optional-fields
* https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id#cookie_expiration

> If you set the cookie_expires value to 0 (zero) seconds, the cookie turns into a session based cookie and expires once the current browser session ends.

* add anonmizeIp

* remove license year

* loading random themes took too long; load one then cycle through them

* switch to a player page on play event

* change the URL and do not transition on play

* 45 second theme changes

* override native on player

* npm upgrade react-burger-menu

* npm audit fix

* fix overflow on mediatable in advanced example

This was causing a bug on chrome in mobile views that resulted
in the entire page overflowing the x-axis. It was noticed because
it had the side-effect of cuasing the burger menu to not fully open

* remove rogue console log

* add blog post

* update blog link

* a d got left out
  • Loading branch information
mmcc authored Nov 14, 2019
1 parent ac9f6a2 commit 74032e3
Show file tree
Hide file tree
Showing 328 changed files with 37,483 additions and 4,533 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

89 changes: 68 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,76 @@
lib-cov
*.seed
# Logs
logs
*.log
*.csv
*.dat
*.out
*.pid
*.gz
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
logs
results
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variables file
.env

node_modules
npm-debug.log
# gatsby files
.cache/
public

build
.s3config.json
# Mac files
.DS_Store

*.DS_Store
# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity

_www
www
*~
# IDE
*.swp
.tags

# Things in public js folder are built via Browserify
public/js/**/*.js
_harp/js/**/*.js
_harp/vendor/**/*
# Now
now.json
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/carbon
lts/dubnium
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

163 changes: 0 additions & 163 deletions Gruntfile.js

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Brightcove, Inc
Copyright (c) Brightcove, Inc

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
71 changes: 28 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,37 @@
# videojs.com (the [video.js](https://github.com/videojs/video.js) website)
# Videojs.com

The site uses [Harp](http://harpjs.com) as the main framework. It also uses [Browserify](http://browserify.com) and [Babel](https://github.com/babel/babelify) for ES2015 (javascript) modules.
This is the repo for the videojs.com website, including our blog. It uses the [Gatsby framework](https://gatsbyjs.org), so if you have questions about how things like the static rendering work, their documentation is a great place to start

## Blog

### Setup
Blog posts are written using [mdx](https://mdxjs.com/), a flavor of Markdown that allows you to include React components. Writing a new blog post is done by adding a new `.mdx` file in [src/mdx-pages/blog](src/mdx-pages/blog) with the correct metadata at the top. Moving forward, consider naming the file starting with the date to make organization a little easier long term.

1. Install the dependencies
```markdown
---
title: This is an awesome post
tags:
- news
- stats
author:
name: Matt McClure
github: mmcc
alias:
- post/wow-neat-what-a-post
date: 2040-01-01 00:00:00
---

```
$ npm install
```
Wow this is a really great post. Such thought leadership.
```

2. Run the grunt dev task to generate the files and run a server. Once it's running you can start working. A local preview is running on port 9000.
## Running it locally

> Note: I sometimes get errors here and have to downgrade to node v4 - @heff
Check out the repo locally, then npm install and off you go!

```
$ grunt dev
```
```
$ git checkout https://github.com/videojs/videojs.com
$ cd videojs.com
$ npm install
$ npm run develop
```

### Deploy

We use github pages for site hosting. The site files live in the `master` branch and then are moved to the `gh-pages` branch to be deployed. The file structure is changed during the deploy process so gh-pages is **never** merged back into master.

1. Make sure the `master` branch is up to date.

```
git pull master
```
2. Checkout the gh-pages branch and make sure it's up to date, then merge master into it.
```
git checkout gh-pages
git pull gh-pages
git merge master
```
3. Generate the dist files.
```
grunt dist
```
4. Push the changes.
```
git push
```
> **If you accidently run `grunt dist` in the master branch you need to reset your branch. Don't push dist files to master.
If all went according to plan, you should now be able to visit the website at http://localhost:8000
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

12 changes: 0 additions & 12 deletions _harp/_data.json

This file was deleted.

Loading

0 comments on commit 74032e3

Please sign in to comment.