ProDOS-8 / ProDOS-8.github.io

ProDOS-8 Website
https://prodos8.com/
MIT License
12 stars 5 forks source link

ProDOS-8 Website

Requirements for editing the site

For editing HTML files-only

Required for building and serving locally

gpg --keyserver hkp://keys.gnupg.net \
    --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
                7D2BAF1CF37B13E2069D6956105BD0E739499BDB

curl -sSL https://get.rvm.io | bash -s stable

rvm osx-ssl-certs
rvm list known | grep "^\[ruby-\]"
rvm install ruby-2.4.1
rvm list
rvm use ruby-2.4.1

gem install bundler jekyll

Required for rebuilding the CSS using SASS

npm install

Making changes to the Navigation Bar

Changing the home page content, slides, and promos

Using Gulp to perform functions in a repeatable way

Using Gulp

gulp --tasks
gulp --tasks-simple

gulp --tasks

Running just gulp will compile the sass and compile the jekyll site

gulp

Compile files from _scss into both _site/css (for live injecting) and site (for future jekyll builds)

gulp sass

gulp sass

Compile and minify Javascript into one bundle file

gulp js

Building and Viewing the website locally

Jekyll can build the site

jekyll build
aws s3 sync _site/ s3://prodos8.com/

Jekyll can serve the site

jekyll serve

jekyll serve

Publishing to staging using s3_website

Install s3_website

gem install s3_website

s3_website configuration

FILE: s3_website.yml

s3_id:     <%= ENV['AWS_ACCESS_KEY_ID'] %>
s3_secret: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
s3_bucket: prodos8-staging

gzip:
  - .html
  - .css
  - .md
gzip_zopfli: false

AWS Environment Variables

FILE: ~/.bash_profile

export AWS_ACCESS_KEY_ID="AKIxxxxxxxxxxxxx"
export AWS_SECRET_ACCESS_KEY="xxxxxxxxxxxx"
export AWS_REGION="us-east-1"
export AWS_DEFAULT_REGION="us-east-1"
export AWS_ACCESS_KEY_ID="AKIxxxxxxxxxxxxx"
export AWS_SECRET_ACCESS_KEY="xxxxxxxxxxxx"

s3_website push

Use s3_website to publish

export AWS_ACCESS_KEY_ID="AKIxxxxxxxxxxxxx"
export AWS_SECRET_ACCESS_KEY="xxxxxxxxxxxx"

s3_website push

Sync a fork of a repository to keep it up-to-date with the upstream repository.

This BIG-gotcha difference between Stash Bitbucket and GitHub

Configure a remote for a fork

##
## List the current configured remote repository for your fork.
##
git remote -v

# origin  git@github.com:DevoKun/ProDOS-8.github.io.git (fetch)
# origin  git@github.com:DevoKun/ProDOS-8.github.io.git (push)

##
## Specify a new remote upstream repository that will be synced with the fork.
##
git remote add upstream git@github.com:ProDOS-8/ProDOS-8.github.io.git

##
## Verify the new upstream repository you've specified for your fork.
##
git remote -v

# origin    git@github.com:DevoKun/ProDOS-8.github.io.git (fetch)
# origin    git@github.com:DevoKun/ProDOS-8.github.io.git (push)
# upstream  git@github.com:ProDOS-8/ProDOS-8.github.io.git (fetch)
# upstream  git@github.com:ProDOS-8/ProDOS-8.github.io.git (push)

Fetch from upstream and merge to local master

git fetch upstream

##
## If not on master, switch to master
## master is not the same as upstream/master
## upstream/master is on github
## master is local to your laptop
##
git branch
git checkout master
git branch
git merge upstream/master

Create a script to resync the branch for you

git remote -v

git fetch upstream
git branch
git checkout master
git branch
git merge upstream/master