Wordpress To Jekyll Changes
Description:
I did the following steps once I moved my site from Wordpress to Jekyll. Mainly used find and replace in regex/normal mode to remove unwanted stuff from previous blogs.
To Resolve:
Changes To MD Files:
-
Remove ‘blogger’ entries at top of file
- Find:
^blogger:.*$\n
- Replace: blank
NOTE: This uses the formula
^CONTENT.*$\n
or^.*CONTENT.*$\n
in the find string to remove not just the text, but the entire line. - Find:
- Remove ‘id’ entries at top of file
- Find:
^id:.*$\n
- Replace: blank
- Find:
- Remove span elements
- Find:
<span style="background-color: white;">
- Replace: blank
- Find:
<span
- Replace: blank
- Find:
- Replace special character ascii codes with what they are.
- Find:
‘
- Replace: single quote open
- Find:
’
- Replace: single quote close
- Find:
“
- Replace: open double quotes
- Find:
”
- Replace: open double quotes
- Find: ``–`
- Replace: hypen; I’m thinking of making this => but I’m sure it will break everything
- Find:
- Replace: blank
- Find:
-
This is by far the most time consuming, but the idea is that with Markdown, you want anything numbered to be on the far left and anything that needs to be added between numbers needs to be indented by at least 2 space characters, I use 3.
- So what I would have on a post used to look like:
1 2 3 4 5
1. Some task 2. Some other task Some image Some Code 3. Some other task
- All of these would be at the same level. When the document rendered with Jekyll, it would re-number anything between numbers so you would see:
1 2 3 4 5
1. Some task 2. Some other task Some image Some Code 1. Some other task
- Notice how step 3 turned to 1? What the hell? Well it’s because I need to indent like so:
1 2 3 4 5
1. Some task 2. Some other task Some image Some Code 3. Some other task
- Then it renders properly!
-
Next, I had to go through substeps and make them
-
instead of1a.
. For example:- You would see something like:
1 2
1. Some task 1a. Some subtask
- Correct them to look like:
1 2
1. Some task - Some subtask
-
Next, convert list of HTML to tables if possible:
1 2 3
| table | example | one| |:---:|:---:|:---:| | item | in | table|
-
Find all the
NOTE:
fields and add{: .notice--success}
at the end so that they present cleanly - Changed the code fences per this post
Comments