…overrides
Illusia's story page uses custom markup, so the standalone plugin failed
parseNovel (missing novel name). Migrate it to the fictioneer generator with
new optional per-source options (selectors.*, trimTrailingSlash) that keep the
plugin id and the stored novel/chapter paths identical to the old plugin.
Template improvements for all fictioneer sources: cover from data-src when
present, status derived from the story__status class, summary with paragraph
breaks and without embedded story cards, showLatestNovels via the search
endpoint, script/style/iframe stripped from chapter content, chapterNumber
parsed from anchored chapter names. Version base bumped to 1.2.x.
Checklist
type(scope): description(e.g.feat(<generator>): add new source)Summary
plugins/portuguese/illusia.ts(standalone) was failingparseNovelwith "Missing novel name": illusia.com.br runs Fictioneer 5.35.3 but customizes the story page and the browse cards (h1.illusia-single-story__title,li.illusia-card, etc.), so the standardh1.story__identity-titleselector never matched. The app hid the bug because the novel name comes from the list, but author, cover, summary and status were never populated.This PR migrates Illusia to the
fictioneergenerator, as discussed with Traitor on Discord (#plugins). No breaking changes: the plugin id staysillusiaand the stored paths keep the exact old format (story/<slug>andstory/<slug>/<chapter>, no trailing slash), verified against all 1,459 novel/chapter links in real site responses. Existing libraries and reading progress carry over.Generator changes (
plugins/multisrc/fictioneer/template.ts)New optional per-source options, all defaulting to the strings the template already used, so the seven existing sources are unaffected:
trimTrailingSlash– store paths without the trailing slashselectors.{browseCard, searchCard, cardTitle, cardCover, novelTitle, novelAuthor, novelCover, novelSummary}– override the default Fictioneer markupImprovements that apply to every fictioneer source:
data-srcwhen present (lazy-loaded images), falling back tosrc/hrefspan.story__statusclass (_ongoing,_completed,_oneshot,_hiatus,_canceled) instead of English text, so localized sites work; text comparison kept as fallback (and now also matches Fictioneer's actualCanceledspelling)section.small-card-blockstory cardsshowLatestNovelssupported via the standard?s=&post_type=fcn_story&orderby=modifiedsearch endpointscript/style/iframestripped from chapter contentchapterNumberparsed from names that start withChapter N/Capítulo N/Ch. N<i>elementresolveUrlimplemented; without it the app builtsite + pathwith no separator, so "open in browser" producedhttps://illusia.com.brstory/...for every source whose site has no trailing slashVersion base bumped from
1.1.xto1.2.xfor all fictioneer sources since generated code changed.Files
plugins/multisrc/fictioneer/template.ts,sources.json– as above; Illusia entry addedplugins/portuguese/illusia.ts– removedpublic/static/multisrc/fictioneer/illusia/icon.pngTesting
npm run check:pluginon the generatedIllusia[fictioneer].ts: 4/4 PASS (was 2/4 on the standalone). NovelLib: 4/4 PASS before and after. DaoistQuest, PenguinSquad, CherryMistCafe (FAIL) and Lily, Prizma, DearestRosalie (INCONCLUSIVE, site unreachable/403) give the same result before and after the change.<script>s, summary no longer starts with ad JS).npm run lint/format:checkare clean on the changed files (the repo-wide runs report pre-existing issues that are identical on a cleanmaster).Notes: the old standalone plugin sent a custom User-Agent; the site responds fine without it. The standalone's browse used the search endpoint ordered by comment count; the generator uses
/historias/for browse and the search endpoint for "latest".Written with AI assistance (Claude Code, reviewed with Codex); every selector was checked against real site responses and the result was tested in the app by me.