Skip to content

Commit 00e1a87

Browse files
authored
Require standard ASCII quote characters (#392)
1 parent a90572b commit 00e1a87

6 files changed

+31
-12
lines changed

index.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,11 @@ tracer(Metalsmith(path.resolve()))
542542
directoryIndex: 'index.md'
543543
}))
544544

545-
// Validate markdown file naming
546545
.use((files, metalsmith, done) => {
547-
const pathMismatches = metalsmith.match('**/*.md', Object.keys(files))
546+
const markdownFilenames = metalsmith.match('**/*.md', Object.keys(files));
547+
548+
// Validate markdown file naming
549+
const pathMismatches = markdownFilenames
548550
.map((filename) => {
549551
const file = files[filename];
550552
const permanentPath = `${file.paths.dir || 'index'}${file.paths.ext}`
@@ -555,7 +557,24 @@ tracer(Metalsmith(path.resolve()))
555557
.filter((err) => err);
556558
if (pathMismatches.length) {
557559
done(`Some blog articles are named incorrectly:\n${pathMismatches.map((err) => ` ${err}`).join('\n')}`);
560+
return;
558561
}
562+
563+
// Validate markdown content
564+
const illegalContents = markdownFilenames
565+
.map((filename) => {
566+
const file = files[filename];
567+
const illegalMatches = /([ʹʺʻʼʽˈ˝ˮ])/.exec(file.contents.toString());
568+
if (illegalMatches !== null) {
569+
return `${filename}: ${illegalMatches.slice(1).join(', ')}`;
570+
}
571+
})
572+
.filter((err) => err);
573+
if (illegalContents.length) {
574+
done(`Some blog articles have illegal content:\n${illegalContents.map((err) => ` ${err} `).join('\n')}`);
575+
return;
576+
}
577+
559578
done();
560579
})
561580

src/blog/amortize-your-learning-by-writing-how-to-guides.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ Here are some example how-to guides you could write today:
5252
- Local development & testing instructions for your services, especially if they differ from your organization's norms
5353
- Deployment steps for your services, in case multiple manual steps need coordination
5454
- A list of custom metrics emitted by your services and what they mean
55-
- How to use one of your team's admin tools (and no, strict RPC schemas arent self-descriptive)
55+
- How to use one of your team's admin tools (and no, strict RPC schemas aren't self-descriptive)
5656

5757
## Audience three: the public
5858

5959
You should be motivated by both helping yourself and your colleagues, but if not, try writing how-to guides for clout.
6060

61-
If in the course of your daily tasks youve learned something generalizable or publicly applicable, blog about it! You would be surprised how helpful it can be to someone else. If the [Reddit blackout of 2023](https://en.wikipedia.org/wiki/2023_Reddit_API_controversy) taught us anything, it's that a lot of valuable knowledge exists on the internet, and sometimes it only exists in one or two Google-crawled places. You have valuable knowledge, and others should feel honored for you to share it.
61+
If in the course of your daily tasks you've learned something generalizable or publicly applicable, blog about it! You would be surprised how helpful it can be to someone else. If the [Reddit blackout of 2023](https://en.wikipedia.org/wiki/2023_Reddit_API_controversy) taught us anything, it's that a lot of valuable knowledge exists on the internet, and sometimes it only exists in one or two Google-crawled places. You have valuable knowledge, and others should feel honored for you to share it.
6262

6363
I wrote "[Bash Environment Variable Defaults](/blog/bash-environment-variable-defaults)" because I wanted a "snack" article that was easy to write, and even though the topic is relatively niche, the article is in my top five articles by hits. On the other hand, I wrote "[Docker Shell vs. Exec Form](/blog/docker-shell-vs.-exec-form)" mostly as an article to support "[You Don't Need an Init System for Node.js in Docker](/blog/you-don-t-need-an-init-system-for-node.js-in-docker)," but the former gets nearly 10x the hits. There is so much more information about Docker and related technologies that I thought it would get lost in the noise. But you never know what people will find valuable!
6464

@@ -72,6 +72,6 @@ It can be difficult (and overwhelming!) to start writing something from nothing.
7272

7373
There's a Ralph Waldo Emerson quote from his essay titled "[Compensation](https://en.wikipedia.org/wiki/Compensation_(essay))" that is often referenced when talking about the "pay it forward" movement:
7474

75-
> In the order of nature we cant render benefits to those from whom we receive them, or only seldom. But the benefit we receive must be rendered again, line for line, deed for deed, cent for cent, to somebody. Beware of too much good staying in your hand. It will fast corrupt and worm worms. Pay it away quickly in some sort.
75+
> In the order of nature we can't render benefits to those from whom we receive them, or only seldom. But the benefit we receive must be rendered again, line for line, deed for deed, cent for cent, to somebody. Beware of too much good staying in your hand. It will fast corrupt and worm worms. Pay it away quickly in some sort.
7676
7777
In that paragraph, Emerson is talking about paying debts, and the rest of the essay is about keeping one's life in balance. It's not quite the same as writing how-to guides, but I appreciate his opinion that it's one's responsibility to pass benefits on to others.

src/blog/an-effective-incident-runbook-template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Steps to take, in order:
125125
> 1. Help the incident responder take steps to stop the situation from getting worse.
126126
> 2. Help the incident responder take steps to recover from the situation.
127127
>
128-
> Incident mitigation is all about fixing the immediate problem. You can think of mitigation as: if Im paged at 3 a.m., what do I need to do to get the system healthy such that I can confidently & safely go back to sleep?
128+
> Incident mitigation is all about fixing the immediate problem. You can think of mitigation as: if I'm paged at 3 a.m., what do I need to do to get the system healthy such that I can confidently & safely go back to sleep?
129129
>
130130
> Complicated, nuanced, or unclear steps may benefit from the inclusion of screenshots that have been marked up with arrows and/or numbers to indicate action order.
131131
>
@@ -155,13 +155,13 @@ Indicators that health has been restored:
155155
>
156156
> - Help the incident responder take any final, necessary steps before the incident can be resolved.
157157
>
158-
> Incident remediation covers the steps that need to be taken after mitigation, generally during normal working hours. Steps may include but arent limited to:
158+
> Incident remediation covers the steps that need to be taken after mitigation, generally during normal working hours. Steps may include but aren't limited to:
159159
>
160160
> - Reverting any temporary hotfixes made during mitigation
161161
> - Dealing with any corrupted data or statistics
162162
> - Auditing other services, jobs, etc. for similar risks
163163
>
164-
> This doesnt encompass incident follow-ups, which should be created & prioritized as part of the written incident postmortem & debrief meeting.
164+
> This doesn't encompass incident follow-ups, which should be created & prioritized as part of the written incident postmortem & debrief meeting.
165165
166166
Steps to take, in order:
167167

src/blog/defensive-shell-scripting-with-shell-options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ VAR=$(false; echo "this will NOT print")
251251

252252
However, there is a whole list of scenarios where `set -e` isn't inherited. From the [`set` docs](https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html):
253253

254-
> The shell does not exit if the command that fails is part of the command list immediately following a `while` or `until` reserved word, part of the test in an `if` statement, part of any command executed in a `&&` or `||` list except the command following the final `&&` or `||`, any command in a pipeline but the last (subject to the state of the `pipefail` shell option), or if the commands return status is being inverted with `!`.
254+
> The shell does not exit if the command that fails is part of the command list immediately following a `while` or `until` reserved word, part of the test in an `if` statement, part of any command executed in a `&&` or `||` list except the command following the final `&&` or `||`, any command in a pipeline but the last (subject to the state of the `pipefail` shell option), or if the command's return status is being inverted with `!`.
255255
256256
```bash
257257
#!/usr/bin/env bash
@@ -280,7 +280,7 @@ fi
280280
# "any command in a pipeline but the last"
281281
false | echo "this will print" && echo "and so will this"
282282

283-
# "or if the commands return status is being inverted with '!'"
283+
# "or if the command's return status is being inverted with '!'"
284284
! false && echo "this will print"
285285
```
286286

src/blog/discussion-guide-more-than-a-glitch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Ground rules:
7272
## Chapter 8
7373

7474
- The author shared a story of encountering an electronic medical/health record (EMR/EHR) system with restrictive options to describe her race. As machine learning's understanding of unstructured data progresses, do you think we could allow for more freeform answers on medical and legal forms?
75-
- The author gives a call to action to "call bullshit' on claims about future technology and a rosy tech-enabled future," as a response to a [2017 interview](https://www.newyorker.com/magazine/2017/04/03/ai-versus-md) with [Geoffrey Hinton](https://en.wikipedia.org/wiki/Geoffrey_Hinton). What technology is currently over-valued, either monetarily or in terms of hype from the media?
75+
- The author gives a call to action to "'call bullshit' on claims about future technology and a rosy tech-enabled future," as a response to a [2017 interview](https://www.newyorker.com/magazine/2017/04/03/ai-versus-md) with [Geoffrey Hinton](https://en.wikipedia.org/wiki/Geoffrey_Hinton). What technology is currently over-valued, either monetarily or in terms of hype from the media?
7676
- The author asserts that one perpetrator of bias is overvaluing experts' opinions in an area that isn't their expertise, such as technologists making statements about social science. What similar harm do you see technologists making today?
7777

7878
## Chapter 9

src/blog/slis-slos-and-slas-what-are-they.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ SLAs don't make sense for all companies or services, sometimes the consequence o
7272
## More reading
7373

7474
- Google: [SRE fundamentals: SLIs, SLAs and SLOs](https://cloud.google.com/blog/products/gcp/sre-fundamentals-slis-slas-and-slos)
75-
- Atlassian: [SLA vs. SLO vs. SLI: Whats the difference?](https://www.atlassian.com/incident-management/kpis/sla-vs-slo-vs-sli)
75+
- Atlassian: [SLA vs. SLO vs. SLI: What's the difference?](https://www.atlassian.com/incident-management/kpis/sla-vs-slo-vs-sli)
7676
- New Relic: [Best Practices for Setting SLOs and SLIs For Modern, Complex Systems](https://blog.newrelic.com/engineering/best-practices-for-setting-slos-and-slis-for-modern-complex-systems/)

0 commit comments

Comments
 (0)