From e785986a4cea672fa42cf859adca7d045bc37ad2 Mon Sep 17 00:00:00 2001 From: Jonny Gerig Meyer Date: Tue, 12 Nov 2024 10:55:39 -0500 Subject: [PATCH 1/2] Adjust ports to use localias --- .devcontainer/devcontainer.json | 2 +- README.md | 28 +++++++++++++++++++--------- content/blog/2024/css-layout.md | 2 +- eleventy.config.js | 1 + package.json | 2 +- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3af492a25..1abe0591b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,7 +4,7 @@ "containerEnv": { "SHELL": "/bin/bash" }, - "forwardPorts": [8080], + "forwardPorts": [7050], "customizations": { "vscode": { "extensions": [ diff --git a/README.md b/README.md index fda69b5b9..046cfcaf7 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,8 @@ if necessary, then run `nvm install` (once per active shell) to use the correct version of Node for OddSite development. The correct [Yarn](https://yarnpkg.com/) version is included with Node, and will -be used automatically for any `yarn` command. To activate it, run -`corepack enable` (once per local Node installation). +be used automatically for any `yarn` command. To activate it, run `corepack +enable` (once per local Node installation). To upgrade the Node version used by OddSite, update the version number in these places and then run `nvm install` to upgrade: @@ -42,14 +42,24 @@ yarn ### Development tasks -Compile and run [Eleventy](https://www.11ty.dev/) server, with a watcher for file -changes: +Compile and run [Eleventy](https://www.11ty.dev/) server, with a watcher for +file changes: ``` yarn serve ``` -The site will be compiled into `_site/` and available at http://localhost:8080. +The site will be compiled into `_site/` and available at http://localhost:7050. + +If +[localias](https://github.com/peterldowns/localias?tab=readme-ov-file#-localias) +is configured and running, add an alias for this project: + +``` +localias set oddsite.local 7050 +``` + +This will allow you to visit the project at . You can also run individual commands: @@ -85,13 +95,13 @@ yarn lint:js yarn sassdoc ``` -Sass Docs are compiled into the `_site/styleguide/` folder, which is then available -at the URL: `/styleguide/`. +Sass Docs are compiled into the `_site/styleguide/` folder, which is then +available at the URL: `/styleguide/`. ## Deployment -The site is auto-deployed on [Netlify](https://www.netlify.com/) from the -`main` branch on GitHub. Deploys are automated on push to `main`. +The site is auto-deployed on [Netlify](https://www.netlify.com/) from the `main` +branch on GitHub. Deploys are automated on push to `main`. Use branches and PRs for changes, and Netlify will create staging previews for functional review before merge. diff --git a/content/blog/2024/css-layout.md b/content/blog/2024/css-layout.md index 2fac3b930..f719aee6b 100644 --- a/content/blog/2024/css-layout.md +++ b/content/blog/2024/css-layout.md @@ -239,7 +239,7 @@ We started phasing out Susy on OddBird projects in 2015. By 2017, we were -[recommending others do the same](http://localhost:8080/talks/no-grid-system/), +[recommending others do the same](/talks/no-grid-system/), and we [officially deprecated](https://github.com/oddbird/susy/commit/018b5c638ec0726d172af96828e6f1712682283b) the project diff --git a/eleventy.config.js b/eleventy.config.js index 495ab113d..f0f18526d 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -19,6 +19,7 @@ import * as type from '#filters/type.js'; import * as utils from '#filters/utils.js'; export default (eleventyConfig) => { + eleventyConfig.setServerOptions({ port: 7050 }); eleventyConfig.setUseGitIgnore(false); eleventyConfig.setWatchThrottleWaitTime(100); eleventyConfig.addPlugin(rss); diff --git a/package.json b/package.json index c75d466a0..94a7025ca 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "webmentions": "node scripts/fetch-webmentions.js", "prod": "yarn build", "checklinks:internal": "npx --yes --package=hyperlink --package=tap-spot -- 'hyperlink --canonicalroot https://www.oddbird.net/ --root _site/ -r -p -i --skip \".css.map\" --skip \".js.map\" --skip \"feed.atom\" --skip \"/docs/\" _site/index.html | tap-spot'", - "checklinks:external": "npx --yes --package=broken-link-checker -- 'blc -ro --exclude=localhost:8080 --exclude=stackoverflow.com --exclude=codepen.io --exclude=linkedin.com --exclude=projects.invisionapp.com --exclude=docs.github.com --exclude=www.sass.hk --exclude=www.drupal.org --exclude=www.canva.com --exclude=www.fastcompany.com --exclude=duabuset-tandem.com --exclude=puta-elementa.com --exclude=campaignzero.org --exclude=twitter.com --exclude=vimeo.com --exclude=slideshare.net --exclude=coachhub.resilienceboost.com https://www.oddbird.net'", + "checklinks:external": "npx --yes --package=broken-link-checker -- 'blc -ro --exclude=stackoverflow.com --exclude=codepen.io --exclude=linkedin.com --exclude=projects.invisionapp.com --exclude=docs.github.com --exclude=www.sass.hk --exclude=www.drupal.org --exclude=www.canva.com --exclude=www.fastcompany.com --exclude=duabuset-tandem.com --exclude=puta-elementa.com --exclude=campaignzero.org --exclude=twitter.com --exclude=vimeo.com --exclude=slideshare.net --exclude=coachhub.resilienceboost.com https://www.oddbird.net'", "checklinks": "run-s checklinks:internal checklinks:external" }, "imports": { From 7dd26e77f29c2adadb6edbfc8df282c24149bd12 Mon Sep 17 00:00:00 2001 From: Ed Rivas Date: Tue, 12 Nov 2024 21:33:06 +0000 Subject: [PATCH 2/2] Fix ports for localias on Windows --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1abe0591b..6035a3764 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,7 +4,7 @@ "containerEnv": { "SHELL": "/bin/bash" }, - "forwardPorts": [7050], + "appPort": [7050], "customizations": { "vscode": { "extensions": [