Skip to content

Conversation

@ilonachan
Copy link

& improvements to relibrary & lightnovelwp template

- can now determine author (hopefully most of the time)
- can get chapter release dates
- (imo) better detection of content boundaries
- footnotes & author's comment added
- custom CSS
- generator now supports custom runtime JS and CSS, property names changed to clarify the difference
- fixed some type errors
- attempt to make "hide locked" option work
// edge cases like this.
content.find('p:has(>code)+code:has(+p:has(>code))').each((_i, el) => {
if (
el.attribs.style.match(/(.*;)?font-family: 'Merriweather', serif;.*/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/(.*?;)?font-family: 'Merriweather', serif.*/

?.join('\n') || ''
);
const content = $('div.epcontent');
// content.find('h1:first-child').remove();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably remove those

Copy link
Author

@ilonachan ilonachan Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I don't is because I don't actually know if this is always the title. Maybe it's up to the author to put an h1 there manually, and it could be literally any text then, even story-relevant. Unless someone can confirm that this title is a general feature of all pages based on lightnovelwp, I'd rather move this to the customTransformJs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked another lightnovelwp source in the meantime, and while the title does seem to be autogenerated on katreadingarchive (assumedly), it isn't on other sites. So this definitely goes in the customTransformJS.

I also found a bug in the chapter number discovery: it breaks for locked chapters, which has kept annoying me in the update tab.

@ilonachan
Copy link
Author

I should've started this on a separate branch, but oh well

the reason I did was that `serve:dev` is broken now because of the restructuring. This needs more care in the future.
@ilonachan
Copy link
Author

#1867 fixes the issue I had with the last commit btw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants