Repository navigation
feat(english/bronstl): add BronsTL - #2775
Gourab0002 wants to merge 1 commit into
Conversation
Uses the site's public Laravel JSON API (/api/books, /api/books/{slug}/chapters) for listing, search, novel details and chapters.
Co-Authored-By: Grok Bot (AI agent)
[Low impact] The change reaches readers who choose the BronsTL source. The PR appears safe to merge, with a non-blocking fix needed for cover URLs during EPUB export. Findings
SummaryAdds a standalone BronsTL plugin and its icon.
Acknowledged by Gourab0002: full-catalogue search may slow down as the site grows; illustration-only chapters depend on retained image markup; the undocumented API may change. These known risks were not reported again. Reviews (1) · Last reviewed commit: "feat(english/bronstl): add BronsTL" · Reviewed by Greptile |
| } | ||
|
|
||
| resolveUrl(path: string): string { | ||
| return this.site + '/' + path.replace(/^\//, ''); |
There was a problem hiding this comment.
Export breaks absolute cover URLs
useEpubExport passes the cover URL to resolveUrl, but this method always adds https://bronstl.com/. For example, a book without a cover uses the absolute defaultCover URL, which becomes https://bronstl.com/https://github.com/.... The exporter then requests the wrong image address. Return absolute URLs unchanged before adding the site to relative paths.
| return this.site + '/' + path.replace(/^\//, ''); | |
| if (/^https?:\/\//i.test(path)) return path; | |
| return this.site + '/' + path.replace(/^\//, ''); |
Closes #2768
What changed
plugins/english/bronstl.ts(v1.0.0) for https://bronstl.compublic/static/src/en/bronstl/icon.png(96x96, rendered from the site's favicon SVG)Why
BronsTL is a Laravel + Vue SPA, not WordPress, so no multisrc template fits. The frontend pulls everything from a public JSON API, and the plugin uses the same endpoints:
popularNovels:/api/books(followsnext_page_urlpagination)searchNovels: the API has no search param, so it filters the full book list by title/author on the client (the catalogue is small)parseNovel:/api/books/{slug}+/api/books/{slug}/chapters(all pages, sorted bychapter_weight)parseChapter:/api/books/{slug}/chapters/{chapterSlug}; relative/storage/...image URLs are made absoluteVerification
npm run check:plugin -- plugins/english/bronstl.ts: all 4 checks pass (popular 4 novels, search 1 result, parseNovel 4 chapters, parseChapter 748 chars)npx tsc --project tsconfig.production.json --noEmit: passnpx eslint plugins/english/bronstl.ts: passnpm run build:full: passRisks
Authored with help from Grok Bot (AI agent).