diff --git a/indiekit/indiekit.config.js b/indiekit/indiekit.config.js index fd08157a..211e05ba 100644 --- a/indiekit/indiekit.config.js +++ b/indiekit/indiekit.config.js @@ -1,14 +1,8 @@ -const env = (await ( - import('dotenv') - .then(dotenv => dotenv.config().parsed) - .catch(() => process.env) -)) || {}; - export default { application: { name: "IndieKit byJP", - mongodbUrl: env.MONGO_URL, - port: env.PORT ?? 8088, + mongodbUrl: process.env.MONGO_URL, + port: process.env.PORT ?? 8808, timeZone: 'Europe/London', }, plugins: [ @@ -29,7 +23,7 @@ export default { "@indiekit/post-type-reply" ], publication: { - me: env.SITE, + me: process.env.SITE, enrichPostData: true, postTypes: { event: { diff --git a/indiekit/packages/indiekit-preset-byjp/index.js b/indiekit/packages/indiekit-preset-byjp/index.js index 967084f8..c1078d13 100644 --- a/indiekit/packages/indiekit-preset-byjp/index.js +++ b/indiekit/packages/indiekit-preset-byjp/index.js @@ -5,7 +5,7 @@ const defaults = { frontMatterFormat: "yaml", }; -export default class HugoPreset { +export default class ByJPPreset { constructor(options = {}) { this.name = "byJP preset"; this.options = { ...defaults, ...options }; diff --git a/indiekit/packages/indiekit-preset-byjp/package-lock.json b/indiekit/packages/indiekit-preset-byjp/package-lock.json new file mode 100644 index 00000000..e6f12a4c --- /dev/null +++ b/indiekit/packages/indiekit-preset-byjp/package-lock.json @@ -0,0 +1,129 @@ +{ + "name": "indiekit-preset-byjp", + "version": "1.0.0-beta.10-jp1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "indiekit-preset-byjp", + "version": "1.0.0-beta.10-jp1", + "license": "MIT", + "dependencies": { + "@iarna/toml": "^2.2.5", + "@indiekit-test/fixtures": "file:../../helpers/fixtures", + "camelcase-keys": "^9.0.0", + "plur": "^5.1.0", + "yaml": "^2.4.0" + }, + "engines": { + "node": ">=20" + } + }, + "../../helpers/fixtures": { + "license": "MIT" + }, + "node_modules/@iarna/toml": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", + "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==" + }, + "node_modules/@indiekit-test/fixtures": { + "resolved": "../../helpers/fixtures", + "link": true + }, + "node_modules/camelcase": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", + "integrity": "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-keys": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-9.1.3.tgz", + "integrity": "sha512-Rircqi9ch8AnZscQcsA1C47NFdaO3wukpmIRzYcDOrmvgt78hM/sj5pZhZNec2NM12uk5vTwRHZ4anGcrC4ZTg==", + "dependencies": { + "camelcase": "^8.0.0", + "map-obj": "5.0.0", + "quick-lru": "^6.1.1", + "type-fest": "^4.3.2" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/irregular-plurals": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz", + "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/map-obj": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-5.0.0.tgz", + "integrity": "sha512-2L3MIgJynYrZ3TYMriLDLWocz15okFakV6J12HXvMXDHui2x/zgChzg1u9mFFGbbGWE+GsLpQByt4POb9Or+uA==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/plur": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz", + "integrity": "sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==", + "dependencies": { + "irregular-plurals": "^3.3.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/quick-lru": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-6.1.2.tgz", + "integrity": "sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-fest": { + "version": "4.26.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.26.1.tgz", + "integrity": "sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yaml": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + } + } +} diff --git a/indiekit/packages/indiekit-preset-byjp/package.json b/indiekit/packages/indiekit-preset-byjp/package.json index c990c514..13b1de49 100644 --- a/indiekit/packages/indiekit-preset-byjp/package.json +++ b/indiekit/packages/indiekit-preset-byjp/package.json @@ -1,18 +1,21 @@ { "name": "indiekit-preset-byjp", - "version": "1.0.0-beta.10", + "version": "1.0.0-beta.10-jp1", "description": "Hugo publication preset for Indiekit", "keywords": [ "indiekit", "indiekit-plugin", "indieweb", "micropub", - "jekyll" + "hugo" ], - "homepage": "https://getindiekit.com", + "scripts": { + "test": "node --test --test-reporter=spec" + }, + "homepage": "https://www.byjp.me", "author": { - "name": "Paul Robert Lloyd", - "url": "https://paulrobertlloyd.com" + "name": "JP Hastings-Edrei", + "url": "https://www.byjp.me" }, "license": "MIT", "engines": { @@ -26,16 +29,17 @@ "index.js" ], "bugs": { - "url": "https://github.com/getindiekit/indiekit/issues" + "url": "https://github.com/by-jp/www.byjp.me/issues" }, "repository": { "type": "git", - "url": "https://github.com/getindiekit/indiekit.git", - "directory": "packages/preset-hugo" + "url": "https://github.com/by-jp/www.byjp.me.git", + "directory": "indiekit/packages/indiekit-preset-byjp" }, "dependencies": { "@iarna/toml": "^2.2.5", "camelcase-keys": "^9.0.0", + "@indiekit-test/fixtures": "file:../../helpers/fixtures", "plur": "^5.1.0", "yaml": "^2.4.0" }, diff --git a/indiekit/packages/indiekit-preset-byjp/test/index.js b/indiekit/packages/indiekit-preset-byjp/test/index.js index 5ea65cb1..90cdf782 100644 --- a/indiekit/packages/indiekit-preset-byjp/test/index.js +++ b/indiekit/packages/indiekit-preset-byjp/test/index.js @@ -1,10 +1,10 @@ import { strict as assert } from "node:assert"; import { describe, it } from "node:test"; import { Indiekit } from "@indiekit/indiekit"; -import HugoPreset from "../index.js"; +import ByJPPreset from "../index.js"; -describe("preset-hugo", async () => { - const hugo = new HugoPreset(); +describe("preset-byjp", async () => { + const hugo = new ByJPPreset(); const indiekit = await Indiekit.initialize({ config: { publication: { @@ -22,12 +22,12 @@ describe("preset-hugo", async () => { hugo.init(bootstrappedConfig); it("Initiates plug-in", async () => { - assert.equal(indiekit.publication.preset.info.name, "Hugo"); + assert.equal(indiekit.publication.preset.info.name, "byJP"); }); it("Gets plug-in info", () => { - assert.equal(hugo.name, "Hugo preset"); - assert.equal(hugo.info.name, "Hugo"); + assert.equal(hugo.name, "byJP preset"); + assert.equal(hugo.info.name, "byJP"); }); it("Gets plug-in installation prompts", () => {