Clone repository with SSH for working with ghp-import
(it's easier).
Install requiremens pip install pelican markdown ghp-import
.
-
Write article with Notion.
-
Export in Markdown. It will include links to static images.
-
Navigate to blog repository.
-
git checkout website
- At this point, it’s a good idea to run the development server to check everything is running smoothly.
-
Create new folder in content/blog with the scheme
000X_simple_title
, whereX
is the monotonically increasing integer identifying the article. -
Copy the exported files from Notion to this new folder.
-
Fix the header fields in the
.md
file.Title: Dinoboy western Date: 2021-01-28 tags: zen, motorcycles
-
Fix image links.
- Prepend
{attach}
before the path of every image in the article.
- Prepend
-
Fix links to other articles
- Use paths relative to the .md of the article, e.g. if the article lives in the folder
content/blog/0002_dinoboy_western
, it can reference another article like this[link text]({filename}../0001_previous_article/the_alienstones.md)
.
- Use paths relative to the .md of the article, e.g. if the article lives in the folder
-
Add the following to the end of each article.
What do you think? How would you improve on this? Drop me a message at blog@diogoaos.com.
pelican -r -l content -o output -s pelicanconf.py -p 5555
pelican content -o output -s publishconf.py
ghp-import output/ -b gh-pages -p -c www.diogoaos.com
python -m http.server 8000 --dir content\slides\
Configure line endings git: https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings#global-settings-for-line-endings