Skip to content

cmftall/alexioannides

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alexioannides

Python source code for generating my personal website - hosted by GitHub pages at alexioannides.github.io - using the Pelican framework for static websites, together with Flex theme.

The output of the build process is written to the output folder in the root directory, that is not version controlled using this repository. Instead, the output directory has its own repository at alexioannides, that is necessary for hosting with GitHub pages.

Managing Dependencies

We use pipenv for managing project dependencies and Python environments (i.e. virtual environments). All of the direct packages dependencies required to run the code (i.e. Pelican and Markdown), are described in the Pipfile. Their precise downstream dependencies are described in Pipfile.lock.

Installing Pipenv

To get started with Pipenv, first of all download it - assuming that there is a global version of Python available on your system and on the PATH, then this can be achieved by running the following command,

pip3 install pipenv

Pipenv is also available to install from many non-Python package managers. For example, on OS X it can be installed using the Homebrew package manager, with the following terminal command,

brew install pipenv

For more information, including advanced configuration options, see the official pipenv documentation.

Installing this Projects' Dependencies

Make sure that you're in the project's root directory (the same one in which Pipfile resides), and then run,

pipenv install

Building the Website

To build the website we need to call Pelican,

pipenv run pelican

Testing the Site Locally

We recommend setting RELATIVE_URLS = True when testing (do not forget to revert this before deploying) and then executing the following,

cd output
pipenv run python -m pelican.server

A test version of the website will then be available at http://localhost:8000.

Deploying to GitHub Pages

After testing locally, first of all ensure that RELATIVE_URLS = False, rebuilding the website if necessary. Then, make sure that you are still in the output directory and remember that this is version controlled by a different repository, that now needs new changes to be committed and pushed to master as usual - e.g.,

git add -A
git commit -m "latest changes to alexioannides.github.io"
git push origin master

The updated website is usually available within a minute or two.

About

Python source code for generating my website at alexaioannides.github.io.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • CSS 52.9%
  • HTML 40.1%
  • Python 5.6%
  • Shell 1.2%
  • JavaScript 0.2%