diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-19 14:13:31 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-08-19 14:13:31 -0300 |
commit | ef8acc5d50fa3c23bd7c9d4bb720b7ff78581981 (patch) | |
tree | 6c061e3771cb47619ce9163b559053504a000641 /src/page | |
parent | 37ef3f288fce9bd65a2cd86107239e22f977e78d (diff) |
clean up imports & miscellaneous metastructures across codebase
Diffstat (limited to 'src/page')
-rw-r--r-- | src/page/album.js | 2 | ||||
-rw-r--r-- | src/page/artist-alias.js | 3 | ||||
-rw-r--r-- | src/page/artist.js | 7 | ||||
-rw-r--r-- | src/page/flash.js | 5 | ||||
-rw-r--r-- | src/page/group.js | 11 | ||||
-rw-r--r-- | src/page/homepage.js | 13 | ||||
-rw-r--r-- | src/page/index.js | 9 | ||||
-rw-r--r-- | src/page/listing.js | 16 | ||||
-rw-r--r-- | src/page/news.js | 2 | ||||
-rw-r--r-- | src/page/static.js | 7 |
10 files changed, 12 insertions, 63 deletions
diff --git a/src/page/album.js b/src/page/album.js index 3b2d02d2..69fcabcf 100644 --- a/src/page/album.js +++ b/src/page/album.js @@ -1,5 +1,3 @@ -// Album page specification. - export const description = `per-album info, artwork gallery & commentary pages`; export function targets({wikiData}) { diff --git a/src/page/artist-alias.js b/src/page/artist-alias.js index 23513ce1..1da2af41 100644 --- a/src/page/artist-alias.js +++ b/src/page/artist-alias.js @@ -1,6 +1,3 @@ -// Artist alias redirect pages. -// (Makes old permalinks bring visitors to the up-to-date page.) - export const description = `redirects for aliased artist names`; export function targets({wikiData}) { diff --git a/src/page/artist.js b/src/page/artist.js index c53a4913..27ff8961 100644 --- a/src/page/artist.js +++ b/src/page/artist.js @@ -1,11 +1,8 @@ -// Artist page specification. -// -// NB: See artist-alias.js for artist alias redirect pages. - -import {empty} from '../util/sugar.js'; +import {empty} from '#sugar'; export const description = `per-artist info & artwork gallery pages`; +// NB: See artist-alias.js for artist alias redirect pages. export function targets({wikiData}) { return wikiData.artistData; } diff --git a/src/page/flash.js b/src/page/flash.js index 14e67d8d..b9d27d0f 100644 --- a/src/page/flash.js +++ b/src/page/flash.js @@ -1,7 +1,4 @@ -// Flash page and index specifications. - -import {empty} from '../util/sugar.js'; -import {getFlashLink} from '../util/wiki-data.js'; +import {empty} from '#sugar'; export const description = `flash & game pages`; diff --git a/src/page/group.js b/src/page/group.js index fa6c1c97..b0ed5baf 100644 --- a/src/page/group.js +++ b/src/page/group.js @@ -1,13 +1,4 @@ -// Group page specifications. - -import { - empty, -} from '../util/sugar.js'; - -import { - getTotalDuration, - sortChronologically, -} from '../util/wiki-data.js'; +import {empty} from '#sugar'; export const description = `per-group info & album gallery pages`; diff --git a/src/page/homepage.js b/src/page/homepage.js index 15dcadd1..53ee6e46 100644 --- a/src/page/homepage.js +++ b/src/page/homepage.js @@ -1,16 +1,3 @@ -// Homepage specification. - -import { - bindOpts, - empty, - withEntries, -} from '../util/sugar.js'; - -import { - getNewAdditions, - getNewReleases, -} from '../util/wiki-data.js'; - export const description = `main wiki homepage`; export function pathsTargetless({wikiData}) { diff --git a/src/page/index.js b/src/page/index.js index e62241d9..48e22d2e 100644 --- a/src/page/index.js +++ b/src/page/index.js @@ -1,12 +1,3 @@ -// NB: This is the index for the page/ directory and contains exports for all -// other modules here! It's not the page spec for the homepage - see -// homepage.js for that. -// -// (TODO: The docs here from initial draft were totally outdated. -// We don't have docs for the new setup yet. -// Write those!!) -// - export * as album from './album.js'; export * as artist from './artist.js'; export * as artistAlias from './artist-alias.js'; diff --git a/src/page/listing.js b/src/page/listing.js index 64db413d..bb22c21f 100644 --- a/src/page/listing.js +++ b/src/page/listing.js @@ -1,19 +1,13 @@ -// Listing page specification. -// +export const description = `wiki-wide listing pages & index`; + // The targets here are a bit different than for most pages: rather than data // objects loaded from text files in the wiki data directory, they're hard- -// coded specifications, with various JS functions for processing wiki data -// and turning it into user-readable HTML listings. +// coded specifications, each directly identifying the hard-coded content +// function used to generate that listing. // // Individual listing specs are described in src/listing-spec.js, but are // provided via wikiData like other (normal) data objects. - -import {empty} from '../util/sugar.js'; - -import {getTotalDuration} from '../util/wiki-data.js'; - -export const description = `wiki-wide listing pages & index`; - +// export function targets({wikiData}) { return ( wikiData.listingSpec diff --git a/src/page/news.js b/src/page/news.js index 4928a116..194ffdcb 100644 --- a/src/page/news.js +++ b/src/page/news.js @@ -1,5 +1,3 @@ -// News entry & index page specifications. - export const description = `per-entry news pages & index`; export function condition({wikiData}) { diff --git a/src/page/static.js b/src/page/static.js index 82330dec..c9d806ff 100644 --- a/src/page/static.js +++ b/src/page/static.js @@ -1,9 +1,8 @@ -// Static content page specification. (These are static pages coded into the -// wiki data folder, used for a variety of purposes, e.g. wiki info, -// changelog, and so on.) - export const description = `static wiki-wide content pages specified in data`; +// Static pages are written in the wiki's data folder and contain content and +// basic page metadata. They're used for a variety of purposes, such as an +// "about" page, a changelog, links to places beyond the wiki, and so on. export function targets({wikiData}) { return wikiData.staticPageData; } |