]> git.wincent.com - cv.git/log
7 months agodocs: drop secondary info too main
Greg Hurrell [Mon, 25 Jul 2022 18:41:13 +0000 (20:41 +0200)] 
docs: drop secondary info too

For same reason as we dropped the location info a couple of commits
back; this level of detail isn't interesting.

7 months agostyle: fix formatting
Greg Hurrell [Mon, 25 Jul 2022 18:39:41 +0000 (20:39 +0200)] 
style: fix formatting

7 months agorefactor: remove location information
Greg Hurrell [Mon, 25 Jul 2022 18:38:44 +0000 (20:38 +0200)] 
refactor: remove location information

In a world of remote work, this doesn't matter like it used to.

9 months agochore: update "Programming languages" and "Tools" sections
Greg Hurrell [Sun, 5 Jun 2022 13:39:48 +0000 (15:39 +0200)] 
chore: update "Programming languages" and "Tools" sections

- Reorder some things based on relevance/recency.
- Drop ReasonML, add Go; I don't have any significant projects released
  in the former, and I should probably mention the latter because GitHub
  itself uses it and I have a couple of projects in it.

11 months agochore: update packages
Greg Hurrell [Sat, 26 Mar 2022 19:27:26 +0000 (20:27 +0100)] 
chore: update packages

Updates everything reported as out-of-date with `yarn outdated`.

Done with:

    yarn add --dev prettier@latest --exact
    yarn add --dev ajv@latest --exact

11 months agorefactor: get rid of explicit resolutions
Greg Hurrell [Sat, 26 Mar 2022 19:25:59 +0000 (20:25 +0100)] 
refactor: get rid of explicit resolutions

Blow away lockfile, regenerate, confirm that `yarn audit` is still

11 months agochore: bump minimist from 1.2.5 to 1.2.6
Greg Hurrell [Sat, 26 Mar 2022 19:22:10 +0000 (20:22 +0100)] 
chore: bump minimist from 1.2.5 to 1.2.6



I don't think this one matters for my scenario, but I like to keep `yarn
audit` clean if I can.

14 months agochore: update prettier 2.5.0 → 2.5.1
Greg Hurrell [Sat, 8 Jan 2022 23:24:04 +0000 (00:24 +0100)] 
chore: update prettier 2.5.0 → 2.5.1

14 months agodocs: update "Programming Languages" and "Tools"
Greg Hurrell [Sat, 8 Jan 2022 23:22:08 +0000 (00:22 +0100)] 
docs: update "Programming Languages" and "Tools"

As these were both somewhat stale.

15 months agorefactor: apply one more tweak to silence ajv
Greg Hurrell [Thu, 25 Nov 2021 18:51:33 +0000 (19:51 +0100)] 
refactor: apply one more tweak to silence ajv

Drop the problematic "date" format which only leads ajv to complain
about the input document not conforming, if we follow it's advice to set
the type to "number,string".

Now we have only one remaining warning:

    strict mode: missing type "number,string" for keyword "format" at "#/properties/version" (strictTypes)

15 months agochore: fix most of the new strict mode warnings produced by ajv
Greg Hurrell [Thu, 25 Nov 2021 18:31:30 +0000 (19:31 +0100)] 
chore: fix most of the new strict mode warnings produced by ajv


    strict mode: missing type "object" for keyword "properties" at "#" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#/properties/version" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#/properties/identity/properties/email" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#/properties/presence/properties/facebook" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#/properties/presence/properties/github" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#/properties/presence/properties/keybase" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#/properties/presence/properties/linkedin" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#/properties/presence/properties/stackoverflow" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#/properties/presence/properties/twitter" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#/properties/presence/properties/website" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#dateish/anyOf/0" (strictTypes)
    strict mode: missing type "string" for keyword "pattern" at "#dateish/anyOf/1" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#dateish/anyOf/0" (strictTypes)
    strict mode: missing type "string" for keyword "pattern" at "#dateish/anyOf/1" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#dateish/anyOf/0" (strictTypes)
    strict mode: missing type "string" for keyword "pattern" at "#dateish/anyOf/1" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#/properties/publications/properties/items/items/properties/link" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#dateish/anyOf/0" (strictTypes)
    strict mode: missing type "string" for keyword "pattern" at "#dateish/anyOf/1" (strictTypes)
    strict mode: missing type "object" for keyword "required" at "#" (strictTypes)
    strict mode: missing type "object" for keyword "additionalProperties" at "#" (strictTypes)
    strict mode: missing type "object" for keyword "properties" at "#" (strictTypes)


    strict mode: missing type "number,string" for keyword "format" at "#/properties/version" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#dateish/anyOf/0" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#dateish/anyOf/0" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#dateish/anyOf/0" (strictTypes)
    strict mode: missing type "number,string" for keyword "format" at "#dateish/anyOf/0" (strictTypes)

I'm not going to fix the last ones because doing so would definitely
make my life worse. In my YAML I have date-ish items like:

    version: 2021-05-07
    from: 2021-06
    to: 2011

ajv says these aren't strings but numbers (and fair enough for the last
one, but the first two look like they could be strings). So, I can say
that version must always be `"type": "string"` and that works fine if I
enclose it in quotes in the YAML file (although it seems needlessly
ugly), but otherwise causes a runtime error with:

    Input YAML does not conform to the schema

Further trouble starts if I say the date-ish things should be numbers or
strings; then I get a litany of warnings that I can't be bothered sorting
through right now:

    strict mode: use allowUnionTypes to allow union type keyword at "#dateish/anyOf/0" (strictTypes)
    ... repeated once for each place that I use date-ish ...

And I certainly don't want to go sprinkling quotes all through the YAML
to force them all to be strings (for reference, Ruby's YAML parses
things like `2021-05-07` as a string automatically, and my JS is already
calling `toString()` on these things).

So, I'm just going to tolerate the noise. I will turn off strict mode if
the complaining annoys me. I usually don't mind strictness (I am using
JSON Schema, after all), but here it just seems uselessly bothersome. Oh

15 months agofix: make JSON schema validation work again
Greg Hurrell [Thu, 25 Nov 2021 18:09:21 +0000 (19:09 +0100)] 
fix: make JSON schema validation work again

OK, so I lied a couple of commits ago (97ecf43) when I said I didn't
think I would be affected by breaking changes in the ajv package.

According to the docs here:


you now need to install a separate package.

> From version 7 Ajv does not include formats defined by JSON Schema
> specification - these and several other formats are provided by
> ajv-formats plugin.

Another glorious triumph of modularization! My life is better for this

With this change, all my `"format": "date"` and `"format": "email"`
(etc) schema elements work again, and we don't see this error during

    Error: unknown format "date" ignored in schema at path "#/properties/version"

Still spewing out a bunch of warnings because "strict mode" is on by
default now, but the build still works, and I can deal with the errors
in a separate commit.

15 months agochore: update pdfkit 0.11.0 → 0.13.0
Greg Hurrell [Thu, 25 Nov 2021 18:01:56 +0000 (19:01 +0100)] 
chore: update pdfkit 0.11.0 → 0.13.0

As far as I can tell, no breaking changes:


15 months agochore: update ajv 6.12.2 → 8.8.2
Greg Hurrell [Thu, 25 Nov 2021 17:58:49 +0000 (18:58 +0100)] 
chore: update ajv 6.12.2 → 8.8.2

As far as I can tell from the releases listing:


No breaking changes that would affect me, paying specific attention to
the v7.0.0 and v8.0.0 releases:

- https://github.com/ajv-validator/ajv/releases/tag/v8.0.0
- https://github.com/ajv-validator/ajv/releases/tag/v7.0.0

15 months agochore: update js-yaml 3.13.1 → 4.1.0
Greg Hurrell [Thu, 25 Nov 2021 17:55:49 +0000 (18:55 +0100)] 
chore: update js-yaml 3.13.1 → 4.1.0

Following the migration guide:


15 months agochore: update Prettier 2.0.5 → 2.5.0
Greg Hurrell [Thu, 25 Nov 2021 17:46:15 +0000 (18:46 +0100)] 
chore: update Prettier 2.0.5 → 2.5.0

Note that we now have access to a version of Prettier that allows us to
turn off the unwanted formatting:


This is necessary to stop Prettier from mangling template literals, as
described in a24373d5f05419c3.

15 months agochore: pin path-parse to 1.0.7
Greg Hurrell [Thu, 25 Nov 2021 17:42:06 +0000 (18:42 +0100)] 
chore: pin path-parse to 1.0.7

To deal with this output from `yarn audit`:

│ moderate      │ Regular Expression Denial of Service in path-parse           │
│ Package       │ path-parse                                                   │
│ Patched in    │ >=1.0.7                                                      │
│ Dependency of │ pdfkit                                                       │
│ Path          │ pdfkit > fontkit > brfs > resolve > path-parse               │
│ More info     │ https://www.npmjs.com/advisories/1005072                     │
1 vulnerabilities found - Packages audited: 107
Severity: 1 Moderate


21 months agodocs: update URLs
Greg Hurrell [Sun, 13 Jun 2021 07:57:47 +0000 (09:57 +0200)] 
docs: update URLs

These won't work for a while yet (pending DNS changes).

21 months agofeat: teach scripts/publish about GitHub pages custom domains
Greg Hurrell [Sun, 13 Jun 2021 07:51:01 +0000 (09:51 +0200)] 
feat: teach scripts/publish about GitHub pages custom domains

21 months agodocs: use less generic job title
Greg Hurrell [Thu, 10 Jun 2021 20:29:51 +0000 (22:29 +0200)] 
docs: use less generic job title

Matching what I have on LinkedIn.

22 months agodocs: leaving Liferay, joining GitHub
Greg Hurrell [Thu, 6 May 2021 20:55:14 +0000 (22:55 +0200)] 
docs: leaving Liferay, joining GitHub

2 years agodocs(README): use yarn, not npm
Greg Hurrell [Mon, 7 Sep 2020 20:57:14 +0000 (22:57 +0200)] 
docs(README): use yarn, not npm

2 years agodocs: add VimConf 2020 to list of publications
Greg Hurrell [Mon, 7 Sep 2020 20:55:42 +0000 (22:55 +0200)] 
docs: add VimConf 2020 to list of publications

2 years agochore: update residency details
Greg Hurrell [Wed, 5 Aug 2020 22:10:19 +0000 (00:10 +0200)] 
chore: update residency details

2 years agochore: make address more precise
Greg Hurrell [Wed, 5 Aug 2020 22:09:30 +0000 (00:09 +0200)] 
chore: make address more precise

D -> DR

D could be part of a sequence (A, B, C, D etc) but DR is obviously

2 years agostyle: format
Greg Hurrell [Sun, 17 May 2020 20:17:35 +0000 (22:17 +0200)] 
style: format

Note: I am not accepting all the changes the new version of Prettier
because it wants to mess with my template literals:


and a version with `--embedded-language-formatting` doesn't seem to have
been released yet:


Example of an unwanted change:

@@ -187,9 +193,9 @@
         .replace(/^\s+/gm, '') + '\n</header>\n';

   heading(text, _options) {
-    this._content += html`<h1>${text.toUpperCase()}</h1>\n`;
+    this._content += html`<h1>${text.toUpperCase()}</h1> `;

   subHeading(text) {

2 years agochore: bump version
Greg Hurrell [Sun, 17 May 2020 20:03:48 +0000 (22:03 +0200)] 
chore: bump version

2 years agorefactor: attempt fix for unstable PDF identity
Greg Hurrell [Sun, 17 May 2020 19:52:38 +0000 (21:52 +0200)] 
refactor: attempt fix for unstable PDF identity

Seems to be stable (two consecutive runs):

  sha1sum public/*.pdf
  ede8b91928c86d63865db35731df1878da5499ae  public/cv-full.en.pdf
  6b4f4d3a236cfe6d01f15a25b28ed03867b3061d  public/cv-full.es.pdf
  f4c95b8d6cd231fd2e7a097f1330fd0b66bc4aa8  public/cv.en.pdf
  6008f58ddcf608a34689d5d9f4e9c1ce5e64a1b8  public/cv.es.pdf

  sha1sum public/*.pdf
  ede8b91928c86d63865db35731df1878da5499ae  public/cv-full.en.pdf
  6b4f4d3a236cfe6d01f15a25b28ed03867b3061d  public/cv-full.es.pdf
  f4c95b8d6cd231fd2e7a097f1330fd0b66bc4aa8  public/cv.en.pdf
  6008f58ddcf608a34689d5d9f4e9c1ce5e64a1b8  public/cv.es.pdf

2 years agorefactor: remove unnecessary hack
Greg Hurrell [Sun, 17 May 2020 19:43:07 +0000 (21:43 +0200)] 
refactor: remove unnecessary hack

As it is apparently not needed any more:


Still need to test this though, because note that I am setting the
`ModDate` after construction, but I may need to do it in the

2 years agochore: pin minimist to 1.2.5
Greg Hurrell [Sun, 17 May 2020 19:37:59 +0000 (21:37 +0200)] 
chore: pin minimist to 1.2.5

To deal with this output from `yarn audit`:

yarn audit v1.22.4
│ low           │ Prototype Pollution                                          │
│ Package       │ minimist                                                     │
│ Patched in    │ >=0.2.1 <1.0.0 || >=1.2.3                                    │
│ Dependency of │ pdfkit                                                       │
│ Path          │ pdfkit > fontkit > brfs > quote-stream > minimist            │
│ More info     │ https://www.npmjs.com/advisories/1179                        │
│ low           │ Prototype Pollution                                          │
│ Package       │ minimist                                                     │
│ Patched in    │ >=0.2.1 <1.0.0 || >=1.2.3                                    │
│ Dependency of │ pdfkit                                                       │
│ Path          │ pdfkit > linebreak > brfs > quote-stream > minimist          │
│ More info     │ https://www.npmjs.com/advisories/1179                        │
2 vulnerabilities found - Packages audited: 107
Severity: 2 Low
✨  Done in 0.50s.

2 years agochore: deduplicate yarn.lock
Greg Hurrell [Sun, 17 May 2020 19:34:49 +0000 (21:34 +0200)] 
chore: deduplicate yarn.lock

With `npx yarn-deduplicate yarn.lock`.

2 years agochore: update dependencies
Greg Hurrell [Sun, 17 May 2020 19:34:21 +0000 (21:34 +0200)] 
chore: update dependencies

2 years agoAdd link to "Scalable Frontend Development" talk
Greg Hurrell [Sun, 17 May 2020 19:28:57 +0000 (21:28 +0200)] 
Add link to "Scalable Frontend Development" talk

3 years agoUse <link> tags instead of CSS imports
Greg Hurrell [Tue, 30 Apr 2019 21:37:31 +0000 (23:37 +0200)] 
Use <link> tags instead of CSS imports

Because for some reason Chrome is 404-ing on one of the imports (weird,
Firefox does not, and Chrome makes a second request that is HTTP OK).

3 years agoMake fonts a wee bit smaller to fit on one page
Greg Hurrell [Tue, 30 Apr 2019 21:22:32 +0000 (23:22 +0200)] 
Make fonts a wee bit smaller to fit on one page

3 years agoFormat more things with Prettier
Greg Hurrell [Tue, 30 Apr 2019 21:02:26 +0000 (23:02 +0200)] 
Format more things with Prettier

3 years agoLocalize "skills" items
Greg Hurrell [Tue, 30 Apr 2019 20:56:50 +0000 (22:56 +0200)] 
Localize "skills" items

Pleasantly surprised by how easy this it: "anyOf" in the JSON schema
allows us to have uniform or localized items, and our `localize()`
helper transforms the data structure for us so that we only have to
worry about strings.

4 years agoAdd new position at Liferay
Greg Hurrell [Tue, 15 Jan 2019 19:35:02 +0000 (20:35 +0100)] 
Add new position at Liferay

4 years agoAdd legal status to profile section
Greg Hurrell [Mon, 3 Dec 2018 15:20:58 +0000 (16:20 +0100)] 
Add legal status to profile section

4 years agoAdd AWS to list of tools
Greg Hurrell [Tue, 27 Nov 2018 21:53:38 +0000 (22:53 +0100)] 
Add AWS to list of tools

4 years agoConsistently denote ignored arguments with _foo form
Greg Hurrell [Mon, 15 Oct 2018 19:55:02 +0000 (21:55 +0200)] 
Consistently denote ignored arguments with _foo form

4 years agoRemove unnecessary escape character
Greg Hurrell [Mon, 15 Oct 2018 19:52:56 +0000 (21:52 +0200)] 
Remove unnecessary escape character

4 years agoRemove unused seed() function
Greg Hurrell [Mon, 15 Oct 2018 19:51:59 +0000 (21:51 +0200)] 
Remove unused seed() function

4 years agoCorrect a code comment
Greg Hurrell [Sun, 14 Oct 2018 22:39:12 +0000 (00:39 +0200)] 
Correct a code comment

4 years agoMove progress printing down into main build loop
Greg Hurrell [Sun, 14 Oct 2018 19:39:12 +0000 (21:39 +0200)] 
Move progress printing down into main build loop

This keeps the printing calls closer to each other, and makes the
`build()` function have a single purpose (writing built output) instead
of two (writing built output and printing progress).

4 years agoShorten main build list
Greg Hurrell [Sun, 14 Oct 2018 19:35:50 +0000 (21:35 +0200)] 
Shorten main build list

Was very procedural. As a bonus, we're not redundantly copying the
English version over to the index twice.

4 years agoRemove an unnecessary toString() call
Greg Hurrell [Sat, 13 Oct 2018 23:10:48 +0000 (01:10 +0200)] 
Remove an unnecessary toString() call

Unnecessary since e729896.

4 years agoRestore "Skills" section
Greg Hurrell [Sat, 13 Oct 2018 22:17:06 +0000 (00:17 +0200)] 
Restore "Skills" section

Temporarily gone since 9af5b29.

4 years agoReplace an inline comment with a docblock
Greg Hurrell [Sat, 13 Oct 2018 22:09:48 +0000 (00:09 +0200)] 
Replace an inline comment with a docblock

4 years agoMake object returned by `raw()` more String-like
Greg Hurrell [Sat, 13 Oct 2018 22:05:46 +0000 (00:05 +0200)] 
Make object returned by `raw()` more String-like

The object returned by the old version was somewhat String-like:

const s1 = raw('foo');
const s2 = `string: ${s1}`; // "string: foo"

But not very:

typeof s1; // object
s1 instanceof String; // false

This new version is a bit more String-like:

typeof s1; // object
s1 instanceof String; // true

4 years agoAdd `html()` tagged template literal function
Greg Hurrell [Sat, 13 Oct 2018 22:03:44 +0000 (00:03 +0200)] 
Add `html()` tagged template literal function

Does the same kind of escaping as our `markdown()` function does, except
it additionally provides an escape hatch via `raw()`.

4 years agoGet rid of a ternary for readability
Greg Hurrell [Sat, 13 Oct 2018 22:01:28 +0000 (00:01 +0200)] 
Get rid of a ternary for readability

4 years agoFix comment syntax
Greg Hurrell [Sat, 13 Oct 2018 22:00:51 +0000 (00:00 +0200)] 
Fix comment syntax

Use double-leading asterisks for "docblock"-style comments.

4 years agoUse tagged template literal function for escaping Markdown interpolation
Greg Hurrell [Sat, 13 Oct 2018 21:33:29 +0000 (23:33 +0200)] 
Use tagged template literal function for escaping Markdown interpolation

Gets rid of repeated calls to `_escape` when generating Markdown.

4 years agoUse "items" more uniformly in YAML source
Greg Hurrell [Sat, 13 Oct 2018 21:19:57 +0000 (23:19 +0200)] 
Use "items" more uniformly in YAML source

4 years agoDRY up handling of presence URLs and links a little bit
Greg Hurrell [Sat, 13 Oct 2018 21:15:56 +0000 (23:15 +0200)] 
DRY up handling of presence URLs and links a little bit

4 years agoAdd internet profile and site links
Greg Hurrell [Sat, 13 Oct 2018 19:53:21 +0000 (21:53 +0200)] 
Add internet profile and site links

Rough cut because I have to run off before DRY-ing and tidying this up.
Will come back to it later and polish it up.

Closes: https://github.com/wincent/cv/issues/5
4 years agoFix mangled display in "Awards" section
Greg Hurrell [Sat, 13 Oct 2018 15:31:31 +0000 (17:31 +0200)] 
Fix mangled display in "Awards" section

The extra positional argument to the `forEach` function evidently was
changing the behavior of the underlying  `text` function when it got
passed through as options.

4 years agoAdd "Publications" section to extended output
Greg Hurrell [Sat, 13 Oct 2018 15:23:54 +0000 (17:23 +0200)] 
Add "Publications" section to extended output

Closes: https://github.com/wincent/cv/issues/4
4 years agoREADME: Add links to expanded format
Greg Hurrell [Sat, 13 Oct 2018 15:02:42 +0000 (17:02 +0200)] 
README: Add links to expanded format

Closes: https://github.com/wincent/cv/issues/16
4 years agoAllow empty sections
Greg Hurrell [Sat, 13 Oct 2018 09:57:21 +0000 (11:57 +0200)] 
Allow empty sections

4 years agoPrefer page breaks before headings
Greg Hurrell [Sat, 13 Oct 2018 08:47:59 +0000 (10:47 +0200)] 
Prefer page breaks before headings

Not sure if this is going to do the right thing in all edge cases, but a
quick test shows it works with the current input YAML.

4 years agoRemove manual "collapse" hack
Greg Hurrell [Sat, 13 Oct 2018 08:19:46 +0000 (10:19 +0200)] 
Remove manual "collapse" hack

In writing the code to rollback unwanted pagebreaks (which involves
keeping a journal of all "commands" issued to build up the document), I
noticed I could get rid of the ugly manual "collapse" hack.

Whenever we emit a subheading, we can now automatically slurp up
preceding whitespace if the previous item was a heading.

The `args` property in the command journal isn't used in this
commit, but it will be in the future, when we use it to replay commands
after "rewinding" the output and inserting a page break in a better

4 years agoMark "private" members in PDF class as private
Greg Hurrell [Fri, 12 Oct 2018 22:10:29 +0000 (00:10 +0200)] 
Mark "private" members in PDF class as private

4 years agoAdd "full" output variants
Greg Hurrell [Fri, 12 Oct 2018 21:35:08 +0000 (23:35 +0200)] 
Add "full" output variants

This one includes, for now, a new "Awards" section. I'm not going to
link to this from anywhere because I don't think the section is very
useful, and it also pushes the PDF version onto two pages (in the
"private" variants, which have a taller header, and also in the Spanhish
"public" variant), which I'll need to address.

4 years agoPrint progress
Greg Hurrell [Fri, 12 Oct 2018 21:26:49 +0000 (23:26 +0200)] 
Print progress

Will be useful because we're going to grow the number of output
formats shortly.

4 years agoRejig award word ordering
Greg Hurrell [Thu, 11 Oct 2018 19:17:27 +0000 (21:17 +0200)] 
Rejig award word ordering

4 years agoAdd some awards I had forgotten about
Greg Hurrell [Thu, 11 Oct 2018 19:16:04 +0000 (21:16 +0200)] 
Add some awards I had forgotten about

Note: awards don't show up in the output yet, or perhaps ever.

4 years agoAdd missing </head> tag to HTML output
Greg Hurrell [Thu, 4 Oct 2018 13:11:00 +0000 (15:11 +0200)] 
Add missing </head> tag to HTML output

4 years agoAdd favicon
Greg Hurrell [Thu, 4 Oct 2018 13:10:45 +0000 (15:10 +0200)] 
Add favicon

Closes: https://github.com/wincent/cv/issues/15
4 years agoRemove stray word from Spanish translation
Greg Hurrell [Thu, 4 Oct 2018 12:15:27 +0000 (14:15 +0200)] 
Remove stray word from Spanish translation

4 years agopublish: use short commit hashes in output
Greg Hurrell [Tue, 2 Oct 2018 20:29:31 +0000 (22:29 +0200)] 
publish: use short commit hashes in output

Just makes it a little easier on the eye.

4 years agopublish: warn if publishing an empty commit
Greg Hurrell [Tue, 2 Oct 2018 20:23:39 +0000 (22:23 +0200)] 
publish: warn if publishing an empty commit

As noted in the parent commit, there *may* be reasons why you would want
to do this, but it is more likely a mistake, so print a big red warning
out along with instructions on how to undo the commit if desired.

4 years agopublish: properly show empty commits
Greg Hurrell [Tue, 2 Oct 2018 20:08:55 +0000 (22:08 +0200)] 
publish: properly show empty commits

When you create an empty commit on the gh-pages branch (for example, by
running `npm run publish` twice in a row, or by forgetting to run `npm
run build`), `git whatchanged` misbehaves (maybe, depending on your
point of view) compared to `git log`: the former skips the empty commit
and shows the parent commit instead, but `git log` will dutifully show
the empty commit.

Swap out `git whatchanged` for `git log --raw`, which has basically the
same output but doesn't skip empty commits. It's important that we show
empty commits because to give the user a chance to see and correct their
mistake (if it is a mistake; I can imagine you might want to push an
empty gh-pages commit to force a rebuild on the GitHub side). Ideally,
we would explode loudly for empty commits (the user could always just do
`git commit --allow-empty` if they really wanted), but I don't think
there is a built-in way to do that with `git-commit-tree`; to add such a
check I think I'd need to construct an explicit `git diff --quiet` test,
but I am not sure I can be bothered with that for now.

(Discovered this issue while testing changes to the `publish` script.)

4 years agogh-pages: note source commit hash probably* used to build
Greg Hurrell [Tue, 2 Oct 2018 19:55:44 +0000 (21:55 +0200)] 
gh-pages: note source commit hash probably* used to build

Only "probably" used, because there are no guarantees that the person
who invokes `npm run publish` didn't change the work-tree and checked
out revision after running `npm run build`. Still, the odds are pretty

Will output a message like:

    From cb70cc5-dirty.

if you have been naughty and are publishing without committing first.
Otherwise it will just output a hash (because there are no tags in this
repo for `git describe` to find).

4 years agoFinish Spanish translation
Greg Hurrell [Tue, 2 Oct 2018 12:15:34 +0000 (14:15 +0200)] 
Finish Spanish translation

4 years agoMake sure languages from cv.yml have precedence over pii.yml, if any
Greg Hurrell [Tue, 18 Sep 2018 21:38:58 +0000 (23:38 +0200)] 
Make sure languages from cv.yml have precedence over pii.yml, if any

Want the former to be the definitive source.

4 years agoValidate pii.yml against schema as well
Greg Hurrell [Tue, 18 Sep 2018 19:42:07 +0000 (21:42 +0200)] 
Validate pii.yml against schema as well

Note one bit of trickiness here: the file doesn't define "languages"
like the cv.yml file does; we copy that over at runtime, and we rely on
it in the schema to ensure that we are validating against the same set
of languages in both files.

4 years agoPrepare to validate "PII" too
Greg Hurrell [Tue, 18 Sep 2018 19:26:00 +0000 (21:26 +0200)] 
Prepare to validate "PII" too

Extract validation into a separate function (with some sneaky
shadowing... sorry!) and move the existing schema down under a "cv"

4 years agoValidate input file using JSON Schema
Greg Hurrell [Mon, 17 Sep 2018 22:59:03 +0000 (00:59 +0200)] 
Validate input file using JSON Schema

Fulfilling the promise of pointless overengineering...

Closes: https://github.com/wincent/cv/issues/8


For details on the keywords used in the schema definition.

4 years agoPrettier
Greg Hurrell [Mon, 17 Sep 2018 19:00:25 +0000 (21:00 +0200)] 

4 years agoSome initial responsive design tweaks
Greg Hurrell [Mon, 17 Sep 2018 18:56:49 +0000 (20:56 +0200)] 
Some initial responsive design tweaks

4 years agoMake sure PDFs don't change unless input changes
Greg Hurrell [Mon, 17 Sep 2018 18:37:00 +0000 (20:37 +0200)] 
Make sure PDFs don't change unless input changes

Works around: https://github.com/foliojs/pdfkit/issues/868

As described in that issue, if you generate the same PDF twice in a row
you'll get two different docs, and in my use case here (writing PDFs to
the "gh-pages" branch) that can produce noisy diffs.

The cause of the randomness can be found here:


Work around it by (gasp) replacing `Math.random` with something

Now, we'll only get a different output when I change something that
affects the output. This means that to bump the "release version" of the
PDF (ie. the `ModDate`), I have to update the `version` property in the
YAML. I'm ok with that.

4 years agoLock CreationDate, let ModDate float
Greg Hurrell [Mon, 17 Sep 2018 16:41:09 +0000 (18:41 +0200)] 
Lock CreationDate, let ModDate float

Let the CreationDate always be the date I produced the first version,
and the ModDate be the date I made each build.

4 years agodoc: document `npm run publish` script
Greg Hurrell [Mon, 17 Sep 2018 16:28:46 +0000 (18:28 +0200)] 
doc: document `npm run publish` script

4 years agoRemove debugging comment
Greg Hurrell [Mon, 17 Sep 2018 16:24:22 +0000 (18:24 +0200)] 
Remove debugging comment

4 years agoAdd a default index page to gh-pages branch
Greg Hurrell [Mon, 17 Sep 2018 16:19:34 +0000 (18:19 +0200)] 
Add a default index page to gh-pages branch

Closes: https://github.com/wincent/cv/issues/10
4 years agoWork around UTF-8 encoding issues in Markdown on gh-pages
Greg Hurrell [Mon, 17 Sep 2018 16:14:21 +0000 (18:14 +0200)] 
Work around UTF-8 encoding issues in Markdown on gh-pages

Closes: https://github.com/wincent/cv/issues/11
4 years agodoc: Add links to built output
Greg Hurrell [Mon, 17 Sep 2018 16:03:37 +0000 (18:03 +0200)] 
doc: Add links to built output

Closes: https://github.com/wincent/cv/issues/7
4 years agoAdd npm script for running publish command
Greg Hurrell [Mon, 17 Sep 2018 15:58:32 +0000 (17:58 +0200)] 
Add npm script for running publish command

4 years agoAdd script for publishing to gh-pages branch
Greg Hurrell [Mon, 17 Sep 2018 15:57:50 +0000 (17:57 +0200)] 
Add script for publishing to gh-pages branch

4 years agoStyle HTML output to resemble PDF output
Greg Hurrell [Mon, 17 Sep 2018 11:27:54 +0000 (13:27 +0200)] 
Style HTML output to resemble PDF output

4 years agoMake header() method non-destructive in all renderers
Greg Hurrell [Mon, 17 Sep 2018 11:15:02 +0000 (13:15 +0200)] 
Make header() method non-destructive in all renderers

Calling it more than once, or calling it in the HTML renderer after
emitting something else, would still be a bad idea, but the mistake
would be easily noticed in the output.

This brings the remaining renderers into line with the behavior of the
PDF renderer.

4 years agoMake date() a top-level function to avoid redefining it multiple times
Greg Hurrell [Mon, 17 Sep 2018 11:13:08 +0000 (13:13 +0200)] 
Make date() a top-level function to avoid redefining it multiple times

4 years agoDrop capitalize() function
Greg Hurrell [Mon, 17 Sep 2018 11:11:47 +0000 (13:11 +0200)] 
Drop capitalize() function

Don't need it any more, as we are pulling in the localized text from the
YAML file instead.

4 years agoDRY up a ternary
Greg Hurrell [Mon, 17 Sep 2018 11:10:26 +0000 (13:10 +0200)] 
DRY up a ternary

4 years agoUpdate README to note current output variants
Greg Hurrell [Mon, 17 Sep 2018 00:16:59 +0000 (02:16 +0200)] 
Update README to note current output variants

4 years agoFix unwanted visible commas in HTML output
Greg Hurrell [Mon, 17 Sep 2018 00:15:03 +0000 (02:15 +0200)] 
Fix unwanted visible commas in HTML output

4 years agoSet lang attribute on html element
Greg Hurrell [Mon, 17 Sep 2018 00:13:44 +0000 (02:13 +0200)] 
Set lang attribute on html element

4 years agoAdd HTML renderer
Greg Hurrell [Mon, 17 Sep 2018 00:11:12 +0000 (02:11 +0200)] 
Add HTML renderer

Need to add some styles, but this is a start.