Skip to content

Instantly share code, notes, and snippets.

@rebolek
Last active April 23, 2020 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rebolek/2f5d8bf785f1e3983e3509cd81a9d2b9 to your computer and use it in GitHub Desktop.
Save rebolek/2f5d8bf785f1e3983e3509cd81a9d2b9 to your computer and use it in GitHub Desktop.
Get Red website running
#!/bin/sh
# This is what needs to be done on fresh Ubuntu 19.10
# update your system, just in cause
sudo apt-get update
sudo apt-get -y upgrade
# install required tools: curl, gnupg (applies to LXC version of Ubuntu, ISO has them)
sudo apt-get -y install curl gnupg
# install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
# login again to restart terminal
bash --login
# install node v13: latest version v14 gives strange errors
nvm install 13
# install hugo
sudo apt-get -y install hugo
# install yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get -y install yarn
# clone repo, update .gitmodules to use HTTPS instead of GIT protocol and fix Featherweight theme bug
git clone https://github.com/red/web-red.git
cd web-red
sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
git submodule update --init --recursive
sed -i 's/LastMod/Lastmod/g' themes/featherweight/layouts/_default/*
# prepare yarn
yarn install
# start yarn
yarn start
# you should be able to connect to https://localhost:1313 now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment