11ty / 11ty/import

Additional front matter from WP

Open
#14 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
125
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I've added the following lines to WordPressApi.js to grab additional info, this helps with permalink construction, etc. Could these be included to the code?

Added 'slug' to author (ln 115)

name: authorData.name,
slug: authorData.slug,
url: authorData.url || authorData.link,
avatarUrl: authorData.avatar_urls[Object.keys(authorData.avatar_urls).pop()],

Added 'id' and 'slug' to metadata (~ln 160)

let metadata = {
	id: rawEntry.id,
	slug: rawEntry.slug,
};

I don't us wordpress.com so not sure if these would also work on HostedWordPressApi.js but they might.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in WordPressApi.js around lines 115 and 160, where the issue identifies the author and metadata objects, and compare HostedWordPressApi.js for equivalent data. Include the requested author slug and metadata id/slug, checking whether the hosted API supports them; done means the added fields are available without breaking either importer.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.