-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Nathan Farrington edited this page Jan 31, 2018
·
5 revisions
-
Create a directory for your repos.
mkdir ~/workspace cd ~/workspace
-
Clone the repos. The
nathanfarrington.com.git
repo contains the source. Thepelican-plugins.git
repo is required to build the source. Thenfarring.github.com.git
repo contains the generated website that will be hosted by GitHub Pages.git clone [email protected]:nfarring/nathanfarrington.com.git git clone https://github.com/getpelican/pelican-plugins.git git clone [email protected]:nfarring/nfarring.github.com.git
-
Create a Python virtual environment.
cd ~/workspace/nathanfarrington.com python3 -m venv venv venv/bin/pip3 install -r requirements.txt
-
Create a new terminal window.
-
Start the daemon.
cd ~/workspace/nathanfarrington.com venv/bin/pelican -r content
-
Create a new terminal window. Start the daemon.
cd ~/workspace/nathanfarrington.com/output ../venv/bin/python -m pelican.server
-
Create a new terminal window. Launch a web browser.
open "http://localhost:8000"
-
Stop all daemons created in previous steps.
-
Generate the website.
cd ~/workspace/nathanfarrington.com rm -rf ~/workspace/nathanfarrington.com/output venv/bin/pelican content
-
Copy the generated website to the repo.
rsync --verbose --archive --delete --exclude=.git --stats --human-readable output/ ../nfarring.github.com/
-
Preview the website locally. Create a new terminal window.
cd ~/workspace/nfarring.github.com ../nathanfarrington.com/venv/bin/python -m pelican.server
-
Create a new terminal window. Launch a web browser.
open "http://localhost:8000"
-
Commit and push.
git add . git commit -m "Generated by Pelican" git push