[{"data":1,"prerenderedAt":1572},["ShallowReactive",2],{"blog:2018:wordpress-to-jekyll-hosting":3,"blogMore-Development":1558,"comments-wordpress-to-jekyll-hosting":1571},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"category":11,"tags":12,"excerpt":15,"body":32,"_type":1549,"_id":1550,"_source":1551,"_file":1552,"_stem":1553,"_extension":1554,"url":1555,"wordCount":1556,"minutes":227,"commentCount":1557},"/blog/2018/wordpress-to-jekyll-hosting","2018",false,"en","WordPress to Jekyll part 5 - Hosting & building","The next stage is considering where to host the site and whether to use a content delivery network (CDN). My preferred approach on other sites has been to:","2018-05-31T08:00:00-08:00","Development",[13,14],"WordPress","Jekyll",{"type":16,"children":17},"root",[18,25],{"type":19,"tag":20,"props":21,"children":22},"element","p",{},[23],{"type":24,"value":9},"text",{"type":19,"tag":20,"props":26,"children":27},{},[28,30],{"type":24,"value":29},"Adding the CloudFront CDN was essential if you wanted SSL with your domain name, but ",{"type":24,"value":31},"GitHub pages added support for SSL certs with custom domains",{"type":16,"children":33,"toc":1543},[34,38,53,65,70,83,88,95,136,150,817,823,828,833,838,869,874,1316,1322,1332,1483,1497,1503,1523,1528,1537],{"type":19,"tag":20,"props":35,"children":36},{},[37],{"type":24,"value":9},{"type":19,"tag":39,"props":40,"children":41},"ol",{},[42,48],{"type":19,"tag":43,"props":44,"children":45},"li",{},[46],{"type":24,"value":47},"Host the origin on GitHub pages - it's fast to build and integrates with my source control",{"type":19,"tag":43,"props":49,"children":50},{},[51],{"type":24,"value":52},"Front it with Amazon's AWS CloudFront CDN - it's fast, cheap, and comes with a free SSL cert",{"type":19,"tag":20,"props":54,"children":55},{},[56,57],{"type":24,"value":29},{"type":19,"tag":58,"props":59,"children":63},"a",{"href":60,"rel":61},"https://blog.github.com/2018-05-01-github-pages-custom-domains-https/",[62],"nofollow",[64],{"type":24,"value":31},{"type":19,"tag":20,"props":66,"children":67},{},[68],{"type":24,"value":69},"Unfortunately, my blog is more complex than the other sites I've done, and two of the plugins I use have not been white-listed for use on GitHub pages. They are:",{"type":19,"tag":39,"props":71,"children":72},{},[73,78],{"type":19,"tag":43,"props":74,"children":75},{},[76],{"type":24,"value":77},"paginate-v2 - required to get great tag & category support",{"type":19,"tag":43,"props":79,"children":80},{},[81],{"type":24,"value":82},"Algolia - needed for search indexing",{"type":19,"tag":20,"props":84,"children":85},{},[86],{"type":24,"value":87},"Part of GitHub's blazing speed comes from being a trusted environment. While I'm sure they'll be white-listing paginate-v2 in the short term I'm not sure if the Algolia indexer is on the cards.",{"type":19,"tag":89,"props":90,"children":92},"h2",{"id":91},"circleci-build-server",[93],{"type":24,"value":94},"CircleCI build server",{"type":19,"tag":20,"props":96,"children":97},{},[98,100,107,109,116,118,125,127,134],{"type":24,"value":99},"There are always plenty of options in the cloud so I looked for a build server. I've used ",{"type":19,"tag":58,"props":101,"children":104},{"href":102,"rel":103},"https://www.appveyor.com",[62],[105],{"type":24,"value":106},"AppVeyor",{"type":24,"value":108},", ",{"type":19,"tag":58,"props":110,"children":113},{"href":111,"rel":112},"https://codeship.com",[62],[114],{"type":24,"value":115},"CodeShip",{"type":24,"value":117}," and ",{"type":19,"tag":58,"props":119,"children":122},{"href":120,"rel":121},"https://travis-ci.org",[62],[123],{"type":24,"value":124},"Travis CI",{"type":24,"value":126}," before but decided to this time go with ",{"type":19,"tag":58,"props":128,"children":131},{"href":129,"rel":130},"https://circleci.com",[62],[132],{"type":24,"value":133},"CircleCI",{"type":24,"value":135}," as I wanted to try their new faster v2 docker-based infrastructure and take advantage of their free tier.",{"type":19,"tag":20,"props":137,"children":138},{},[139,141,148],{"type":24,"value":140},"The v2 mechanism requires a new ",{"type":19,"tag":142,"props":143,"children":145},"code",{"className":144},[],[146],{"type":24,"value":147},".circleci/config.yml",{"type":24,"value":149}," that splits the process into jobs that are combined with a workflow. I created two jobs - one for the build and another for the deploy. They are:",{"type":19,"tag":151,"props":152,"children":157},"pre",{"className":153,"code":154,"language":155,"meta":156,"style":156},"language-yml shiki shiki-themes everforest-light dracula","version: 2\njobs:\n  build:\n    docker:\n      - image: circleci/ruby:2.3\n    working_directory: ~/jekyll\n    environment:\n      - JEKYLL_ENV=production\n      - NOKOGIRI_USE_SYSTEM_LIBRARIES=true\n      - JOB_RESULTS_PATH=run-results\n    steps:\n      - checkout\n      - restore_cache:\n          key: jekyll-{{ .Branch }}-{{ checksum \"Gemfile.lock\" }}\n      - run:\n          name: Install dependencies\n          command: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3\n      - save_cache:\n          key: jekyll-{{ .Branch }}-{{ checksum \"Gemfile.lock\" }}\n          paths:\n            - \"vendor/bundle\"\n      - run:\n          name: Create results directory\n          command: mkdir -p $JOB_RESULTS_PATH\n      - run:\n          name: Build site\n          command: bundle exec jekyll build 2>&1 | tee $JOB_RESULTS_PATH/build-results.txt\n      - run:\n          name: Remove .html suffixes\n          command: find _site -name \"*.html\" -not -name \"index.html\" -exec rename -v 's/\\.html$//' {} \\;\n      - run:\n          name: Index with Algolia\n          command: bundle exec jekyll algolia\n      - store_artifacts:\n          path: run-results/\n          destination: run-results\n      - persist_to_workspace:\n          root: ~/jekyll\n          paths:\n            - _site\n","yml","",[158],{"type":19,"tag":142,"props":159,"children":160},{"__ignoreMap":156},[161,185,199,212,225,250,268,281,294,307,320,333,346,363,381,398,416,434,451,467,480,505,521,538,555,571,588,605,621,638,655,671,688,705,722,740,758,775,792,804],{"type":19,"tag":162,"props":163,"children":166},"span",{"class":164,"line":165},"line",1,[167,173,179],{"type":19,"tag":162,"props":168,"children":170},{"style":169},"--shiki-default:#F57D26;--shiki-dark:#8BE9FD",[171],{"type":24,"value":172},"version",{"type":19,"tag":162,"props":174,"children":176},{"style":175},"--shiki-default:#939F91;--shiki-dark:#FF79C6",[177],{"type":24,"value":178},":",{"type":19,"tag":162,"props":180,"children":182},{"style":181},"--shiki-default:#DF69BA;--shiki-dark:#BD93F9",[183],{"type":24,"value":184}," 2\n",{"type":19,"tag":162,"props":186,"children":188},{"class":164,"line":187},2,[189,194],{"type":19,"tag":162,"props":190,"children":191},{"style":169},[192],{"type":24,"value":193},"jobs",{"type":19,"tag":162,"props":195,"children":196},{"style":175},[197],{"type":24,"value":198},":\n",{"type":19,"tag":162,"props":200,"children":202},{"class":164,"line":201},3,[203,208],{"type":19,"tag":162,"props":204,"children":205},{"style":169},[206],{"type":24,"value":207},"  build",{"type":19,"tag":162,"props":209,"children":210},{"style":175},[211],{"type":24,"value":198},{"type":19,"tag":162,"props":213,"children":215},{"class":164,"line":214},4,[216,221],{"type":19,"tag":162,"props":217,"children":218},{"style":169},[219],{"type":24,"value":220},"    docker",{"type":19,"tag":162,"props":222,"children":223},{"style":175},[224],{"type":24,"value":198},{"type":19,"tag":162,"props":226,"children":228},{"class":164,"line":227},5,[229,235,240,244],{"type":19,"tag":162,"props":230,"children":232},{"style":231},"--shiki-default:#35A77C;--shiki-dark:#FF79C6",[233],{"type":24,"value":234},"      -",{"type":19,"tag":162,"props":236,"children":237},{"style":169},[238],{"type":24,"value":239}," image",{"type":19,"tag":162,"props":241,"children":242},{"style":175},[243],{"type":24,"value":178},{"type":19,"tag":162,"props":245,"children":247},{"style":246},"--shiki-default:#8DA101;--shiki-dark:#F1FA8C",[248],{"type":24,"value":249}," circleci/ruby:2.3\n",{"type":19,"tag":162,"props":251,"children":253},{"class":164,"line":252},6,[254,259,263],{"type":19,"tag":162,"props":255,"children":256},{"style":169},[257],{"type":24,"value":258},"    working_directory",{"type":19,"tag":162,"props":260,"children":261},{"style":175},[262],{"type":24,"value":178},{"type":19,"tag":162,"props":264,"children":265},{"style":246},[266],{"type":24,"value":267}," ~/jekyll\n",{"type":19,"tag":162,"props":269,"children":271},{"class":164,"line":270},7,[272,277],{"type":19,"tag":162,"props":273,"children":274},{"style":169},[275],{"type":24,"value":276},"    environment",{"type":19,"tag":162,"props":278,"children":279},{"style":175},[280],{"type":24,"value":198},{"type":19,"tag":162,"props":282,"children":284},{"class":164,"line":283},8,[285,289],{"type":19,"tag":162,"props":286,"children":287},{"style":231},[288],{"type":24,"value":234},{"type":19,"tag":162,"props":290,"children":291},{"style":246},[292],{"type":24,"value":293}," JEKYLL_ENV=production\n",{"type":19,"tag":162,"props":295,"children":297},{"class":164,"line":296},9,[298,302],{"type":19,"tag":162,"props":299,"children":300},{"style":231},[301],{"type":24,"value":234},{"type":19,"tag":162,"props":303,"children":304},{"style":246},[305],{"type":24,"value":306}," NOKOGIRI_USE_SYSTEM_LIBRARIES=true\n",{"type":19,"tag":162,"props":308,"children":310},{"class":164,"line":309},10,[311,315],{"type":19,"tag":162,"props":312,"children":313},{"style":231},[314],{"type":24,"value":234},{"type":19,"tag":162,"props":316,"children":317},{"style":246},[318],{"type":24,"value":319}," JOB_RESULTS_PATH=run-results\n",{"type":19,"tag":162,"props":321,"children":323},{"class":164,"line":322},11,[324,329],{"type":19,"tag":162,"props":325,"children":326},{"style":169},[327],{"type":24,"value":328},"    steps",{"type":19,"tag":162,"props":330,"children":331},{"style":175},[332],{"type":24,"value":198},{"type":19,"tag":162,"props":334,"children":336},{"class":164,"line":335},12,[337,341],{"type":19,"tag":162,"props":338,"children":339},{"style":231},[340],{"type":24,"value":234},{"type":19,"tag":162,"props":342,"children":343},{"style":246},[344],{"type":24,"value":345}," checkout\n",{"type":19,"tag":162,"props":347,"children":349},{"class":164,"line":348},13,[350,354,359],{"type":19,"tag":162,"props":351,"children":352},{"style":231},[353],{"type":24,"value":234},{"type":19,"tag":162,"props":355,"children":356},{"style":169},[357],{"type":24,"value":358}," restore_cache",{"type":19,"tag":162,"props":360,"children":361},{"style":175},[362],{"type":24,"value":198},{"type":19,"tag":162,"props":364,"children":366},{"class":164,"line":365},14,[367,372,376],{"type":19,"tag":162,"props":368,"children":369},{"style":169},[370],{"type":24,"value":371},"          key",{"type":19,"tag":162,"props":373,"children":374},{"style":175},[375],{"type":24,"value":178},{"type":19,"tag":162,"props":377,"children":378},{"style":246},[379],{"type":24,"value":380}," jekyll-{{ .Branch }}-{{ checksum \"Gemfile.lock\" }}\n",{"type":19,"tag":162,"props":382,"children":384},{"class":164,"line":383},15,[385,389,394],{"type":19,"tag":162,"props":386,"children":387},{"style":231},[388],{"type":24,"value":234},{"type":19,"tag":162,"props":390,"children":391},{"style":169},[392],{"type":24,"value":393}," run",{"type":19,"tag":162,"props":395,"children":396},{"style":175},[397],{"type":24,"value":198},{"type":19,"tag":162,"props":399,"children":401},{"class":164,"line":400},16,[402,407,411],{"type":19,"tag":162,"props":403,"children":404},{"style":169},[405],{"type":24,"value":406},"          name",{"type":19,"tag":162,"props":408,"children":409},{"style":175},[410],{"type":24,"value":178},{"type":19,"tag":162,"props":412,"children":413},{"style":246},[414],{"type":24,"value":415}," Install dependencies\n",{"type":19,"tag":162,"props":417,"children":419},{"class":164,"line":418},17,[420,425,429],{"type":19,"tag":162,"props":421,"children":422},{"style":169},[423],{"type":24,"value":424},"          command",{"type":19,"tag":162,"props":426,"children":427},{"style":175},[428],{"type":24,"value":178},{"type":19,"tag":162,"props":430,"children":431},{"style":246},[432],{"type":24,"value":433}," bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3\n",{"type":19,"tag":162,"props":435,"children":437},{"class":164,"line":436},18,[438,442,447],{"type":19,"tag":162,"props":439,"children":440},{"style":231},[441],{"type":24,"value":234},{"type":19,"tag":162,"props":443,"children":444},{"style":169},[445],{"type":24,"value":446}," save_cache",{"type":19,"tag":162,"props":448,"children":449},{"style":175},[450],{"type":24,"value":198},{"type":19,"tag":162,"props":452,"children":454},{"class":164,"line":453},19,[455,459,463],{"type":19,"tag":162,"props":456,"children":457},{"style":169},[458],{"type":24,"value":371},{"type":19,"tag":162,"props":460,"children":461},{"style":175},[462],{"type":24,"value":178},{"type":19,"tag":162,"props":464,"children":465},{"style":246},[466],{"type":24,"value":380},{"type":19,"tag":162,"props":468,"children":470},{"class":164,"line":469},20,[471,476],{"type":19,"tag":162,"props":472,"children":473},{"style":169},[474],{"type":24,"value":475},"          paths",{"type":19,"tag":162,"props":477,"children":478},{"style":175},[479],{"type":24,"value":198},{"type":19,"tag":162,"props":481,"children":483},{"class":164,"line":482},21,[484,489,495,500],{"type":19,"tag":162,"props":485,"children":486},{"style":231},[487],{"type":24,"value":488},"            -",{"type":19,"tag":162,"props":490,"children":492},{"style":491},"--shiki-default:#8DA101;--shiki-dark:#E9F284",[493],{"type":24,"value":494}," \"",{"type":19,"tag":162,"props":496,"children":497},{"style":246},[498],{"type":24,"value":499},"vendor/bundle",{"type":19,"tag":162,"props":501,"children":502},{"style":491},[503],{"type":24,"value":504},"\"\n",{"type":19,"tag":162,"props":506,"children":508},{"class":164,"line":507},22,[509,513,517],{"type":19,"tag":162,"props":510,"children":511},{"style":231},[512],{"type":24,"value":234},{"type":19,"tag":162,"props":514,"children":515},{"style":169},[516],{"type":24,"value":393},{"type":19,"tag":162,"props":518,"children":519},{"style":175},[520],{"type":24,"value":198},{"type":19,"tag":162,"props":522,"children":524},{"class":164,"line":523},23,[525,529,533],{"type":19,"tag":162,"props":526,"children":527},{"style":169},[528],{"type":24,"value":406},{"type":19,"tag":162,"props":530,"children":531},{"style":175},[532],{"type":24,"value":178},{"type":19,"tag":162,"props":534,"children":535},{"style":246},[536],{"type":24,"value":537}," Create results directory\n",{"type":19,"tag":162,"props":539,"children":541},{"class":164,"line":540},24,[542,546,550],{"type":19,"tag":162,"props":543,"children":544},{"style":169},[545],{"type":24,"value":424},{"type":19,"tag":162,"props":547,"children":548},{"style":175},[549],{"type":24,"value":178},{"type":19,"tag":162,"props":551,"children":552},{"style":246},[553],{"type":24,"value":554}," mkdir -p $JOB_RESULTS_PATH\n",{"type":19,"tag":162,"props":556,"children":558},{"class":164,"line":557},25,[559,563,567],{"type":19,"tag":162,"props":560,"children":561},{"style":231},[562],{"type":24,"value":234},{"type":19,"tag":162,"props":564,"children":565},{"style":169},[566],{"type":24,"value":393},{"type":19,"tag":162,"props":568,"children":569},{"style":175},[570],{"type":24,"value":198},{"type":19,"tag":162,"props":572,"children":574},{"class":164,"line":573},26,[575,579,583],{"type":19,"tag":162,"props":576,"children":577},{"style":169},[578],{"type":24,"value":406},{"type":19,"tag":162,"props":580,"children":581},{"style":175},[582],{"type":24,"value":178},{"type":19,"tag":162,"props":584,"children":585},{"style":246},[586],{"type":24,"value":587}," Build site\n",{"type":19,"tag":162,"props":589,"children":591},{"class":164,"line":590},27,[592,596,600],{"type":19,"tag":162,"props":593,"children":594},{"style":169},[595],{"type":24,"value":424},{"type":19,"tag":162,"props":597,"children":598},{"style":175},[599],{"type":24,"value":178},{"type":19,"tag":162,"props":601,"children":602},{"style":246},[603],{"type":24,"value":604}," bundle exec jekyll build 2>&1 | tee $JOB_RESULTS_PATH/build-results.txt\n",{"type":19,"tag":162,"props":606,"children":608},{"class":164,"line":607},28,[609,613,617],{"type":19,"tag":162,"props":610,"children":611},{"style":231},[612],{"type":24,"value":234},{"type":19,"tag":162,"props":614,"children":615},{"style":169},[616],{"type":24,"value":393},{"type":19,"tag":162,"props":618,"children":619},{"style":175},[620],{"type":24,"value":198},{"type":19,"tag":162,"props":622,"children":624},{"class":164,"line":623},29,[625,629,633],{"type":19,"tag":162,"props":626,"children":627},{"style":169},[628],{"type":24,"value":406},{"type":19,"tag":162,"props":630,"children":631},{"style":175},[632],{"type":24,"value":178},{"type":19,"tag":162,"props":634,"children":635},{"style":246},[636],{"type":24,"value":637}," Remove .html suffixes\n",{"type":19,"tag":162,"props":639,"children":641},{"class":164,"line":640},30,[642,646,650],{"type":19,"tag":162,"props":643,"children":644},{"style":169},[645],{"type":24,"value":424},{"type":19,"tag":162,"props":647,"children":648},{"style":175},[649],{"type":24,"value":178},{"type":19,"tag":162,"props":651,"children":652},{"style":246},[653],{"type":24,"value":654}," find _site -name \"*.html\" -not -name \"index.html\" -exec rename -v 's/\\.html$//' {} \\;\n",{"type":19,"tag":162,"props":656,"children":658},{"class":164,"line":657},31,[659,663,667],{"type":19,"tag":162,"props":660,"children":661},{"style":231},[662],{"type":24,"value":234},{"type":19,"tag":162,"props":664,"children":665},{"style":169},[666],{"type":24,"value":393},{"type":19,"tag":162,"props":668,"children":669},{"style":175},[670],{"type":24,"value":198},{"type":19,"tag":162,"props":672,"children":674},{"class":164,"line":673},32,[675,679,683],{"type":19,"tag":162,"props":676,"children":677},{"style":169},[678],{"type":24,"value":406},{"type":19,"tag":162,"props":680,"children":681},{"style":175},[682],{"type":24,"value":178},{"type":19,"tag":162,"props":684,"children":685},{"style":246},[686],{"type":24,"value":687}," Index with Algolia\n",{"type":19,"tag":162,"props":689,"children":691},{"class":164,"line":690},33,[692,696,700],{"type":19,"tag":162,"props":693,"children":694},{"style":169},[695],{"type":24,"value":424},{"type":19,"tag":162,"props":697,"children":698},{"style":175},[699],{"type":24,"value":178},{"type":19,"tag":162,"props":701,"children":702},{"style":246},[703],{"type":24,"value":704}," bundle exec jekyll algolia\n",{"type":19,"tag":162,"props":706,"children":708},{"class":164,"line":707},34,[709,713,718],{"type":19,"tag":162,"props":710,"children":711},{"style":231},[712],{"type":24,"value":234},{"type":19,"tag":162,"props":714,"children":715},{"style":169},[716],{"type":24,"value":717}," store_artifacts",{"type":19,"tag":162,"props":719,"children":720},{"style":175},[721],{"type":24,"value":198},{"type":19,"tag":162,"props":723,"children":725},{"class":164,"line":724},35,[726,731,735],{"type":19,"tag":162,"props":727,"children":728},{"style":169},[729],{"type":24,"value":730},"          path",{"type":19,"tag":162,"props":732,"children":733},{"style":175},[734],{"type":24,"value":178},{"type":19,"tag":162,"props":736,"children":737},{"style":246},[738],{"type":24,"value":739}," run-results/\n",{"type":19,"tag":162,"props":741,"children":743},{"class":164,"line":742},36,[744,749,753],{"type":19,"tag":162,"props":745,"children":746},{"style":169},[747],{"type":24,"value":748},"          destination",{"type":19,"tag":162,"props":750,"children":751},{"style":175},[752],{"type":24,"value":178},{"type":19,"tag":162,"props":754,"children":755},{"style":246},[756],{"type":24,"value":757}," run-results\n",{"type":19,"tag":162,"props":759,"children":761},{"class":164,"line":760},37,[762,766,771],{"type":19,"tag":162,"props":763,"children":764},{"style":231},[765],{"type":24,"value":234},{"type":19,"tag":162,"props":767,"children":768},{"style":169},[769],{"type":24,"value":770}," persist_to_workspace",{"type":19,"tag":162,"props":772,"children":773},{"style":175},[774],{"type":24,"value":198},{"type":19,"tag":162,"props":776,"children":778},{"class":164,"line":777},38,[779,784,788],{"type":19,"tag":162,"props":780,"children":781},{"style":169},[782],{"type":24,"value":783},"          root",{"type":19,"tag":162,"props":785,"children":786},{"style":175},[787],{"type":24,"value":178},{"type":19,"tag":162,"props":789,"children":790},{"style":246},[791],{"type":24,"value":267},{"type":19,"tag":162,"props":793,"children":795},{"class":164,"line":794},39,[796,800],{"type":19,"tag":162,"props":797,"children":798},{"style":169},[799],{"type":24,"value":475},{"type":19,"tag":162,"props":801,"children":802},{"style":175},[803],{"type":24,"value":198},{"type":19,"tag":162,"props":805,"children":807},{"class":164,"line":806},40,[808,812],{"type":19,"tag":162,"props":809,"children":810},{"style":231},[811],{"type":24,"value":488},{"type":19,"tag":162,"props":813,"children":814},{"style":246},[815],{"type":24,"value":816}," _site\n",{"type":19,"tag":89,"props":818,"children":820},{"id":819},"origin-hosting-with-s3",[821],{"type":24,"value":822},"Origin hosting with S3",{"type":19,"tag":20,"props":824,"children":825},{},[826],{"type":24,"value":827},"Given I'm going to use CloudFront for my CDN and that GitHub pages won't work for this job I went with S3. I know it well, the command line tools are great, it's cheap, fast and integrates well with CloudFront.",{"type":19,"tag":20,"props":829,"children":830},{},[831],{"type":24,"value":832},"S3 did however bring a few problems with it's own - primarily because the links on my blog had no file suffixes - I didn't want either .php or .html and WordPress makes this a breeze.",{"type":19,"tag":20,"props":834,"children":835},{},[836],{"type":24,"value":837},"Here's my CircleCI job to deploy to S3. It involves:",{"type":19,"tag":39,"props":839,"children":840},{},[841,846,859,864],{"type":19,"tag":43,"props":842,"children":843},{},[844],{"type":24,"value":845},"Starting with Python to get the AWS command-line tools",{"type":19,"tag":43,"props":847,"children":848},{},[849,851,857],{"type":24,"value":850},"Syncing the static site forcing everything as ",{"type":19,"tag":142,"props":852,"children":854},{"className":853},[],[855],{"type":24,"value":856},"text/html",{"type":24,"value":858}," to deal with the lack of file extensions",{"type":19,"tag":43,"props":860,"children":861},{},[862],{"type":24,"value":863},"Fixing up the few files I have that require a different MIME type (css, feed, robots etc)",{"type":19,"tag":43,"props":865,"children":866},{},[867],{"type":24,"value":868},"Creating a few helpful redirects for backward compatibility with existing links in the wild",{"type":19,"tag":20,"props":870,"children":871},{},[872],{"type":24,"value":873},"(This configuration requires you've setup the AWS access key and secret in Circle for the command-line tools to use.)",{"type":19,"tag":151,"props":875,"children":877},{"className":153,"code":876,"language":155,"meta":156,"style":156},"deploy:\n  docker:\n    - image: circleci/python:2.7\n    working_directory: ~/jekyll\n  steps:\n    - attach_workspace:\n        at: ~/jekyll\n    - run:\n        name: Install awscli\n        command: sudo pip install awscli\n    - run:\n        name: Deploy to S3\n        command: aws s3 sync _site s3://damieng-static/ --delete --content-type=text/html\n    - run:\n        name: Correct MIME for robots.txt automatically\n        command: aws s3 cp s3://damieng-static/robots.txt s3://damieng-static/robots.txt --metadata-directive=\"REPLACE\"\n    - run:\n        name: Correct MIME for sitemap.xml automatically\n        command: aws s3 cp s3://damieng-static/sitemap.xml s3://damieng-static/sitemap.xml --metadata-directive=\"REPLACE\"\n    - run:\n        name: Correct MIME for Atom feed manually\n        command: aws s3 cp s3://damieng-static/feed.xml s3://damieng-static/feed.xml --no-guess-mime-type --content-type=\"application/atom+xml\" --metadata-directive=\"REPLACE\"\n    - run:\n        name: Redirect /damieng for existing RSS subscribers\n        command: aws s3api put-object --bucket damieng-static --key \"damieng\" --website-redirect-location \"https://damieng.com/feed.xml\"\n    - run:\n        name: Correct MIME for CSS files\n        command: aws s3 cp s3://damieng-static/css s3://damieng-static/css --metadata-directive=\"REPLACE\" --recursive\n",[878],{"type":19,"tag":142,"props":879,"children":880},{"__ignoreMap":156},[881,893,905,926,941,953,969,985,1000,1017,1034,1049,1065,1081,1096,1112,1128,1143,1159,1175,1190,1206,1222,1237,1253,1269,1284,1300],{"type":19,"tag":162,"props":882,"children":883},{"class":164,"line":165},[884,889],{"type":19,"tag":162,"props":885,"children":886},{"style":169},[887],{"type":24,"value":888},"deploy",{"type":19,"tag":162,"props":890,"children":891},{"style":175},[892],{"type":24,"value":198},{"type":19,"tag":162,"props":894,"children":895},{"class":164,"line":187},[896,901],{"type":19,"tag":162,"props":897,"children":898},{"style":169},[899],{"type":24,"value":900},"  docker",{"type":19,"tag":162,"props":902,"children":903},{"style":175},[904],{"type":24,"value":198},{"type":19,"tag":162,"props":906,"children":907},{"class":164,"line":201},[908,913,917,921],{"type":19,"tag":162,"props":909,"children":910},{"style":231},[911],{"type":24,"value":912},"    -",{"type":19,"tag":162,"props":914,"children":915},{"style":169},[916],{"type":24,"value":239},{"type":19,"tag":162,"props":918,"children":919},{"style":175},[920],{"type":24,"value":178},{"type":19,"tag":162,"props":922,"children":923},{"style":246},[924],{"type":24,"value":925}," circleci/python:2.7\n",{"type":19,"tag":162,"props":927,"children":928},{"class":164,"line":214},[929,933,937],{"type":19,"tag":162,"props":930,"children":931},{"style":169},[932],{"type":24,"value":258},{"type":19,"tag":162,"props":934,"children":935},{"style":175},[936],{"type":24,"value":178},{"type":19,"tag":162,"props":938,"children":939},{"style":246},[940],{"type":24,"value":267},{"type":19,"tag":162,"props":942,"children":943},{"class":164,"line":227},[944,949],{"type":19,"tag":162,"props":945,"children":946},{"style":169},[947],{"type":24,"value":948},"  steps",{"type":19,"tag":162,"props":950,"children":951},{"style":175},[952],{"type":24,"value":198},{"type":19,"tag":162,"props":954,"children":955},{"class":164,"line":252},[956,960,965],{"type":19,"tag":162,"props":957,"children":958},{"style":231},[959],{"type":24,"value":912},{"type":19,"tag":162,"props":961,"children":962},{"style":169},[963],{"type":24,"value":964}," attach_workspace",{"type":19,"tag":162,"props":966,"children":967},{"style":175},[968],{"type":24,"value":198},{"type":19,"tag":162,"props":970,"children":971},{"class":164,"line":270},[972,977,981],{"type":19,"tag":162,"props":973,"children":974},{"style":169},[975],{"type":24,"value":976},"        at",{"type":19,"tag":162,"props":978,"children":979},{"style":175},[980],{"type":24,"value":178},{"type":19,"tag":162,"props":982,"children":983},{"style":246},[984],{"type":24,"value":267},{"type":19,"tag":162,"props":986,"children":987},{"class":164,"line":283},[988,992,996],{"type":19,"tag":162,"props":989,"children":990},{"style":231},[991],{"type":24,"value":912},{"type":19,"tag":162,"props":993,"children":994},{"style":169},[995],{"type":24,"value":393},{"type":19,"tag":162,"props":997,"children":998},{"style":175},[999],{"type":24,"value":198},{"type":19,"tag":162,"props":1001,"children":1002},{"class":164,"line":296},[1003,1008,1012],{"type":19,"tag":162,"props":1004,"children":1005},{"style":169},[1006],{"type":24,"value":1007},"        name",{"type":19,"tag":162,"props":1009,"children":1010},{"style":175},[1011],{"type":24,"value":178},{"type":19,"tag":162,"props":1013,"children":1014},{"style":246},[1015],{"type":24,"value":1016}," Install awscli\n",{"type":19,"tag":162,"props":1018,"children":1019},{"class":164,"line":309},[1020,1025,1029],{"type":19,"tag":162,"props":1021,"children":1022},{"style":169},[1023],{"type":24,"value":1024},"        command",{"type":19,"tag":162,"props":1026,"children":1027},{"style":175},[1028],{"type":24,"value":178},{"type":19,"tag":162,"props":1030,"children":1031},{"style":246},[1032],{"type":24,"value":1033}," sudo pip install awscli\n",{"type":19,"tag":162,"props":1035,"children":1036},{"class":164,"line":322},[1037,1041,1045],{"type":19,"tag":162,"props":1038,"children":1039},{"style":231},[1040],{"type":24,"value":912},{"type":19,"tag":162,"props":1042,"children":1043},{"style":169},[1044],{"type":24,"value":393},{"type":19,"tag":162,"props":1046,"children":1047},{"style":175},[1048],{"type":24,"value":198},{"type":19,"tag":162,"props":1050,"children":1051},{"class":164,"line":335},[1052,1056,1060],{"type":19,"tag":162,"props":1053,"children":1054},{"style":169},[1055],{"type":24,"value":1007},{"type":19,"tag":162,"props":1057,"children":1058},{"style":175},[1059],{"type":24,"value":178},{"type":19,"tag":162,"props":1061,"children":1062},{"style":246},[1063],{"type":24,"value":1064}," Deploy to S3\n",{"type":19,"tag":162,"props":1066,"children":1067},{"class":164,"line":348},[1068,1072,1076],{"type":19,"tag":162,"props":1069,"children":1070},{"style":169},[1071],{"type":24,"value":1024},{"type":19,"tag":162,"props":1073,"children":1074},{"style":175},[1075],{"type":24,"value":178},{"type":19,"tag":162,"props":1077,"children":1078},{"style":246},[1079],{"type":24,"value":1080}," aws s3 sync _site s3://damieng-static/ --delete --content-type=text/html\n",{"type":19,"tag":162,"props":1082,"children":1083},{"class":164,"line":365},[1084,1088,1092],{"type":19,"tag":162,"props":1085,"children":1086},{"style":231},[1087],{"type":24,"value":912},{"type":19,"tag":162,"props":1089,"children":1090},{"style":169},[1091],{"type":24,"value":393},{"type":19,"tag":162,"props":1093,"children":1094},{"style":175},[1095],{"type":24,"value":198},{"type":19,"tag":162,"props":1097,"children":1098},{"class":164,"line":383},[1099,1103,1107],{"type":19,"tag":162,"props":1100,"children":1101},{"style":169},[1102],{"type":24,"value":1007},{"type":19,"tag":162,"props":1104,"children":1105},{"style":175},[1106],{"type":24,"value":178},{"type":19,"tag":162,"props":1108,"children":1109},{"style":246},[1110],{"type":24,"value":1111}," Correct MIME for robots.txt automatically\n",{"type":19,"tag":162,"props":1113,"children":1114},{"class":164,"line":400},[1115,1119,1123],{"type":19,"tag":162,"props":1116,"children":1117},{"style":169},[1118],{"type":24,"value":1024},{"type":19,"tag":162,"props":1120,"children":1121},{"style":175},[1122],{"type":24,"value":178},{"type":19,"tag":162,"props":1124,"children":1125},{"style":246},[1126],{"type":24,"value":1127}," aws s3 cp s3://damieng-static/robots.txt s3://damieng-static/robots.txt --metadata-directive=\"REPLACE\"\n",{"type":19,"tag":162,"props":1129,"children":1130},{"class":164,"line":418},[1131,1135,1139],{"type":19,"tag":162,"props":1132,"children":1133},{"style":231},[1134],{"type":24,"value":912},{"type":19,"tag":162,"props":1136,"children":1137},{"style":169},[1138],{"type":24,"value":393},{"type":19,"tag":162,"props":1140,"children":1141},{"style":175},[1142],{"type":24,"value":198},{"type":19,"tag":162,"props":1144,"children":1145},{"class":164,"line":436},[1146,1150,1154],{"type":19,"tag":162,"props":1147,"children":1148},{"style":169},[1149],{"type":24,"value":1007},{"type":19,"tag":162,"props":1151,"children":1152},{"style":175},[1153],{"type":24,"value":178},{"type":19,"tag":162,"props":1155,"children":1156},{"style":246},[1157],{"type":24,"value":1158}," Correct MIME for sitemap.xml automatically\n",{"type":19,"tag":162,"props":1160,"children":1161},{"class":164,"line":453},[1162,1166,1170],{"type":19,"tag":162,"props":1163,"children":1164},{"style":169},[1165],{"type":24,"value":1024},{"type":19,"tag":162,"props":1167,"children":1168},{"style":175},[1169],{"type":24,"value":178},{"type":19,"tag":162,"props":1171,"children":1172},{"style":246},[1173],{"type":24,"value":1174}," aws s3 cp s3://damieng-static/sitemap.xml s3://damieng-static/sitemap.xml --metadata-directive=\"REPLACE\"\n",{"type":19,"tag":162,"props":1176,"children":1177},{"class":164,"line":469},[1178,1182,1186],{"type":19,"tag":162,"props":1179,"children":1180},{"style":231},[1181],{"type":24,"value":912},{"type":19,"tag":162,"props":1183,"children":1184},{"style":169},[1185],{"type":24,"value":393},{"type":19,"tag":162,"props":1187,"children":1188},{"style":175},[1189],{"type":24,"value":198},{"type":19,"tag":162,"props":1191,"children":1192},{"class":164,"line":482},[1193,1197,1201],{"type":19,"tag":162,"props":1194,"children":1195},{"style":169},[1196],{"type":24,"value":1007},{"type":19,"tag":162,"props":1198,"children":1199},{"style":175},[1200],{"type":24,"value":178},{"type":19,"tag":162,"props":1202,"children":1203},{"style":246},[1204],{"type":24,"value":1205}," Correct MIME for Atom feed manually\n",{"type":19,"tag":162,"props":1207,"children":1208},{"class":164,"line":507},[1209,1213,1217],{"type":19,"tag":162,"props":1210,"children":1211},{"style":169},[1212],{"type":24,"value":1024},{"type":19,"tag":162,"props":1214,"children":1215},{"style":175},[1216],{"type":24,"value":178},{"type":19,"tag":162,"props":1218,"children":1219},{"style":246},[1220],{"type":24,"value":1221}," aws s3 cp s3://damieng-static/feed.xml s3://damieng-static/feed.xml --no-guess-mime-type --content-type=\"application/atom+xml\" --metadata-directive=\"REPLACE\"\n",{"type":19,"tag":162,"props":1223,"children":1224},{"class":164,"line":523},[1225,1229,1233],{"type":19,"tag":162,"props":1226,"children":1227},{"style":231},[1228],{"type":24,"value":912},{"type":19,"tag":162,"props":1230,"children":1231},{"style":169},[1232],{"type":24,"value":393},{"type":19,"tag":162,"props":1234,"children":1235},{"style":175},[1236],{"type":24,"value":198},{"type":19,"tag":162,"props":1238,"children":1239},{"class":164,"line":540},[1240,1244,1248],{"type":19,"tag":162,"props":1241,"children":1242},{"style":169},[1243],{"type":24,"value":1007},{"type":19,"tag":162,"props":1245,"children":1246},{"style":175},[1247],{"type":24,"value":178},{"type":19,"tag":162,"props":1249,"children":1250},{"style":246},[1251],{"type":24,"value":1252}," Redirect /damieng for existing RSS subscribers\n",{"type":19,"tag":162,"props":1254,"children":1255},{"class":164,"line":557},[1256,1260,1264],{"type":19,"tag":162,"props":1257,"children":1258},{"style":169},[1259],{"type":24,"value":1024},{"type":19,"tag":162,"props":1261,"children":1262},{"style":175},[1263],{"type":24,"value":178},{"type":19,"tag":162,"props":1265,"children":1266},{"style":246},[1267],{"type":24,"value":1268}," aws s3api put-object --bucket damieng-static --key \"damieng\" --website-redirect-location \"https://damieng.com/feed.xml\"\n",{"type":19,"tag":162,"props":1270,"children":1271},{"class":164,"line":573},[1272,1276,1280],{"type":19,"tag":162,"props":1273,"children":1274},{"style":231},[1275],{"type":24,"value":912},{"type":19,"tag":162,"props":1277,"children":1278},{"style":169},[1279],{"type":24,"value":393},{"type":19,"tag":162,"props":1281,"children":1282},{"style":175},[1283],{"type":24,"value":198},{"type":19,"tag":162,"props":1285,"children":1286},{"class":164,"line":590},[1287,1291,1295],{"type":19,"tag":162,"props":1288,"children":1289},{"style":169},[1290],{"type":24,"value":1007},{"type":19,"tag":162,"props":1292,"children":1293},{"style":175},[1294],{"type":24,"value":178},{"type":19,"tag":162,"props":1296,"children":1297},{"style":246},[1298],{"type":24,"value":1299}," Correct MIME for CSS files\n",{"type":19,"tag":162,"props":1301,"children":1302},{"class":164,"line":607},[1303,1307,1311],{"type":19,"tag":162,"props":1304,"children":1305},{"style":169},[1306],{"type":24,"value":1024},{"type":19,"tag":162,"props":1308,"children":1309},{"style":175},[1310],{"type":24,"value":178},{"type":19,"tag":162,"props":1312,"children":1313},{"style":246},[1314],{"type":24,"value":1315}," aws s3 cp s3://damieng-static/css s3://damieng-static/css --metadata-directive=\"REPLACE\" --recursive\n",{"type":19,"tag":89,"props":1317,"children":1319},{"id":1318},"tying-together-the-build",[1320],{"type":24,"value":1321},"Tying together the build",{"type":19,"tag":20,"props":1323,"children":1324},{},[1325,1327],{"type":24,"value":1326},"Finally you just need a workflow to tie these two steps together at the end of your ",{"type":19,"tag":142,"props":1328,"children":1330},{"className":1329},[],[1331],{"type":24,"value":147},{"type":19,"tag":151,"props":1333,"children":1335},{"className":153,"code":1334,"language":155,"meta":156,"style":156},"workflows:\n  version: 2\n  build-deploy:\n    jobs:\n      - build\n      - deploy:\n          requires:\n            - build\n          filters:\n            branches:\n              only: master\n",[1336],{"type":19,"tag":142,"props":1337,"children":1338},{"__ignoreMap":156},[1339,1351,1367,1379,1391,1403,1419,1431,1442,1454,1466],{"type":19,"tag":162,"props":1340,"children":1341},{"class":164,"line":165},[1342,1347],{"type":19,"tag":162,"props":1343,"children":1344},{"style":169},[1345],{"type":24,"value":1346},"workflows",{"type":19,"tag":162,"props":1348,"children":1349},{"style":175},[1350],{"type":24,"value":198},{"type":19,"tag":162,"props":1352,"children":1353},{"class":164,"line":187},[1354,1359,1363],{"type":19,"tag":162,"props":1355,"children":1356},{"style":169},[1357],{"type":24,"value":1358},"  version",{"type":19,"tag":162,"props":1360,"children":1361},{"style":175},[1362],{"type":24,"value":178},{"type":19,"tag":162,"props":1364,"children":1365},{"style":181},[1366],{"type":24,"value":184},{"type":19,"tag":162,"props":1368,"children":1369},{"class":164,"line":201},[1370,1375],{"type":19,"tag":162,"props":1371,"children":1372},{"style":169},[1373],{"type":24,"value":1374},"  build-deploy",{"type":19,"tag":162,"props":1376,"children":1377},{"style":175},[1378],{"type":24,"value":198},{"type":19,"tag":162,"props":1380,"children":1381},{"class":164,"line":214},[1382,1387],{"type":19,"tag":162,"props":1383,"children":1384},{"style":169},[1385],{"type":24,"value":1386},"    jobs",{"type":19,"tag":162,"props":1388,"children":1389},{"style":175},[1390],{"type":24,"value":198},{"type":19,"tag":162,"props":1392,"children":1393},{"class":164,"line":227},[1394,1398],{"type":19,"tag":162,"props":1395,"children":1396},{"style":231},[1397],{"type":24,"value":234},{"type":19,"tag":162,"props":1399,"children":1400},{"style":246},[1401],{"type":24,"value":1402}," build\n",{"type":19,"tag":162,"props":1404,"children":1405},{"class":164,"line":252},[1406,1410,1415],{"type":19,"tag":162,"props":1407,"children":1408},{"style":231},[1409],{"type":24,"value":234},{"type":19,"tag":162,"props":1411,"children":1412},{"style":169},[1413],{"type":24,"value":1414}," deploy",{"type":19,"tag":162,"props":1416,"children":1417},{"style":175},[1418],{"type":24,"value":198},{"type":19,"tag":162,"props":1420,"children":1421},{"class":164,"line":270},[1422,1427],{"type":19,"tag":162,"props":1423,"children":1424},{"style":169},[1425],{"type":24,"value":1426},"          requires",{"type":19,"tag":162,"props":1428,"children":1429},{"style":175},[1430],{"type":24,"value":198},{"type":19,"tag":162,"props":1432,"children":1433},{"class":164,"line":283},[1434,1438],{"type":19,"tag":162,"props":1435,"children":1436},{"style":231},[1437],{"type":24,"value":488},{"type":19,"tag":162,"props":1439,"children":1440},{"style":246},[1441],{"type":24,"value":1402},{"type":19,"tag":162,"props":1443,"children":1444},{"class":164,"line":296},[1445,1450],{"type":19,"tag":162,"props":1446,"children":1447},{"style":169},[1448],{"type":24,"value":1449},"          filters",{"type":19,"tag":162,"props":1451,"children":1452},{"style":175},[1453],{"type":24,"value":198},{"type":19,"tag":162,"props":1455,"children":1456},{"class":164,"line":309},[1457,1462],{"type":19,"tag":162,"props":1458,"children":1459},{"style":169},[1460],{"type":24,"value":1461},"            branches",{"type":19,"tag":162,"props":1463,"children":1464},{"style":175},[1465],{"type":24,"value":198},{"type":19,"tag":162,"props":1467,"children":1468},{"class":164,"line":322},[1469,1474,1478],{"type":19,"tag":162,"props":1470,"children":1471},{"style":169},[1472],{"type":24,"value":1473},"              only",{"type":19,"tag":162,"props":1475,"children":1476},{"style":175},[1477],{"type":24,"value":178},{"type":19,"tag":162,"props":1479,"children":1480},{"style":246},[1481],{"type":24,"value":1482}," master\n",{"type":19,"tag":20,"props":1484,"children":1485},{},[1486,1488,1495],{"type":24,"value":1487},"A ",{"type":19,"tag":58,"props":1489,"children":1492},{"href":1490,"rel":1491},"https://gist.github.com/damieng/fac9c568186dc33da60e9cae1a07cf5c",[62],[1493],{"type":24,"value":1494},"complete version of my circle config",{"type":24,"value":1496}," is available.",{"type":19,"tag":89,"props":1498,"children":1500},{"id":1499},"cloudfront-cdn",[1501],{"type":24,"value":1502},"CloudFront CDN",{"type":19,"tag":20,"props":1504,"children":1505},{},[1506,1508,1514,1516,1521],{"type":24,"value":1507},"Adding the CloudFront CDN is straightforward and well covered elsewhere. I'll just point out that you ",{"type":19,"tag":1509,"props":1510,"children":1511},"strong",{},[1512],{"type":24,"value":1513},"must",{"type":24,"value":1515}," paste in the origin domain name from S3 and ",{"type":19,"tag":1509,"props":1517,"children":1518},{},[1519],{"type":24,"value":1520},"not",{"type":24,"value":1522}," choose the S3 bucket in the drop down. The latter ties CloudFront to the storage directly and ignores MIME types, redirects etc. By pasting the origin name in you're taking advantage of the S3 WebSite features that make redirects etc. possible.",{"type":19,"tag":20,"props":1524,"children":1525},{},[1526],{"type":24,"value":1527},"Also, while testing, you might want to specify a low TTL of say 120 (2 minutes) until things are fully stable.",{"type":19,"tag":20,"props":1529,"children":1530},{},[1531],{"type":19,"tag":1532,"props":1533,"children":1534},"em",{},[1535],{"type":24,"value":1536},"[)amien",{"type":19,"tag":1538,"props":1539,"children":1540},"style",{},[1541],{"type":24,"value":1542},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":156,"searchDepth":187,"depth":187,"links":1544},[1545,1546,1547,1548],{"id":91,"depth":187,"text":94},{"id":819,"depth":187,"text":822},{"id":1318,"depth":187,"text":1321},{"id":1499,"depth":187,"text":1502},"markdown","content:blog:2018:wordpress-to-jekyll-hosting.md","content","blog/2018/wordpress-to-jekyll-hosting.md","blog/2018/wordpress-to-jekyll-hosting","md","/blog/2018/wordpress-to-jekyll-hosting/",911,0,[1559,1563,1567],{"title":1560,"date":1561,"url":1562},"HTML5 Video Cheatsheet: Optimizing videos for the web","2025-12-05T00:00:00Z","/blog/2025/html5-video-cheatsheet/",{"title":1564,"date":1565,"url":1566},"Transactions in the MongoDB EF Core Provider","2025-10-25","/blog/2025/mongodb-explicit-transactions/",{"title":1568,"date":1569,"url":1570},"Queryable Encryption with the MongoDB EF Core Provider","2025-09-22","/blog/2025/mongodb-queryable-encryption/",[],1779224642652]