diff --git a/pkg/posts/content/md/2009/basic-functionality.md b/content/posts/2009/basic-functionality.md similarity index 100% rename from pkg/posts/content/md/2009/basic-functionality.md rename to content/posts/2009/basic-functionality.md diff --git a/pkg/posts/content/md/2009/first-post.md b/content/posts/2009/first-post.md similarity index 100% rename from pkg/posts/content/md/2009/first-post.md rename to content/posts/2009/first-post.md diff --git a/pkg/posts/content/md/2009/great-news-people-i-had-almost-given-up-on-getting-any-spam.md b/content/posts/2009/great-news-people-i-had-almost-given-up-on-getting-any-spam.md similarity index 100% rename from pkg/posts/content/md/2009/great-news-people-i-had-almost-given-up-on-getting-any-spam.md rename to content/posts/2009/great-news-people-i-had-almost-given-up-on-getting-any-spam.md diff --git a/pkg/posts/content/md/2009/holy-jizz-batmanfhawvfgvohwwegsubmitted-26-january-2009-110352.md b/content/posts/2009/holy-jizz-batmanfhawvfgvohwwegsubmitted-26-january-2009-110352.md similarity index 100% rename from pkg/posts/content/md/2009/holy-jizz-batmanfhawvfgvohwwegsubmitted-26-january-2009-110352.md rename to content/posts/2009/holy-jizz-batmanfhawvfgvohwwegsubmitted-26-january-2009-110352.md diff --git a/pkg/posts/content/md/2009/probably-a-mistake.md b/content/posts/2009/probably-a-mistake.md similarity index 100% rename from pkg/posts/content/md/2009/probably-a-mistake.md rename to content/posts/2009/probably-a-mistake.md diff --git a/pkg/posts/content/md/2009/tumblr-blog-up.md b/content/posts/2009/tumblr-blog-up.md similarity index 100% rename from pkg/posts/content/md/2009/tumblr-blog-up.md rename to content/posts/2009/tumblr-blog-up.md diff --git a/pkg/posts/content/md/2010/3-things-i-wish-somebody-would-create.md b/content/posts/2010/3-things-i-wish-somebody-would-create.md similarity index 100% rename from pkg/posts/content/md/2010/3-things-i-wish-somebody-would-create.md rename to content/posts/2010/3-things-i-wish-somebody-would-create.md diff --git a/pkg/posts/content/md/2010/5-for-unlimited-backup-storage-wtf.md b/content/posts/2010/5-for-unlimited-backup-storage-wtf.md similarity index 100% rename from pkg/posts/content/md/2010/5-for-unlimited-backup-storage-wtf.md rename to content/posts/2010/5-for-unlimited-backup-storage-wtf.md diff --git a/pkg/posts/content/md/2010/ad-retargeting-or-behavioral-retargeting.md b/content/posts/2010/ad-retargeting-or-behavioral-retargeting.md similarity index 100% rename from pkg/posts/content/md/2010/ad-retargeting-or-behavioral-retargeting.md rename to content/posts/2010/ad-retargeting-or-behavioral-retargeting.md diff --git a/pkg/posts/content/md/2010/bit-the-bullet-redid-the-layout.md b/content/posts/2010/bit-the-bullet-redid-the-layout.md similarity index 100% rename from pkg/posts/content/md/2010/bit-the-bullet-redid-the-layout.md rename to content/posts/2010/bit-the-bullet-redid-the-layout.md diff --git a/pkg/posts/content/md/2010/check-out-my-weekend-project-fridgelist-todo-list.md b/content/posts/2010/check-out-my-weekend-project-fridgelist-todo-list.md similarity index 100% rename from pkg/posts/content/md/2010/check-out-my-weekend-project-fridgelist-todo-list.md rename to content/posts/2010/check-out-my-weekend-project-fridgelist-todo-list.md diff --git a/pkg/posts/content/md/2010/choosing-recurring-or-subscription-based-credit-card-payments.md b/content/posts/2010/choosing-recurring-or-subscription-based-credit-card-payments.md similarity index 100% rename from pkg/posts/content/md/2010/choosing-recurring-or-subscription-based-credit-card-payments.md rename to content/posts/2010/choosing-recurring-or-subscription-based-credit-card-payments.md diff --git a/pkg/posts/content/md/2010/defining-the-cloud-hint-saas-is-not-cloud.md b/content/posts/2010/defining-the-cloud-hint-saas-is-not-cloud.md similarity index 100% rename from pkg/posts/content/md/2010/defining-the-cloud-hint-saas-is-not-cloud.md rename to content/posts/2010/defining-the-cloud-hint-saas-is-not-cloud.md diff --git a/pkg/posts/content/md/2010/designing-great-ui-is-like-cleaning.md b/content/posts/2010/designing-great-ui-is-like-cleaning.md similarity index 100% rename from pkg/posts/content/md/2010/designing-great-ui-is-like-cleaning.md rename to content/posts/2010/designing-great-ui-is-like-cleaning.md diff --git a/pkg/posts/content/md/2010/digg-killed-the-iframe-toolbar-hackers-rejoice.md b/content/posts/2010/digg-killed-the-iframe-toolbar-hackers-rejoice.md similarity index 100% rename from pkg/posts/content/md/2010/digg-killed-the-iframe-toolbar-hackers-rejoice.md rename to content/posts/2010/digg-killed-the-iframe-toolbar-hackers-rejoice.md diff --git a/pkg/posts/content/md/2010/dont-backup-your-projects.md b/content/posts/2010/dont-backup-your-projects.md similarity index 100% rename from pkg/posts/content/md/2010/dont-backup-your-projects.md rename to content/posts/2010/dont-backup-your-projects.md diff --git a/pkg/posts/content/md/2010/drupal-and-slow-mysql-queries.md b/content/posts/2010/drupal-and-slow-mysql-queries.md similarity index 100% rename from pkg/posts/content/md/2010/drupal-and-slow-mysql-queries.md rename to content/posts/2010/drupal-and-slow-mysql-queries.md diff --git a/pkg/posts/content/md/2010/flash-will-live-html5-will-take-over-on-line-video.md b/content/posts/2010/flash-will-live-html5-will-take-over-on-line-video.md similarity index 100% rename from pkg/posts/content/md/2010/flash-will-live-html5-will-take-over-on-line-video.md rename to content/posts/2010/flash-will-live-html5-will-take-over-on-line-video.md diff --git a/pkg/posts/content/md/2010/following-your-dreams.md b/content/posts/2010/following-your-dreams.md similarity index 100% rename from pkg/posts/content/md/2010/following-your-dreams.md rename to content/posts/2010/following-your-dreams.md diff --git a/pkg/posts/content/md/2010/git-removing-files-permanently-gitignore.md b/content/posts/2010/git-removing-files-permanently-gitignore.md similarity index 100% rename from pkg/posts/content/md/2010/git-removing-files-permanently-gitignore.md rename to content/posts/2010/git-removing-files-permanently-gitignore.md diff --git a/pkg/posts/content/md/2010/googles-new-font-directory-is-a-disaster.md b/content/posts/2010/googles-new-font-directory-is-a-disaster.md similarity index 100% rename from pkg/posts/content/md/2010/googles-new-font-directory-is-a-disaster.md rename to content/posts/2010/googles-new-font-directory-is-a-disaster.md diff --git a/pkg/posts/content/md/2010/hello-world-2.md b/content/posts/2010/hello-world-2.md similarity index 100% rename from pkg/posts/content/md/2010/hello-world-2.md rename to content/posts/2010/hello-world-2.md diff --git a/pkg/posts/content/md/2010/i-just-enabled-anywhere-for-arnorhs-com.md b/content/posts/2010/i-just-enabled-anywhere-for-arnorhs-com.md similarity index 100% rename from pkg/posts/content/md/2010/i-just-enabled-anywhere-for-arnorhs-com.md rename to content/posts/2010/i-just-enabled-anywhere-for-arnorhs-com.md diff --git a/pkg/posts/content/md/2010/interesting-find-a-lot-of-random-links.md b/content/posts/2010/interesting-find-a-lot-of-random-links.md similarity index 100% rename from pkg/posts/content/md/2010/interesting-find-a-lot-of-random-links.md rename to content/posts/2010/interesting-find-a-lot-of-random-links.md diff --git a/pkg/posts/content/md/2010/interesting-find-google-body-browser.md b/content/posts/2010/interesting-find-google-body-browser.md similarity index 100% rename from pkg/posts/content/md/2010/interesting-find-google-body-browser.md rename to content/posts/2010/interesting-find-google-body-browser.md diff --git a/pkg/posts/content/md/2010/interesting-find-sevilla-111-gigapixels.md b/content/posts/2010/interesting-find-sevilla-111-gigapixels.md similarity index 100% rename from pkg/posts/content/md/2010/interesting-find-sevilla-111-gigapixels.md rename to content/posts/2010/interesting-find-sevilla-111-gigapixels.md diff --git a/pkg/posts/content/md/2010/it-doesnt-hurt-to-make-people-smile.md b/content/posts/2010/it-doesnt-hurt-to-make-people-smile.md similarity index 100% rename from pkg/posts/content/md/2010/it-doesnt-hurt-to-make-people-smile.md rename to content/posts/2010/it-doesnt-hurt-to-make-people-smile.md diff --git a/pkg/posts/content/md/2010/jason-nation-e-mail-newsletters-still-have-value.md b/content/posts/2010/jason-nation-e-mail-newsletters-still-have-value.md similarity index 100% rename from pkg/posts/content/md/2010/jason-nation-e-mail-newsletters-still-have-value.md rename to content/posts/2010/jason-nation-e-mail-newsletters-still-have-value.md diff --git a/pkg/posts/content/md/2010/last-night-they-dug-up-bobby-fischers-body.md b/content/posts/2010/last-night-they-dug-up-bobby-fischers-body.md similarity index 100% rename from pkg/posts/content/md/2010/last-night-they-dug-up-bobby-fischers-body.md rename to content/posts/2010/last-night-they-dug-up-bobby-fischers-body.md diff --git a/pkg/posts/content/md/2010/link-found-clojure-web-infrastructure.md b/content/posts/2010/link-found-clojure-web-infrastructure.md similarity index 100% rename from pkg/posts/content/md/2010/link-found-clojure-web-infrastructure.md rename to content/posts/2010/link-found-clojure-web-infrastructure.md diff --git a/pkg/posts/content/md/2010/my-favorite-tech-related-webcasts-on-startups-and-entrepreneurship.md b/content/posts/2010/my-favorite-tech-related-webcasts-on-startups-and-entrepreneurship.md similarity index 100% rename from pkg/posts/content/md/2010/my-favorite-tech-related-webcasts-on-startups-and-entrepreneurship.md rename to content/posts/2010/my-favorite-tech-related-webcasts-on-startups-and-entrepreneurship.md diff --git a/pkg/posts/content/md/2010/my-pragmatic-take-on-seo.md b/content/posts/2010/my-pragmatic-take-on-seo.md similarity index 100% rename from pkg/posts/content/md/2010/my-pragmatic-take-on-seo.md rename to content/posts/2010/my-pragmatic-take-on-seo.md diff --git a/pkg/posts/content/md/2010/my-take-on-css-tricks-coms-group-design-project.md b/content/posts/2010/my-take-on-css-tricks-coms-group-design-project.md similarity index 100% rename from pkg/posts/content/md/2010/my-take-on-css-tricks-coms-group-design-project.md rename to content/posts/2010/my-take-on-css-tricks-coms-group-design-project.md diff --git a/pkg/posts/content/md/2010/mysql-query-cache-resources.md b/content/posts/2010/mysql-query-cache-resources.md similarity index 100% rename from pkg/posts/content/md/2010/mysql-query-cache-resources.md rename to content/posts/2010/mysql-query-cache-resources.md diff --git a/pkg/posts/content/md/2010/previewing-fonts-using-googles-font-directory.md b/content/posts/2010/previewing-fonts-using-googles-font-directory.md similarity index 100% rename from pkg/posts/content/md/2010/previewing-fonts-using-googles-font-directory.md rename to content/posts/2010/previewing-fonts-using-googles-font-directory.md diff --git a/pkg/posts/content/md/2010/programming-language-popularity.md b/content/posts/2010/programming-language-popularity.md similarity index 100% rename from pkg/posts/content/md/2010/programming-language-popularity.md rename to content/posts/2010/programming-language-popularity.md diff --git a/pkg/posts/content/md/2010/shortphp-blog-moved-to-arnorhs-com.md b/content/posts/2010/shortphp-blog-moved-to-arnorhs-com.md similarity index 100% rename from pkg/posts/content/md/2010/shortphp-blog-moved-to-arnorhs-com.md rename to content/posts/2010/shortphp-blog-moved-to-arnorhs-com.md diff --git a/pkg/posts/content/md/2010/somebody-needs-to-invent-this-storage-device.md b/content/posts/2010/somebody-needs-to-invent-this-storage-device.md similarity index 100% rename from pkg/posts/content/md/2010/somebody-needs-to-invent-this-storage-device.md rename to content/posts/2010/somebody-needs-to-invent-this-storage-device.md diff --git a/pkg/posts/content/md/2010/stats-on-spam.md b/content/posts/2010/stats-on-spam.md similarity index 100% rename from pkg/posts/content/md/2010/stats-on-spam.md rename to content/posts/2010/stats-on-spam.md diff --git a/pkg/posts/content/md/2010/the-problem-with-plans-and-ideas.md b/content/posts/2010/the-problem-with-plans-and-ideas.md similarity index 100% rename from pkg/posts/content/md/2010/the-problem-with-plans-and-ideas.md rename to content/posts/2010/the-problem-with-plans-and-ideas.md diff --git a/pkg/posts/content/md/2010/to-rewrite-or-not-to-rewrite-and-the-sunk-code-dilemma.md b/content/posts/2010/to-rewrite-or-not-to-rewrite-and-the-sunk-code-dilemma.md similarity index 100% rename from pkg/posts/content/md/2010/to-rewrite-or-not-to-rewrite-and-the-sunk-code-dilemma.md rename to content/posts/2010/to-rewrite-or-not-to-rewrite-and-the-sunk-code-dilemma.md diff --git a/pkg/posts/content/md/2010/what-makes-a-great-webcast.md b/content/posts/2010/what-makes-a-great-webcast.md similarity index 100% rename from pkg/posts/content/md/2010/what-makes-a-great-webcast.md rename to content/posts/2010/what-makes-a-great-webcast.md diff --git a/pkg/posts/content/md/2010/wheres-your-logic.md b/content/posts/2010/wheres-your-logic.md similarity index 100% rename from pkg/posts/content/md/2010/wheres-your-logic.md rename to content/posts/2010/wheres-your-logic.md diff --git a/pkg/posts/content/md/2010/why-flash-based-websites-are-usually-a-bad-idea.md b/content/posts/2010/why-flash-based-websites-are-usually-a-bad-idea.md similarity index 100% rename from pkg/posts/content/md/2010/why-flash-based-websites-are-usually-a-bad-idea.md rename to content/posts/2010/why-flash-based-websites-are-usually-a-bad-idea.md diff --git a/pkg/posts/content/md/2011/11-reasons-why-business-catalyst-sucks.md b/content/posts/2011/11-reasons-why-business-catalyst-sucks.md similarity index 100% rename from pkg/posts/content/md/2011/11-reasons-why-business-catalyst-sucks.md rename to content/posts/2011/11-reasons-why-business-catalyst-sucks.md diff --git a/pkg/posts/content/md/2011/a-bad-habit-getting-all-the-domains.md b/content/posts/2011/a-bad-habit-getting-all-the-domains.md similarity index 100% rename from pkg/posts/content/md/2011/a-bad-habit-getting-all-the-domains.md rename to content/posts/2011/a-bad-habit-getting-all-the-domains.md diff --git a/pkg/posts/content/md/2011/a-git-power-feature-that-helped-me-10-mins-ago.md b/content/posts/2011/a-git-power-feature-that-helped-me-10-mins-ago.md similarity index 100% rename from pkg/posts/content/md/2011/a-git-power-feature-that-helped-me-10-mins-ago.md rename to content/posts/2011/a-git-power-feature-that-helped-me-10-mins-ago.md diff --git a/pkg/posts/content/md/2011/a-super-sweet-linux-windows-development-environment-setup.md b/content/posts/2011/a-super-sweet-linux-windows-development-environment-setup.md similarity index 100% rename from pkg/posts/content/md/2011/a-super-sweet-linux-windows-development-environment-setup.md rename to content/posts/2011/a-super-sweet-linux-windows-development-environment-setup.md diff --git a/pkg/posts/content/md/2011/apples-design-inspired-by-dieter-rams.md b/content/posts/2011/apples-design-inspired-by-dieter-rams.md similarity index 100% rename from pkg/posts/content/md/2011/apples-design-inspired-by-dieter-rams.md rename to content/posts/2011/apples-design-inspired-by-dieter-rams.md diff --git a/pkg/posts/content/md/2011/awesome-thoughts-on-how-programmers-should-think-about-time.md b/content/posts/2011/awesome-thoughts-on-how-programmers-should-think-about-time.md similarity index 100% rename from pkg/posts/content/md/2011/awesome-thoughts-on-how-programmers-should-think-about-time.md rename to content/posts/2011/awesome-thoughts-on-how-programmers-should-think-about-time.md diff --git a/pkg/posts/content/md/2011/best-guide-on-using-git-sub-modules-is-on-this-awesome-vim-blog.md b/content/posts/2011/best-guide-on-using-git-sub-modules-is-on-this-awesome-vim-blog.md similarity index 100% rename from pkg/posts/content/md/2011/best-guide-on-using-git-sub-modules-is-on-this-awesome-vim-blog.md rename to content/posts/2011/best-guide-on-using-git-sub-modules-is-on-this-awesome-vim-blog.md diff --git a/pkg/posts/content/md/2011/best-vim-cheat-sheet-in-the-world-planet-solar-system.md b/content/posts/2011/best-vim-cheat-sheet-in-the-world-planet-solar-system.md similarity index 100% rename from pkg/posts/content/md/2011/best-vim-cheat-sheet-in-the-world-planet-solar-system.md rename to content/posts/2011/best-vim-cheat-sheet-in-the-world-planet-solar-system.md diff --git a/pkg/posts/content/md/2011/bloomberg-interview-with-paul-graham-on-the-bubble-startup-valuations-etc.md b/content/posts/2011/bloomberg-interview-with-paul-graham-on-the-bubble-startup-valuations-etc.md similarity index 100% rename from pkg/posts/content/md/2011/bloomberg-interview-with-paul-graham-on-the-bubble-startup-valuations-etc.md rename to content/posts/2011/bloomberg-interview-with-paul-graham-on-the-bubble-startup-valuations-etc.md diff --git a/pkg/posts/content/md/2011/change-vim-tab-size.md b/content/posts/2011/change-vim-tab-size.md similarity index 100% rename from pkg/posts/content/md/2011/change-vim-tab-size.md rename to content/posts/2011/change-vim-tab-size.md diff --git a/pkg/posts/content/md/2011/cleaning-user-inputoutput-with-javascript-and-node-js.md b/content/posts/2011/cleaning-user-inputoutput-with-javascript-and-node-js.md similarity index 100% rename from pkg/posts/content/md/2011/cleaning-user-inputoutput-with-javascript-and-node-js.md rename to content/posts/2011/cleaning-user-inputoutput-with-javascript-and-node-js.md diff --git a/pkg/posts/content/md/2011/closures-in-javascript.md b/content/posts/2011/closures-in-javascript.md similarity index 100% rename from pkg/posts/content/md/2011/closures-in-javascript.md rename to content/posts/2011/closures-in-javascript.md diff --git a/pkg/posts/content/md/2011/color-the-new-amazing-mobile-app-that-crashes-your-phone-within-minutes.md b/content/posts/2011/color-the-new-amazing-mobile-app-that-crashes-your-phone-within-minutes.md similarity index 100% rename from pkg/posts/content/md/2011/color-the-new-amazing-mobile-app-that-crashes-your-phone-within-minutes.md rename to content/posts/2011/color-the-new-amazing-mobile-app-that-crashes-your-phone-within-minutes.md diff --git a/pkg/posts/content/md/2011/commands-for-converting-from-textmate-to-vim.md b/content/posts/2011/commands-for-converting-from-textmate-to-vim.md similarity index 100% rename from pkg/posts/content/md/2011/commands-for-converting-from-textmate-to-vim.md rename to content/posts/2011/commands-for-converting-from-textmate-to-vim.md diff --git a/pkg/posts/content/md/2011/delivering-email-with-php.md b/content/posts/2011/delivering-email-with-php.md similarity index 100% rename from pkg/posts/content/md/2011/delivering-email-with-php.md rename to content/posts/2011/delivering-email-with-php.md diff --git a/pkg/posts/content/md/2011/designing-user-interfaces-for-normies.md b/content/posts/2011/designing-user-interfaces-for-normies.md similarity index 100% rename from pkg/posts/content/md/2011/designing-user-interfaces-for-normies.md rename to content/posts/2011/designing-user-interfaces-for-normies.md diff --git a/pkg/posts/content/md/2011/diving-into-facebooks-timeline-ui.md b/content/posts/2011/diving-into-facebooks-timeline-ui.md similarity index 100% rename from pkg/posts/content/md/2011/diving-into-facebooks-timeline-ui.md rename to content/posts/2011/diving-into-facebooks-timeline-ui.md diff --git a/pkg/posts/content/md/2011/echo-js-launched.md b/content/posts/2011/echo-js-launched.md similarity index 100% rename from pkg/posts/content/md/2011/echo-js-launched.md rename to content/posts/2011/echo-js-launched.md diff --git a/pkg/posts/content/md/2011/facebooks-problem.md b/content/posts/2011/facebooks-problem.md similarity index 100% rename from pkg/posts/content/md/2011/facebooks-problem.md rename to content/posts/2011/facebooks-problem.md diff --git a/pkg/posts/content/md/2011/flexibility-speed-to-market-performance-pick-two.md b/content/posts/2011/flexibility-speed-to-market-performance-pick-two.md similarity index 100% rename from pkg/posts/content/md/2011/flexibility-speed-to-market-performance-pick-two.md rename to content/posts/2011/flexibility-speed-to-market-performance-pick-two.md diff --git a/pkg/posts/content/md/2011/great-quote-from-the-state-of-html5-audio.md b/content/posts/2011/great-quote-from-the-state-of-html5-audio.md similarity index 100% rename from pkg/posts/content/md/2011/great-quote-from-the-state-of-html5-audio.md rename to content/posts/2011/great-quote-from-the-state-of-html5-audio.md diff --git a/pkg/posts/content/md/2011/great-tip-on-finding-transaction-bottlenecks-in-mysql.md b/content/posts/2011/great-tip-on-finding-transaction-bottlenecks-in-mysql.md similarity index 100% rename from pkg/posts/content/md/2011/great-tip-on-finding-transaction-bottlenecks-in-mysql.md rename to content/posts/2011/great-tip-on-finding-transaction-bottlenecks-in-mysql.md diff --git a/pkg/posts/content/md/2011/handy-bookmarklet-for-measuring-page-scroll-performance.md b/content/posts/2011/handy-bookmarklet-for-measuring-page-scroll-performance.md similarity index 100% rename from pkg/posts/content/md/2011/handy-bookmarklet-for-measuring-page-scroll-performance.md rename to content/posts/2011/handy-bookmarklet-for-measuring-page-scroll-performance.md diff --git a/pkg/posts/content/md/2011/having-problems-with-motivation-and-getting-things-done-these-links-might-help.md b/content/posts/2011/having-problems-with-motivation-and-getting-things-done-these-links-might-help.md similarity index 100% rename from pkg/posts/content/md/2011/having-problems-with-motivation-and-getting-things-done-these-links-might-help.md rename to content/posts/2011/having-problems-with-motivation-and-getting-things-done-these-links-might-help.md diff --git a/pkg/posts/content/md/2011/how-to-do-full-text-search-in-mongodb.md b/content/posts/2011/how-to-do-full-text-search-in-mongodb.md similarity index 100% rename from pkg/posts/content/md/2011/how-to-do-full-text-search-in-mongodb.md rename to content/posts/2011/how-to-do-full-text-search-in-mongodb.md diff --git a/pkg/posts/content/md/2011/how-to-draw-an-equilateral-triangle-in-photoshop-cs5.md b/content/posts/2011/how-to-draw-an-equilateral-triangle-in-photoshop-cs5.md similarity index 100% rename from pkg/posts/content/md/2011/how-to-draw-an-equilateral-triangle-in-photoshop-cs5.md rename to content/posts/2011/how-to-draw-an-equilateral-triangle-in-photoshop-cs5.md diff --git a/pkg/posts/content/md/2011/how-to-move-a-wordpress-site-manually-from-one-location-to-another.md b/content/posts/2011/how-to-move-a-wordpress-site-manually-from-one-location-to-another.md similarity index 100% rename from pkg/posts/content/md/2011/how-to-move-a-wordpress-site-manually-from-one-location-to-another.md rename to content/posts/2011/how-to-move-a-wordpress-site-manually-from-one-location-to-another.md diff --git a/pkg/posts/content/md/2011/i-adhere-to-programming-motherfr.md b/content/posts/2011/i-adhere-to-programming-motherfr.md similarity index 100% rename from pkg/posts/content/md/2011/i-adhere-to-programming-motherfr.md rename to content/posts/2011/i-adhere-to-programming-motherfr.md diff --git a/pkg/posts/content/md/2011/i-changed-my-opinion-after-seeing-this-interview-with-colors-ceo-bill-nguyen.md b/content/posts/2011/i-changed-my-opinion-after-seeing-this-interview-with-colors-ceo-bill-nguyen.md similarity index 100% rename from pkg/posts/content/md/2011/i-changed-my-opinion-after-seeing-this-interview-with-colors-ceo-bill-nguyen.md rename to content/posts/2011/i-changed-my-opinion-after-seeing-this-interview-with-colors-ceo-bill-nguyen.md diff --git a/pkg/posts/content/md/2011/i-have-arrived-in-palo-alto.md b/content/posts/2011/i-have-arrived-in-palo-alto.md similarity index 100% rename from pkg/posts/content/md/2011/i-have-arrived-in-palo-alto.md rename to content/posts/2011/i-have-arrived-in-palo-alto.md diff --git a/pkg/posts/content/md/2011/i-like-these-fonts.md b/content/posts/2011/i-like-these-fonts.md similarity index 100% rename from pkg/posts/content/md/2011/i-like-these-fonts.md rename to content/posts/2011/i-like-these-fonts.md diff --git a/pkg/posts/content/md/2011/interesting-perspective-from-a-refactoring-rails-guy.md b/content/posts/2011/interesting-perspective-from-a-refactoring-rails-guy.md similarity index 100% rename from pkg/posts/content/md/2011/interesting-perspective-from-a-refactoring-rails-guy.md rename to content/posts/2011/interesting-perspective-from-a-refactoring-rails-guy.md diff --git a/pkg/posts/content/md/2011/interesting-range-inputs-and-putting-a-bubble-on-top.md b/content/posts/2011/interesting-range-inputs-and-putting-a-bubble-on-top.md similarity index 100% rename from pkg/posts/content/md/2011/interesting-range-inputs-and-putting-a-bubble-on-top.md rename to content/posts/2011/interesting-range-inputs-and-putting-a-bubble-on-top.md diff --git a/pkg/posts/content/md/2011/interesting-stuff-coming-up-in-firefox-10-aurora.md b/content/posts/2011/interesting-stuff-coming-up-in-firefox-10-aurora.md similarity index 100% rename from pkg/posts/content/md/2011/interesting-stuff-coming-up-in-firefox-10-aurora.md rename to content/posts/2011/interesting-stuff-coming-up-in-firefox-10-aurora.md diff --git a/pkg/posts/content/md/2011/jakob-nielsen-on-why-the-wsj-app-gets-bad-reviews.md b/content/posts/2011/jakob-nielsen-on-why-the-wsj-app-gets-bad-reviews.md similarity index 100% rename from pkg/posts/content/md/2011/jakob-nielsen-on-why-the-wsj-app-gets-bad-reviews.md rename to content/posts/2011/jakob-nielsen-on-why-the-wsj-app-gets-bad-reviews.md diff --git a/pkg/posts/content/md/2011/my-life-in-the-cloud.md b/content/posts/2011/my-life-in-the-cloud.md similarity index 100% rename from pkg/posts/content/md/2011/my-life-in-the-cloud.md rename to content/posts/2011/my-life-in-the-cloud.md diff --git a/pkg/posts/content/md/2011/my-problem-with-lorem-ipsum-and-what-to-do-instead.md b/content/posts/2011/my-problem-with-lorem-ipsum-and-what-to-do-instead.md similarity index 100% rename from pkg/posts/content/md/2011/my-problem-with-lorem-ipsum-and-what-to-do-instead.md rename to content/posts/2011/my-problem-with-lorem-ipsum-and-what-to-do-instead.md diff --git a/pkg/posts/content/md/2011/my-trip-to-california-usa.md b/content/posts/2011/my-trip-to-california-usa.md similarity index 100% rename from pkg/posts/content/md/2011/my-trip-to-california-usa.md rename to content/posts/2011/my-trip-to-california-usa.md diff --git a/pkg/posts/content/md/2011/new-vodafone-in-iceland-website-launched.md b/content/posts/2011/new-vodafone-in-iceland-website-launched.md similarity index 100% rename from pkg/posts/content/md/2011/new-vodafone-in-iceland-website-launched.md rename to content/posts/2011/new-vodafone-in-iceland-website-launched.md diff --git a/pkg/posts/content/md/2011/nobody-likes-annoying-interfaces.md b/content/posts/2011/nobody-likes-annoying-interfaces.md similarity index 100% rename from pkg/posts/content/md/2011/nobody-likes-annoying-interfaces.md rename to content/posts/2011/nobody-likes-annoying-interfaces.md diff --git a/pkg/posts/content/md/2011/node-js-surpasses-clojure-in-popularity.md b/content/posts/2011/node-js-surpasses-clojure-in-popularity.md similarity index 100% rename from pkg/posts/content/md/2011/node-js-surpasses-clojure-in-popularity.md rename to content/posts/2011/node-js-surpasses-clojure-in-popularity.md diff --git a/pkg/posts/content/md/2011/nordic-innovation-issue-2-is-out.md b/content/posts/2011/nordic-innovation-issue-2-is-out.md similarity index 100% rename from pkg/posts/content/md/2011/nordic-innovation-issue-2-is-out.md rename to content/posts/2011/nordic-innovation-issue-2-is-out.md diff --git a/pkg/posts/content/md/2011/online-magazine-launched-nordic-innovation.md b/content/posts/2011/online-magazine-launched-nordic-innovation.md similarity index 100% rename from pkg/posts/content/md/2011/online-magazine-launched-nordic-innovation.md rename to content/posts/2011/online-magazine-launched-nordic-innovation.md diff --git a/pkg/posts/content/md/2011/open-all-files-from-a-git-diff-or-git-show-with-this-handy-command-utility.md b/content/posts/2011/open-all-files-from-a-git-diff-or-git-show-with-this-handy-command-utility.md similarity index 100% rename from pkg/posts/content/md/2011/open-all-files-from-a-git-diff-or-git-show-with-this-handy-command-utility.md rename to content/posts/2011/open-all-files-from-a-git-diff-or-git-show-with-this-handy-command-utility.md diff --git a/pkg/posts/content/md/2011/palo-alto.md b/content/posts/2011/palo-alto.md similarity index 100% rename from pkg/posts/content/md/2011/palo-alto.md rename to content/posts/2011/palo-alto.md diff --git a/pkg/posts/content/md/2011/patrick-mckenzie-gives-a-talk-about-marketing-to-under-served-markets.md b/content/posts/2011/patrick-mckenzie-gives-a-talk-about-marketing-to-under-served-markets.md similarity index 100% rename from pkg/posts/content/md/2011/patrick-mckenzie-gives-a-talk-about-marketing-to-under-served-markets.md rename to content/posts/2011/patrick-mckenzie-gives-a-talk-about-marketing-to-under-served-markets.md diff --git a/pkg/posts/content/md/2011/possibly-the-nicest-node-js-beginners-guide-and-style-guide.md b/content/posts/2011/possibly-the-nicest-node-js-beginners-guide-and-style-guide.md similarity index 100% rename from pkg/posts/content/md/2011/possibly-the-nicest-node-js-beginners-guide-and-style-guide.md rename to content/posts/2011/possibly-the-nicest-node-js-beginners-guide-and-style-guide.md diff --git a/pkg/posts/content/md/2011/prog21-dont-distract-new-programmers-with-oop.md b/content/posts/2011/prog21-dont-distract-new-programmers-with-oop.md similarity index 100% rename from pkg/posts/content/md/2011/prog21-dont-distract-new-programmers-with-oop.md rename to content/posts/2011/prog21-dont-distract-new-programmers-with-oop.md diff --git a/pkg/posts/content/md/2011/quick-update-im-coming-to-silicon-valley-launched-websites-more.md b/content/posts/2011/quick-update-im-coming-to-silicon-valley-launched-websites-more.md similarity index 100% rename from pkg/posts/content/md/2011/quick-update-im-coming-to-silicon-valley-launched-websites-more.md rename to content/posts/2011/quick-update-im-coming-to-silicon-valley-launched-websites-more.md diff --git a/pkg/posts/content/md/2011/responsive-grid-framework-written-in-stylus-for-node-js.md b/content/posts/2011/responsive-grid-framework-written-in-stylus-for-node-js.md similarity index 100% rename from pkg/posts/content/md/2011/responsive-grid-framework-written-in-stylus-for-node-js.md rename to content/posts/2011/responsive-grid-framework-written-in-stylus-for-node-js.md diff --git a/pkg/posts/content/md/2011/smugmugs-don-macaskill-talks-about-their-infrastructure.md b/content/posts/2011/smugmugs-don-macaskill-talks-about-their-infrastructure.md similarity index 100% rename from pkg/posts/content/md/2011/smugmugs-don-macaskill-talks-about-their-infrastructure.md rename to content/posts/2011/smugmugs-don-macaskill-talks-about-their-infrastructure.md diff --git a/pkg/posts/content/md/2011/the-ie-team-throws-bricks-in-a-glass-house.md b/content/posts/2011/the-ie-team-throws-bricks-in-a-glass-house.md similarity index 100% rename from pkg/posts/content/md/2011/the-ie-team-throws-bricks-in-a-glass-house.md rename to content/posts/2011/the-ie-team-throws-bricks-in-a-glass-house.md diff --git a/pkg/posts/content/md/2011/vimconf-is-hopefully-coming.md b/content/posts/2011/vimconf-is-hopefully-coming.md similarity index 100% rename from pkg/posts/content/md/2011/vimconf-is-hopefully-coming.md rename to content/posts/2011/vimconf-is-hopefully-coming.md diff --git a/pkg/posts/content/md/2011/what-i-liked-about-business-catalyst.md b/content/posts/2011/what-i-liked-about-business-catalyst.md similarity index 100% rename from pkg/posts/content/md/2011/what-i-liked-about-business-catalyst.md rename to content/posts/2011/what-i-liked-about-business-catalyst.md diff --git a/pkg/posts/content/md/2011/which-javascript-templating-engine-should-you-use.md b/content/posts/2011/which-javascript-templating-engine-should-you-use.md similarity index 100% rename from pkg/posts/content/md/2011/which-javascript-templating-engine-should-you-use.md rename to content/posts/2011/which-javascript-templating-engine-should-you-use.md diff --git a/pkg/posts/content/md/2011/why-a-qwiki-will-probably-be-a-success.md b/content/posts/2011/why-a-qwiki-will-probably-be-a-success.md similarity index 100% rename from pkg/posts/content/md/2011/why-a-qwiki-will-probably-be-a-success.md rename to content/posts/2011/why-a-qwiki-will-probably-be-a-success.md diff --git a/pkg/posts/content/md/2011/why-is-node-js-becoming-more-popular-than-clojure.md b/content/posts/2011/why-is-node-js-becoming-more-popular-than-clojure.md similarity index 100% rename from pkg/posts/content/md/2011/why-is-node-js-becoming-more-popular-than-clojure.md rename to content/posts/2011/why-is-node-js-becoming-more-popular-than-clojure.md diff --git a/pkg/posts/content/md/2012/comparing-the-performance-of-math-floor-parseint-and-a-bitwise-shift.md b/content/posts/2012/comparing-the-performance-of-math-floor-parseint-and-a-bitwise-shift.md similarity index 100% rename from pkg/posts/content/md/2012/comparing-the-performance-of-math-floor-parseint-and-a-bitwise-shift.md rename to content/posts/2012/comparing-the-performance-of-math-floor-parseint-and-a-bitwise-shift.md diff --git a/pkg/posts/content/md/2012/is-node-js-the-next-ruby-on-rails.md b/content/posts/2012/is-node-js-the-next-ruby-on-rails.md similarity index 100% rename from pkg/posts/content/md/2012/is-node-js-the-next-ruby-on-rails.md rename to content/posts/2012/is-node-js-the-next-ruby-on-rails.md diff --git a/pkg/posts/content/md/2012/my-new-kindle-fire.md b/content/posts/2012/my-new-kindle-fire.md similarity index 100% rename from pkg/posts/content/md/2012/my-new-kindle-fire.md rename to content/posts/2012/my-new-kindle-fire.md diff --git a/pkg/posts/content/md/2012/sensei-db.md b/content/posts/2012/sensei-db.md similarity index 100% rename from pkg/posts/content/md/2012/sensei-db.md rename to content/posts/2012/sensei-db.md diff --git a/pkg/posts/content/md/2013/1-prominence-the-ultimate-tool-in-the-fight-against-perceived-complexity.md b/content/posts/2013/1-prominence-the-ultimate-tool-in-the-fight-against-perceived-complexity.md similarity index 100% rename from pkg/posts/content/md/2013/1-prominence-the-ultimate-tool-in-the-fight-against-perceived-complexity.md rename to content/posts/2013/1-prominence-the-ultimate-tool-in-the-fight-against-perceived-complexity.md diff --git a/pkg/posts/content/md/2013/how-to-be-great-at-building-ui-wireframes.md b/content/posts/2013/how-to-be-great-at-building-ui-wireframes.md similarity index 100% rename from pkg/posts/content/md/2013/how-to-be-great-at-building-ui-wireframes.md rename to content/posts/2013/how-to-be-great-at-building-ui-wireframes.md diff --git a/pkg/posts/content/md/2013/language.md b/content/posts/2013/language.md similarity index 100% rename from pkg/posts/content/md/2013/language.md rename to content/posts/2013/language.md diff --git a/pkg/posts/content/md/2013/the-unclimbable-mountain.md b/content/posts/2013/the-unclimbable-mountain.md similarity index 100% rename from pkg/posts/content/md/2013/the-unclimbable-mountain.md rename to content/posts/2013/the-unclimbable-mountain.md diff --git a/pkg/posts/content/md/2014/android-deterrent.md b/content/posts/2014/android-deterrent.md similarity index 100% rename from pkg/posts/content/md/2014/android-deterrent.md rename to content/posts/2014/android-deterrent.md diff --git a/pkg/posts/content/md/2020/arnorhs-dev-launches.md b/content/posts/2020/arnorhs-dev-launches.md similarity index 100% rename from pkg/posts/content/md/2020/arnorhs-dev-launches.md rename to content/posts/2020/arnorhs-dev-launches.md diff --git a/pkg/posts/content/md/2021/2021-status-report.md b/content/posts/2021/2021-status-report.md similarity index 100% rename from pkg/posts/content/md/2021/2021-status-report.md rename to content/posts/2021/2021-status-report.md diff --git a/pkg/posts/content/md/2021/astro-static-site-builder-of-dreams.md b/content/posts/2021/astro-static-site-builder-of-dreams.md similarity index 100% rename from pkg/posts/content/md/2021/astro-static-site-builder-of-dreams.md rename to content/posts/2021/astro-static-site-builder-of-dreams.md diff --git a/pkg/posts/content/md/2022/2022-in-review.md b/content/posts/2022/2022-in-review.md similarity index 100% rename from pkg/posts/content/md/2022/2022-in-review.md rename to content/posts/2022/2022-in-review.md diff --git a/pkg/posts/content/md/2023/conversation-with-chatgpt-about-self-improvement.md b/content/posts/2023/conversation-with-chatgpt-about-self-improvement.md similarity index 100% rename from pkg/posts/content/md/2023/conversation-with-chatgpt-about-self-improvement.md rename to content/posts/2023/conversation-with-chatgpt-about-self-improvement.md diff --git a/pkg/posts/content/md/2023/heartbreak-why-gatsbyjs-failed.md b/content/posts/2023/heartbreak-why-gatsbyjs-failed.md similarity index 100% rename from pkg/posts/content/md/2023/heartbreak-why-gatsbyjs-failed.md rename to content/posts/2023/heartbreak-why-gatsbyjs-failed.md diff --git a/pkg/posts/content/md/2023/react-framework-or-library-revisited.md b/content/posts/2023/react-framework-or-library-revisited.md similarity index 100% rename from pkg/posts/content/md/2023/react-framework-or-library-revisited.md rename to content/posts/2023/react-framework-or-library-revisited.md diff --git a/pkg/posts/content/md/2025/Why-are-coding-agents-all-going-to-the-terminal.md b/content/posts/2025/Why-are-coding-agents-all-going-to-the-terminal.md similarity index 100% rename from pkg/posts/content/md/2025/Why-are-coding-agents-all-going-to-the-terminal.md rename to content/posts/2025/Why-are-coding-agents-all-going-to-the-terminal.md diff --git a/pkg/posts/src/build/getMarkdownPosts.ts b/pkg/posts/src/build/getMarkdownPosts.ts new file mode 100644 index 0000000..e5985f5 --- /dev/null +++ b/pkg/posts/src/build/getMarkdownPosts.ts @@ -0,0 +1,39 @@ +import { marked } from 'marked' +import { readdir, readFile } from 'node:fs/promises' +import path from 'node:path' +import type { Post } from '../lib/types' +import { transformMd } from './transformMd' + +const utf8 = { encoding: 'utf-8' as BufferEncoding } + +export async function getMarkdownPosts(postsDir: string): Promise { + const { + default: { loadFront }, + } = await import('yaml-front-matter') + + const files = await readdir(postsDir, { + encoding: 'utf-8', + recursive: true, + }) + + return ( + await Promise.all( + files + .filter((fn) => fn.match(/\.md$/)) + .map(async (fn) => ({ + contents: await readFile(`${postsDir}/${fn}`, utf8), + fn, + })), + ) + ) + .map(({ fn, contents }) => { + const { __content, ...frontmatter } = loadFront(contents) + + return { + filename: path.basename(fn), + html: marked.parse(__content), + metadata: frontmatter, + } + }) + .map((x) => transformMd(x)) +} diff --git a/pkg/posts/src/build/getPostCollection.test.ts b/pkg/posts/src/build/getPostCollection.test.ts index c6e55e7..4edcc8f 100644 --- a/pkg/posts/src/build/getPostCollection.test.ts +++ b/pkg/posts/src/build/getPostCollection.test.ts @@ -1,11 +1,14 @@ /// import { getPostCollection } from './getPostCollection' import type { Post } from '../lib/types' +import path from 'node:path' + +const postsDir = path.resolve(process.cwd(), '../../content') describe('getPostCollection', () => { let allItems: Post[] beforeAll(async () => { - allItems = await getPostCollection() + allItems = await getPostCollection(postsDir) }) describe('allItems', () => { diff --git a/pkg/posts/src/build/getPostCollection.ts b/pkg/posts/src/build/getPostCollection.ts index fa65e40..4ee275c 100644 --- a/pkg/posts/src/build/getPostCollection.ts +++ b/pkg/posts/src/build/getPostCollection.ts @@ -1,45 +1,7 @@ -import { transformMd } from './markdown' -import { marked } from 'marked' -import { sortBy } from './sortBy' import type { Post } from '../lib/types' -import path from 'node:path' -import { readdir, readFile } from 'node:fs/promises' - -const markdownPath = path.resolve(process.cwd(), 'content/md') -const utf8 = { encoding: 'utf-8' as BufferEncoding } - -const getMarkdownPosts = async (): Promise => { - const { - default: { loadFront }, - } = await import('yaml-front-matter') - - const files = await readdir(markdownPath, { - encoding: 'utf-8', - recursive: true, - }) - - return ( - await Promise.all( - files - .filter((fn) => fn.match(/\.md$/)) - .map(async (fn) => ({ - contents: await readFile(`${markdownPath}/${fn}`, utf8), - fn, - })), - ) - ) - .map(({ fn, contents }) => { - const { __content, ...frontmatter } = loadFront(contents) - - return { - filename: path.basename(fn), - html: marked.parse(__content), - metadata: frontmatter, - } - }) - .map((x) => transformMd(x)) -} +import { getMarkdownPosts } from './getMarkdownPosts' +import { sortBy } from './sortBy' -export const getPostCollection = async (): Promise => { - return (await getMarkdownPosts()).sort(sortBy<{}>('publishedDate', 'desc')) +export async function getPostCollection(postsDir: string): Promise { + return (await getMarkdownPosts(postsDir)).sort(sortBy<{}>('publishedDate', 'desc')) } diff --git a/pkg/posts/src/build/markdown.ts b/pkg/posts/src/build/transformMd.ts similarity index 83% rename from pkg/posts/src/build/markdown.ts rename to pkg/posts/src/build/transformMd.ts index 6234191..b8027de 100644 --- a/pkg/posts/src/build/markdown.ts +++ b/pkg/posts/src/build/transformMd.ts @@ -1,18 +1,14 @@ import md5 from 'md5' import type { Post } from '../lib/types' -export interface MdFile { +type MdFile = { filename: string html: string metadata: Record } // function for reshaping each post -export const transformMd = ({ - filename, - html, - metadata: { summary, title, date }, -}: MdFile): Post => { +export function transformMd({ filename, html, metadata: { summary, title, date } }: MdFile): Post { // the slug is the filename with the '.md' ending removed const slug = filename.replace(/\.md$/, '').toLocaleLowerCase() diff --git a/pkg/posts/tsconfig.json b/pkg/posts/tsconfig.json index 2c90571..ab917de 100644 --- a/pkg/posts/tsconfig.json +++ b/pkg/posts/tsconfig.json @@ -8,6 +8,7 @@ "strict": true, "moduleResolution": "bundler", "noEmitOnError": true, + "skipLibCheck": true, "resolveJsonModule": true, "module": "esnext" }, diff --git a/pkg/posts/vite.config.ts b/pkg/posts/vite.config.ts index 94cc59e..5c91f2a 100644 --- a/pkg/posts/vite.config.ts +++ b/pkg/posts/vite.config.ts @@ -3,6 +3,7 @@ import { nodeExternals } from 'rollup-plugin-node-externals' import { defineConfig } from 'vite' import dts from 'vite-plugin-dts' import { getPostCollection } from './src/build/getPostCollection' +import path from 'node:path' export default defineConfig({ build: { @@ -26,7 +27,7 @@ export default defineConfig({ }, load: async (id) => { if (id === 'posts:json') { - const items = await getPostCollection() + const items = await getPostCollection(path.resolve(process.cwd(), '../../content')) return `export default ${JSON.stringify(items, undefined, '\t')}` } },