[PYTHON] Blog Markdown avec Pelican

La gestion de wordpress est gênante, J'ai essayé de le rendre plus simple en validant / poussant vers github. Je suis toujours au milieu, mais je veux écrire au point de télécharger sur github.

référence

environnement

Installation

> pip install pelican markdown
Collecting pelican
  Downloading pelican-4.5.0-py2.py3-none-any.whl (673 kB)
     |████████████████████████████████| 673 kB 2.2 MB/s
Collecting markdown
  Downloading Markdown-3.2.2-py3-none-any.whl (88 kB)
     |████████████████████████████████| 88 kB 4.0 MB/s
Collecting feedgenerator>=1.9
  Downloading feedgenerator-1.9.1-py3-none-any.whl (22 kB)
Collecting jinja2>=2.11
  Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
     |████████████████████████████████| 125 kB 6.8 MB/s
Collecting unidecode
  Downloading Unidecode-1.1.1-py2.py3-none-any.whl (238 kB)
     |████████████████████████████████| 238 kB 6.4 MB/s
Collecting pygments
  Downloading Pygments-2.7.0-py3-none-any.whl (950 kB)
     |████████████████████████████████| 950 kB 6.8 MB/s
Collecting docutils>=0.15
  Downloading docutils-0.16-py2.py3-none-any.whl (548 kB)
     |████████████████████████████████| 548 kB 6.4 MB/s
Collecting python-dateutil
  Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
     |████████████████████████████████| 227 kB 6.8 MB/s
Collecting blinker
  Downloading blinker-1.4.tar.gz (111 kB)
     |████████████████████████████████| 111 kB ...
Requirement already satisfied: pytz>=0a in c:\users\username\appdata\local\programs\python\python38\lib\site-packages (from pelican) (2020.1)
Collecting six
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl (16 kB)
Building wheels for collected packages: blinker
  Building wheel for blinker (setup.py) ... done
  Created wheel for blinker: filename=blinker-1.4-py3-none-any.whl size=13455 sha256=57daa4945a8c37e456b038a3022c48e58d2d7f7e1d02cb7efc612448ad4b89ef
  Stored in directory: c:\users\username\appdata\local\pip\cache\wheels\b7\a5\68\fe632054a5eadd531c7a49d740c50eb6adfbeca822b4eab8d4
Successfully built blinker
Installing collected packages: six, feedgenerator, MarkupSafe, jinja2, unidecode, pygments, docutils, python-dateutil, blinker, pelican, markdown
Successfully installed MarkupSafe-1.1.1 blinker-1.4 docutils-0.16 feedgenerator-1.9.1 jinja2-2.11.2 markdown-3.2.2 pelican-4.5.0 pygments-2.7.0 python-dateutil-2.8.1 six-1.15.0 unidecode-1.1.1
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the 'c:\users\username\appdata\local\programs\python\python38\python.exe -m pip install --upgrade pip' command.

Diverses bibliothèques nécessaires telles que jinja2 sont également installées.

Création de projet

Créer un répertoire

mkdir -p mysite
cd mysite

Création de projet

Lorsque j'exécute la commande, je reçois diverses questions.

> pelican-quickstart
Welcome to pelican-quickstart v4.5.0.

This script will help you create a new Pelican-based website.

Please answer the following questions so this script can generate the files
needed by Pelican.


> Where do you want to create your new web site? [.] .
> What will be the title of this web site? MyBlog
> Who will be the author of this web site? HyunwookPark
> What will be the default language of this web site? [Japanese] ja
> Do you want to specify a URL prefix? e.g., https://example.com   (Y/n) n
> Do you want to enable article pagination? (Y/n) n
> What is your time zone? [Europe/Paris] Asia/Tokyo
> Do you want to generate a tasks.py/Makefile to automate generation and publishing? (Y/n) Y
> Do you want to upload your website using FTP? (y/N) N
> Do you want to upload your website using SSH? (y/N) N
> Do you want to upload your website using Dropbox? (y/N) N
> Do you want to upload your website using S3? (y/N) N
> Do you want to upload your website using Rackspace Cloud Files? (y/N) N
> Do you want to upload your website using GitHub Pages? (y/N) y
> Is this your personal page (username.github.io)? (y/N) y
Done. Your new project is available at D:\work\mysite

Répertoire créé


mysite
├─content
└─output

** La démarque que j'ai faite ressemble à ceci ↓ **


Title: My First Review Date: 2010-12-03 10:20 Category: Review Tags: test, post Résumé: à quoi ça ressemble

\ # Titre du test

Comment ce contenu est-il sorti?

```python print('HelloWorld') ```

### table

|article|Contenu| |---|---| |python|Langue du programme|

\ ### Liste

\ * Liste \ * Liste

\ 1. Liste \ 1. Liste


> pelican content
WARNING: Watched path does not exist: mysite\content\images
Done: Processed 1 article, 0 drafts, 0 pages, 0 hidden pages and 0 draft pages in 0.31 seconds.
mysite
├─content
├─output
│  ├─author
│  ├─category
│  ├─tag
│  └─theme
│      ├─css
│      ├─fonts
│      └─images
│          └─icons
└─__pycache__

Courir

> pelican --listen

Serving site at: 127.0.0.1:8000 - Tap CTRL-C to stop

image.png

Change le thème

https://github.com/getpelican/pelican-themes

Recommended Posts

Blog Markdown avec Pelican
Sortie Markdown avec Django
Comment installer le blog Pelican
Thème ajouté au blog Pelican
Bloguer avec Pelican sur Windows
Utilisez Github-Flavored-Markdown sur le blog Pelican
Utiliser Markdown avec le notebook Jupyter (avec raccourci)
Je veux vraiment utiliser GitHub Flavored Markdown (GFM) avec Pelican!
[Python] Automatisez les builds Pelican avec Travis CI
Je veux écrire un blog avec Jupyter Notebook