Skip to content

Commit

Permalink
feat(syndicator-internet-archive): add support for ‘checked’ property
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Nov 16, 2020
1 parent 2212852 commit c5666b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/syndicator-internet-archive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ Name for this syndicator that may appear in a Micropub client’s publishing int
Type: `string`\
*Optional*, defaults to `Internet Archive`

### `checked`

Tell a Micropub client whether this syndicator should be enabled by default.

Type: `boolean`\
*Optional*, defaults to `false`

### `uid`

Value Micropub client will include when publishing a post to indicate that it should be sent to this syndicator.
Expand Down
2 changes: 2 additions & 0 deletions packages/syndicator-internet-archive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {internetArchive} from './lib/internet-archive.js';
export const debug = new Debug('indiekit:syndicator-internet-archive');

const defaults = {
checked: false,
name: 'Internet Archive',
uid: 'https://web.archive.org/'
};
Expand All @@ -18,6 +19,7 @@ export const InternetArchiveSyndicator = class {

get info() {
return {
checked: this.options.checked,
name: this.options.name,
uid: this.options.uid,
service: {
Expand Down
1 change: 1 addition & 0 deletions packages/syndicator-internet-archive/tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ test.beforeEach(t => {

test('Gets info', t => {
const result = new InternetArchiveSyndicator();
t.false(result.info.checked);
t.is(result.info.name, 'Internet Archive');
t.is(result.info.uid, 'https://web.archive.org/');
t.truthy(result.info.service);
Expand Down

0 comments on commit c5666b8

Please sign in to comment.