Goolge Blogger to DocPad.
Import Google Blooger articles by label and generate Docpad static blog.
git clone git://github.com/creationix/nvm.git ~/.nvm
printf "\n\n# NVM\nif [ -s ~/.nvm/nvm.sh ]; then\n\tNVM_DIR=~/.nvm\n\tsource ~/.nvm/nvm.sh\nfi" >> ~/.bashrc
NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
nvm install v0.10.25
nvm alias default 0.10
nvm use 0.10
gem install jekyll-import
-
copy blogger-docpad.rb into .gem/ruby/x.x.x/gems/jekyll-import-x.x.x/lib/jekyll-import/importers/
sudo npm install docpad -g
npm install --save cheerio
git clone https://github.com/dorajistyle/blogger-docpad
cd blogger-docpad
docpad install sitemap
docpad install cleancss
docpad install uglify
docpad install ghpages
docpad install moment
docpad install sitemap
cd src
npm install -g grunt
npm install --save-dev grunt-contrib-watch
npm install --save-dev grunt-shell
npm install --save-dev time-grunt
Make sure that a category name should be unique.
-
import.sh
- line 37 : git repository.
- line 40 : domain name.
-
docpad.coffee
- categories
- docpadConfig/templateData/site
- docpadConfig/templateData/collections
-
src/Gruntfile
- categories
- intros
- titles
- descriptions
-
src/partials
-
src/layouts
-
src/documents/scripts
-
src/documents/styles
-
src/documents/images
- Run init.sh to init blogger-docpad
./init.sh
- Run import.sh
./import.sh
It's very tough. The sample blog dorajistyle.pe.kr has more than 1000 articles. But docpad can't handle large number of files. However we have a trick. That's adding 'ignored' flag into your article's header. Before generating an article, set 'ignored' flag as false. When the article generated well, change 'ignored' flag to true. Docpad will ignore articles that already generated. Unfortunately cleanurls plugin not working with this trick. If you use the plugin, docpad generate ignored articles without layouts.
-
Original blog.
-
Generated docpad static blog.
Blogger-Docpad is under the MIT license.