diff --git a/.eleventy.js b/.eleventy.js index c974fc9..31d6b33 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,7 +1,10 @@ const pluginTailwindCSS = require("eleventy-plugin-tailwindcss"); const pluginRss = require("@11ty/eleventy-plugin-rss"); +const cacheBuster = require('@mightyplow/eleventy-plugin-cache-buster'); module.exports = function (eleventyConfig) { + eleventyConfig.addPassthroughCopy("_content/images"); + eleventyConfig.addPlugin(pluginTailwindCSS, { src: "_includes/**/*.css", keepFolderStructure: false, @@ -9,6 +12,15 @@ module.exports = function (eleventyConfig) { eleventyConfig.addPlugin(pluginRss); + const cacheBusterOptions = { + createResourceHash() { + return Date.now(); + }, + // outputDirectory: "_site", + }; + + eleventyConfig.addPlugin(cacheBuster(cacheBusterOptions)); + eleventyConfig.addCollection("archive", (collectionApi) => { const formatter = new Intl.DateTimeFormat("en-US", { year: "numeric", diff --git a/.github/workflows/build-deploy-prod.yml b/.github/workflows/build-deploy-prod.yml new file mode 100644 index 0000000..b74371e --- /dev/null +++ b/.github/workflows/build-deploy-prod.yml @@ -0,0 +1,27 @@ +name: Build and Deploy Production Site + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: setup node + uses: actions/setup-node@v1 + with: + node-version: 14.x + - run: npm ci + - run: npm run build --if-present + - name: deploy site + uses: appleboy/scp-action@v0.1.1 + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + source: "_site" + target: "/home/${{ secrets.USERNAME }}/erickruizdechavez.com" + strip_components: 1 diff --git a/.github/workflows/node.js.yml b/.github/workflows/build-deploy-staging.yml similarity index 90% rename from .github/workflows/node.js.yml rename to .github/workflows/build-deploy-staging.yml index 1be1b4b..eef679c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/build-deploy-staging.yml @@ -1,8 +1,9 @@ -name: Build and Deploy site +name: Build and Deploy Staging Site on: push: - branches: [main] + branches: + - develop jobs: build: diff --git a/_content/blog/2019-07-19-automation-with-cli-and-node.md b/_content/blog/2019-07-19-automation-with-cli-and-node.md index 9e0b45c..4962463 100644 --- a/_content/blog/2019-07-19-automation-with-cli-and-node.md +++ b/_content/blog/2019-07-19-automation-with-cli-and-node.md @@ -23,11 +23,11 @@ The first step was to manually do what I needed to do, but not the usual repetit My first automated take at this was to use [Keyboard Maestro](https://www.keyboardmaestro.com/main/). I was able to automate Safari to open a new tab, go to the URL I needed, using JavaScript get the information I needed from the website and show a notification and put it on the clipboard so I could paste it later on another place. -[](https://erickruizdechavez.com/wp-content/uploads/2019/07/Image-7-19-19-at-9.47-AM.jpg) +[![](/images/Image-7-19-19-at-9.47-AM.jpg)](/images/Image-7-19-19-at-9.47-AM.jpg) And when run, it looks like this: -[](https://erickruizdechavez.com/wp-content/uploads/2019/07/Screen-Shot-2019-07-19-at-10.10.29-AM.png) +[![](/images/Screen-Shot-2019-07-19-at-10.10.29-AM.png)](/images/Screen-Shot-2019-07-19-at-10.10.29-AM.png) After some testing and a couple of real-life uses, I noticed one thing. I do not need to authenticate to this page to grab the information, so I do not need Safari (or KM). diff --git a/_content/contact.njk b/_content/contact.njk index 98dc82a..62cda8c 100644 --- a/_content/contact.njk +++ b/_content/contact.njk @@ -2,3 +2,16 @@ title: Contact ---

{{ title }}

+ +
+ + + + + + + + + + +
diff --git a/_content/feed.njk b/_content/feed.njk index de9aae9..98b6c1e 100644 --- a/_content/feed.njk +++ b/_content/feed.njk @@ -21,6 +21,11 @@ permalink: feed.xml {{ post.data.title }} + {%- if post.data.tags %} + {%- for tag in post.data.tags %} + + {%- endfor %} + {%- endif %} {{ post.date | rssDate }} {{ absolutePostUrl }} {{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }} diff --git a/_content/images/Header-Large.png b/_content/images/Header-Large.png new file mode 100644 index 0000000..c55af46 Binary files /dev/null and b/_content/images/Header-Large.png differ diff --git a/_content/images/Image-7-19-19-at-9.47-AM.jpg b/_content/images/Image-7-19-19-at-9.47-AM.jpg new file mode 100644 index 0000000..72a849b Binary files /dev/null and b/_content/images/Image-7-19-19-at-9.47-AM.jpg differ diff --git a/_content/images/Profile.png b/_content/images/Profile.png new file mode 100644 index 0000000..88a762a Binary files /dev/null and b/_content/images/Profile.png differ diff --git a/_content/images/Screen-Shot-2019-07-19-at-10.10.29-AM.png b/_content/images/Screen-Shot-2019-07-19-at-10.10.29-AM.png new file mode 100644 index 0000000..aab377b Binary files /dev/null and b/_content/images/Screen-Shot-2019-07-19-at-10.10.29-AM.png differ diff --git a/_content/images/franck-v-U3sOwViXhkY-unsplash.jpg b/_content/images/franck-v-U3sOwViXhkY-unsplash.jpg new file mode 100644 index 0000000..646e6e6 Binary files /dev/null and b/_content/images/franck-v-U3sOwViXhkY-unsplash.jpg differ diff --git a/_content/images/liam-seskis-_UeMG7W9-no-unsplash.jpg b/_content/images/liam-seskis-_UeMG7W9-no-unsplash.jpg new file mode 100644 index 0000000..412a2a7 Binary files /dev/null and b/_content/images/liam-seskis-_UeMG7W9-no-unsplash.jpg differ diff --git a/package-lock.json b/package-lock.json index 12765f8..f35933a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,6 +68,18 @@ "purgecss": "^3.1.3" } }, + "@mightyplow/eleventy-plugin-cache-buster": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@mightyplow/eleventy-plugin-cache-buster/-/eleventy-plugin-cache-buster-1.1.3.tgz", + "integrity": "sha512-jM+gZkxQDuGCHlNnLRxvx5YRnLQG8NK6TLNhXkCwi8m0s+Yzt7YMlNLQ9CRLLpZiNJsn7/q59K885O4G2E0GHw==", + "dev": true, + "requires": { + "deepmerge": "^2.1.1", + "md5": "^2.2.1", + "minimist": "^1.2.0", + "parse5": "^5.0.0" + } + }, "@nodelib/fs.scandir": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", @@ -660,6 +672,12 @@ "is-regex": "^1.0.3" } }, + "charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=", + "dev": true + }, "chokidar": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", @@ -875,6 +893,12 @@ "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", "dev": true }, + "crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=", + "dev": true + }, "css-unit-converter": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.2.tgz", @@ -916,6 +940,12 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==", + "dev": true + }, "defined": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", @@ -2106,6 +2136,25 @@ } } }, + "md5": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", + "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", + "dev": true, + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2", + "is-buffer": "~1.1.6" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + } + } + }, "mdurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", @@ -2385,6 +2434,12 @@ "integrity": "sha1-8r0iH2zJcKk42IVWq8WJyqqiveE=", "dev": true }, + "parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "dev": true + }, "parseqs": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", diff --git a/package.json b/package.json index fbadb6a..b64396e 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "devDependencies": { "@11ty/eleventy": "^0.11.1", "@11ty/eleventy-plugin-rss": "^1.0.9", + "@mightyplow/eleventy-plugin-cache-buster": "^1.1.3", "@tailwindcss/typography": "^0.3.1", "eleventy-plugin-tailwindcss": "^0.3.0" } diff --git a/tailwind.config.js b/tailwind.config.js index 3337db3..41cb1fb 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -4,7 +4,7 @@ const colors = require("tailwindcss/colors"); // https://github.com/tailwindlabs/tailwindcss-typography/issues/69#issuecomment-752946920 module.exports = { - purge: ["_includes/**/*.njk", "_includes/**/*.css"], + purge: ["_includes/**/*.njk", "_content/**/*.njk", "_includes/**/*.css"], darkMode: "media", theme: { extend: {