Skip to content

Commit

Permalink
Update INSTALL.md (#2091)
Browse files Browse the repository at this point in the history
  • Loading branch information
pourmand1376 authored Jan 19, 2024
1 parent 6700000 commit 7c617d8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
28 changes: 21 additions & 7 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Table of Contents

- [Installing and Deploying](#installing-and-deploying)
- [Recommended Approach](#recommended-approach)
- [Local Setup on Windows](#local-setup-on-windows)
- [Local Setup using Docker (Recommended)](#local-setup-using-docker-recommended)
- [Build your own docker image](#build-your-own-docker-image)
- [Local Setup (Legacy)](#local-setup-legacy)
- [Deployment](#deployment)
- [For personal and organization webpages](#for-personal-and-organization-webpages)
- [For project pages](#for-project-pages)
- [Enabling automatic deployment](#enabling-automatic-deployment)
- [Manual deployment to GitHub Pages](#manual-deployment-to-github-pages)
- [Deployment to another hosting server (non GitHub Pages)](#deployment-to-another-hosting-server-non-github-pages)
- [Deployment to a separate repository (advanced users only)](#deployment-to-a-separate-repository-advanced-users-only)
- [Upgrading from a previous version](#upgrading-from-a-previous-version)

# Installing and Deploying

The recommended approach for using **al-folio** is to first create your own site using the template with as few changes as possible, and only when it is up and running customize it however you like. This way it is easier to pinpoint what causes a potential issue in case of a bug. The minimum steps required to create your own site are:
Expand All @@ -18,7 +35,7 @@ Starting version [v0.3.5](https://github.com/alshedivat/al-folio/releases/tag/v0

## Local setup on Windows

If you are using Windows, it is **highly recommended** to use [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install), which is a compatibility layer for running Linux on top of Windows. You can follow [these instructions](https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-11-with-gui-support) to install WSL and Ubuntu on your machine. You only need to go up to the step 4 of the tutorial (you don't have to enable the optional `systemd` nor the graphical applications), and then you can follow the instructions below to install docker. You can install docker natively on Windows as well, but it has been having some issues as can be seen in #1540, #2007.
If you are using Windows, it is **highly recommended** to use [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install), which is a compatibility layer for running Linux on top of Windows. You can follow [these instructions](https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-11-with-gui-support) to install WSL and Ubuntu on your machine. You only need to go up to the step 4 of the tutorial (you don't have to enable the optional `systemd` nor the graphical applications), and then you can follow the instructions below to install docker. You can install docker natively on Windows as well, but it has been having some issues as can be seen in [#1540](https://github.com/alshedivat/al-folio/issues/1540), [#2007](https://github.com/alshedivat/al-folio/issues/2007).

## Local setup using Docker (Recommended)

Expand All @@ -34,11 +51,11 @@ $ docker compose pull
$ docker compose up
```

Note that when you run it for the first time, it will download a docker image of size 400MB or so. To see the template running, open your browser and go to `http://localhost:8888`. You should see a copy of the theme's demo website.
Note that when you run it for the first time, it will download a docker image of size 400MB or so. To see the template running, open your browser and go to `http://localhost:8080`. You should see a copy of the theme's demo website.

Now, feel free to customize the theme however you like (don't forget to change the name!). After you are done, you can use the same command (`docker compose up`) to render the webpage with all you changes. Also, make sure to commit your final changes.
Now, feel free to customize the theme however you like (don't forget to change the name!). Also, your changes should be automatically rendered in real-time (or maybe after a few seconds).

> To change port number, you can edit `docker-compose.yml` file.
> Beta: You can also use the slimmed docker image with a size below 100MBs and exact same functionality. Just use `docker compose up -f docker-compose-slim.yml`
### Build your own docker image

Expand All @@ -54,9 +71,6 @@ $ docker compose up --build
If you want to use a specific docker version, you can do so by changing `latest` tag to `your_version` in `docker-compose.yaml`. For example, you might have created your website on `v0.10.0` and you want to stick with that.

- Beta
You can also change the docker image tag to slim! It is a slimmed docker image with a size of below 100MBs (same functionality).

## Local Setup (Legacy)

For a hands-on walkthrough of running al-folio locally without using Docker, check out [this cool blog post](https://george-gca.github.io/blog/2022/running-local-al-folio/) by one of the community members!
Expand Down
11 changes: 11 additions & 0 deletions docker-compose-slim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3"
# this file uses prebuilt image in dockerhub
services:
jekyll:
image: amirpourmand/al-folio:slim
build: .
ports:
- 8080:8080
- 35729:35729
volumes:
- .:/srv/jekyll

0 comments on commit 7c617d8

Please sign in to comment.