From 487cb0595e695501fd0895ffd03ab229b930b0c8 Mon Sep 17 00:00:00 2001 From: siinus Date: Tue, 23 May 2023 22:52:05 +0300 Subject: [PATCH] Create environment setup guide for MacOS (#73) * Create environment setup guide for MacOS * Fix indentations --------- Co-authored-by: Andree Uuetoa --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c8d93ac..e12c15c 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,17 @@ Materials are on `Google Drive > Lapikud > Tarkvara > Väliveeb` ## 1. Create Issues -Easiest way to help would be to create issuses about things that are missing and wrong +Easiest way to help would be to create issues about things that are missing and wrong ## 2. Fork this repo and create a pull request Fork this repo to your own account and create a pull request for changes you have done in there -# How to setup devenvironment +# How to setup development environment -0. (Windows) Install the Windows Subsystem for Linux +Windows: + +0. Install the Windows Subsystem for Linux Install Ubuntu @@ -45,8 +47,54 @@ Fork this repo to your own account and create a pull request for changes you hav No one wants to download 5MB images that are then shown in a 100x100px box. - **Always resize images before commiting them!** + **Always resize images before committing them!** + + sudo apt-get install imagemagick + sh convert-past-management-images.sh + +MacOS: + +0. Install Homebrew if you don't have it already + + If you're using Bash, write `/bin/bash` instead of `/bin/zsh`. + + /bin/zsh -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + +1. Install the latest stable version of Ruby + + brew install ruby + + Also configure your shell environment. + If you're using Bash, replace `.zshrc` with `.bash_profile`. + + if [ -d "/usr/local/opt/ruby/bin" ]; then + export PATH=/usr/local/opt/ruby/bin:$PATH + export PATH=`gem environment gemdir`/bin:$PATH + fi + + Check that Ruby is working. + + ruby -v + +2. Install the latest Jekyll gem + sudo gem install jekyll + +3. Clone repo + + git clone https://github.com/Lapikud/lapikud.github.io.git + +4. Serve the page + + cd lapikud.github.io + jekyll serve --host 0.0.0.0 + +5. Image converter usage (requires imagemagick) + + No one wants to download 5MB images that are then shown in a 100x100px box. + + **Always resize images before committing them!** + sudo apt-get install imagemagick sh convert-past-management-images.sh