Add README file with instructions for local dev env
authorMichael McMahon <michael@fsf.org>
Sun, 20 Nov 2022 06:05:55 +0000 (01:05 -0500)
committerMichael McMahon <michael@fsf.org>
Sun, 20 Nov 2022 06:05:55 +0000 (01:05 -0500)
README.md [new file with mode: 0644]

diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..c2b8c18
--- /dev/null
+++ b/README.md
@@ -0,0 +1,58 @@
+# LibrePlanet Conference site
+
+## How to set up your LP static site dev environment
+
+Setting up a local dev environment will allow you to see changes to the LP
+static site before you push to the live site.
+
+If you do not have a repo that you're already working out of:
+
+    git clone https://vcs.fsf.org/git/libreplanet-static.git
+
+Checkout the stable branch.
+
+    cd libreplanet-static
+    git checkout stable
+    cd ..
+
+Install and configure Apache, move your git repo:
+
+    sudo apt install -y apache2
+
+    sudo a2enmod include
+
+    sudo mv libreplanet-static/ /var/www/
+
+Edit the default apache configuration with your preferred editor:
+
+    sudo editor /etc/apache2/sites-enabled/000-default.conf
+
+Change the DocumentRoot line to:
+
+    DocumentRoot /var/www/libreplanet-static
+
+LibrePlanet static site uses Server Side Includes (SSI) which need to be
+enabled in your apache configuration. Paste the following five lines under
+DocumentRoot. They don't have to be indented:
+
+```
+<Directory /var/www/libreplanet-static/>
+        SSILegacyExprParser on
+        Options +Includes
+        XBitHack on
+</Directory>
+```
+
+Restart Apache:
+
+    sudo systemctl restart apache2
+
+Now you should be able to see the main site under at <http://localhost/2023>
+
+Replace `2023` with the year you want to work on.
+
+Note that if you visit the root of the site: http://localhost then you will be
+redirected to https://libreplanet.org, so you won't see your own changes there.
+
+To make edits to the git repo, just cd /var/www/html/libreplanet-static/, and
+make changes there.