This is the code of my personal blog. The live version is accessible here : geoffreyhuck.com
It is based upon the Symfony Framework and allows writing articles in the AsciiDoc format, which is very convenient to add mathematical formulas, graphic plots, code, and other schemas such as neural network representations.
composer install
bin/console doctrine:schema:update --force
bin/console app:create:admin
yarn install
sudo apt install -y asciidoctor
sudo gem install asciidoctor-diagram
sudo apt install -y gnuplot
sudo apt install -y graphviz
sudo apt-get -qq -y install bison flex libffi-dev libxml2-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev fonts-lyx cmake fonts-lyx
sudo gem install asciidoctor-mathematical
sudo apt install php-imagick imagick
sudo apt-get install -y jpegoptim optipng pngquant gifsicle webp
sudo npm install -g svgo
Add the following into crontab to enable the spam verification.
* * * * * /path/to/app console app:verify:comments
Copy the .env file into .env.local and fill up the configuration. For production, don't forget to put :
APP_ENV=prod
APP_SECRET=you_have_to_modify_this
You can get a free Akismet key to fight against spam.
HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1)
sudo chown -R $HTTPDUSER:$HTTPDUSER articles
sudo chmod -R 755 articles
sudo chown -R $HTTPDUSER:$HTTPDUSER public/articles
sudo chmod -R 755 public/articles
To write an article, create a new article after login as an admin. The format is AsciiDoc. The article will be built on save, and the images will be optimized automatically.
To run the tests, type the following command :
vendor/bin/phpunit
In development environnement :
yarn encore dev --watch
Build for production :
yarn encore prod
Apache License 2.0