EasyTyporaTransformToGridea is an easy way to create and edit MD documents with Typora and deploy them to pages by Gridea.
The most inconvenient part of using Gridea is how to quickly replace the picture file PATHs and copy picture files to adapt to the Gridea environment.
First, When insert: Copy image to custom folder, and the folder path should be as './pic'
then, when you insert a new image, here is the line in your document:
Just like: ![image-1](.\pic\image-1.png)
2、Then you need to copy one of the ENGLISH version or CHINESE version script in your folder, and modify these path:
- THE directory_path REFER to your
<Gridea project was created path>/poster
, such asD:/blog/posts
. - THE dst REFER to
<The directory location for storing images in Gridea>/post-images
, such asD:/blog/posts/post-images
. - THE pic_path REFER to
<The default location where Typora automatically saves inserted images>/pic
. such asC:/Users/xxx/Desktop/master/Notes/pic/
. - THE new_base_path means the replaced image path in your unmodified MD document. Such as
file://D:/blog/posts/post-images/
Tips: must same asdst
PATH
-
IMPORTANT: use
/
but not\
in windows!!!! -
THIS SCRIPT WILL AUTO COPY IMAGE FILES TO GRIDEA IMAGE_PATH AND REPLACE THE OLD MD DOCUMENTS!