GithubHelp home page GithubHelp logo

huioo / kevin-deldycke-blog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kdeldycke/kevin-deldycke-blog

0.0 1.0 0.0 182.21 MB

:notebook: My blog, based on Pelican.

Home Page: https://kevin.deldycke.com

License: Other

HTML 73.27% Python 26.73%

kevin-deldycke-blog's Introduction

Kevin Deldycke's blog

These are the source files of the content of my blog, which is powered by Pelican, a static site generator written in Python.

The theme it uses is called Plumage.

Installation

Fetch a copy of the repository:

$ git clone --recursive https://github.com/kdeldycke/kevin-deldycke-blog.git
$ cd ./kevin-deldycke-blog

To fetch and/or reset submodules to their commited reference:

$ git submodule update --init --recursive

Install dependencies:

$ pipenv install

Development

Update to latest submodules:

$ git submodule init
$ git submodule update --remote --merge

In one terminal, run:

$ invoke regenerate

And in another:

$ invoke serve

Then go to http://localhost:8000.

Deployment

Prepare site for publishing:

$ pelican ./content -o ./output -s ./publishconf.py --verbose

Setup AWS CLI:

$ aws configure
AWS Access Key ID [None]: (...)
AWS Secret Access Key [None]: (...)
Default region name [None]:
Default output format [None]:

$ cat ~/.aws/credentials
[default]
aws_access_key_id = (...)
aws_secret_access_key = (...)

$ cat ~/.aws/config
[default]

Create the destination bucket if it doesn't exist yet:

$ aws s3 mb s3://kevin.deldycke.com

Setup bucket:

$ aws s3 website s3://kevin.deldycke.com --index-document index.html --error-document 500-error/index.html

Upload content to S3 bucket (full documentation):

$ aws s3 sync ./output s3://kevin.deldycke.com --delete --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers [email protected]

And to check metadata, for the index.html file at the root for example:

$ aws s3api head-object --bucket kevin.deldycke.com --key index.html

Register and install a new Let's Encrypt certificate:

$ AWS_ACCESS_KEY_ID="(...)" AWS_SECRET_ACCESS_KEY="(...)" certbot --agree-tos -a certbot-s3front:auth --certbot-s3front:auth-s3-bucket kevin.deldycke.com -i certbot-s3front:installer --certbot-s3front:installer-cf-distribution-id (...) -d kevin.deldycke.com --config-dir ./letsencrypt --logs-dir ./letsencrypt/logs --work-dir ./letsencrypt --non-interactive --email [email protected]
Saving debug log to ./letsencrypt/logs/letsencrypt.log
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for kevin.deldycke.com
Found credentials in environment variables.
Calling s3:put_object with {'Body': u'(...)', u'Bucket': 'kevin.deldycke.com', 'Key': u'.well-known/acme-challenge/(...)', 'ACL': 'public-read'}
Starting new HTTPS connection (1): s3.amazonaws.com
Waiting for verification...
Cleaning up challenges
Starting new HTTPS connection (1): s3.amazonaws.com
Generating key (2048 bits): ./letsencrypt/keys/0000_key-certbot.pem
Creating CSR: ./letsencrypt/csr/0000_csr-certbot.pem
Non-standard path(s), might not work with crontab installed by your operating system package manager
Starting new HTTPS connection (1): iam.amazonaws.com
Starting new HTTPS connection (1): cloudfront.amazonaws.com
An error occurred (NoSuchEntity) when calling the DeleteServerCertificate operation: The Server Certificate with name le-kevin.deldycke.com cannot be found.

-------------------------------------------------------------------------------
Congratulations! You have successfully enabled https://kevin.deldycke.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=kevin.deldycke.com
-------------------------------------------------------------------------------

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at
   ./letsencrypt/live/kevin.deldycke.com/fullchain.pem.
   Your cert will expire on 2017-04-10. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - If you lose your account credentials, you can recover through
   e-mails sent to [email protected].
 - Your account credentials have been saved in your Certbot
   configuration directory at
   ./letsencrypt. You should
   make a secure backup of this folder now. This configuration
   directory will also contain certificates and private keys obtained
   by Certbot so making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

To renew the cert, you just need to re-run the command above.

TODO

Content

Theme

License

The content of this repository is copyrighted (c) 2004-2017 Kevin Deldycke.

Unless contrary mention, the content of this repository is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.

kevin-deldycke-blog's People

Contributors

clacke avatar kdeldycke avatar victorlamoine avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.