Skip to content

Nick-Rivera/declaredesign.org

 
 

Repository files navigation

DeclareDesign project web site - declaredesign.org

Build Status

Setting up the build environment on macOS Mojave.

  1. Install Homebrew.

  2. Change the default shell to the latest Bash version.

  3. Install the GNU versions of the shell utilities (coreutils, findutils, gnu-tar, gnu-sed, gawk, gnutls, gnu-indent, gnu-getopt, grep) and set them as default on your path. An example of what the /etc/paths file should look like is here. Add the first five lines in that example file to the top of your /etc/paths file.

  4. Install Node, Python 3, Hugo, Pandoc, and Pandoc-citeproc with Homebrew: brew install node python hugo pandoc pandoc-citeproc.

  5. Make sure that you have the latest version of npm and the Python tools. Run this to update them.

  6. Install R manually from here. Do not install R through Homebrew!

  7. Install gfortran 6.1 from here.

  8. Install R Studio from here to make dependency installations easier.

  9. In R Studio, click on Update under the Packages tab in the bottom right window and update all the packages when prompted.

The packages tab in R Studio.

Updating in R Studio.

  1. After that, install the following dependencies by clicking on the Install button (next to the Update button).

    • tidyverse
    • devtools
    • blogdown
    • checkpoint
    • testthat
    • diffobj
    • formatR

Installing packages in R.

  1. Run devtools::install_github("Nick-Rivera/pkgdown") in the R console and select the 3rd option when prompted.

The R console.

  1. Also run devtools::install_github("tidymodels/broom") in the R console.

  2. Follow all the steps below in this README to get the Python environment set up for local building.

How do I run the build script locally?

Warning: Running this script will erase blog posts in the content directory. Make sure that you have committed them before running this script. Also, you must git reset the project directory before you build the blog pages because building any of the other sections deletes the blog pages.

Steps for running locally on macOS:

First, cd into the declaredesign.org directory:

cd ~/Downloads/declaredesign.org

Then run npm install.

Then, get your Python environment set up in that directory:

# Update your Python packages.
python3 -m pip install --upgrade pip setuptools wheel virtualenv

# Create a new virtual environment.
virtualenv venv
source venv/bin/activate

# Install the required package for the script to run.
python3 -m pip install pyyaml

Next, add a GitHub Personal Access API token to the top of the file scripts/run_build_locally.py on the line GITHUB_API_TOKEN = "". The token only needs the public_repo permission.

GitHub API Token

Now, run that script with Python:

python3 scripts/run_build_locally.py

After closing your terminal session, you will need to rerun source venv/bin/activate in the declaredesign.org directory if you want to run the build script again.

Travis Secure Keys

The secure keys at the top of the page in Travis are for invalidating the CloudFront cache. The secure key at the bottom of the page is for uploading built files to S3.

About

Declare Design project web site

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 92.4%
  • JavaScript 2.4%
  • TeX 2.1%
  • Shell 0.9%
  • CSS 0.9%
  • Python 0.6%
  • Other 0.7%