[PYTHON] Blog Markdown mit Pelikan

Das Verwalten von WordPress ist mühsam. Ich habe versucht, es einfacher zu machen, indem ich einfach auf Github festschreibe / drücke. Ich bin immer noch in der Mitte, aber ich möchte bis zum Hochladen auf Github schreiben.

Referenz

Umgebung

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.

Verschiedene notwendige Bibliotheken wie jinja2 sind ebenfalls installiert.

Projekterstellung

Verzeichnis erstellen

mkdir -p mysite
cd mysite

Projekterstellung

Wenn ich den Befehl ausführe, erhalte ich verschiedene Fragen.

> 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

Verzeichnis erstellt


mysite
├─content
└─output

** Der Abschlag, den ich gemacht habe, sieht so aus ↓ **


Title: My First Review Date: 2010-12-03 10:20 Category: Review Tags: Test, Post Zusammenfassung: Wie es aussieht

\ # Titel testen

Wie wird dieser Inhalt ausgegeben?

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

### Tabelle

|Artikel|Inhalt| |---|---| |python|Programmiersprache|

\ ### Aufführen

\ * Aufführen \ * Aufführen

\ 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__

Lauf

> pelican --listen

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

image.png

Thema ändern

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

Recommended Posts

Blog Markdown mit Pelikan
Markdown-Ausgabe mit Django
So installieren Sie Pelican Blog
Thema zum Pelican Blog hinzugefügt
Bloggen mit Pelican unter Windows
Verwenden Sie Github-Flavored-Markdown im Pelican Blog
Markdown mit Jupyter-Notebook verwenden (mit Verknüpfung)
Ich möchte wirklich GitHub Flavored Markdown (GFM) mit Pelican verwenden!
[Python] Automatisieren Sie Pelican Builds mit Travis CI
Ich möchte einen Blog mit Jupyter Notebook schreiben