Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section transclusion #13

Open
hatkirby opened this issue Jul 4, 2017 · 0 comments
Open

Add section transclusion #13

hatkirby opened this issue Jul 4, 2017 · 0 comments
Assignees

Comments

@hatkirby
Copy link
Owner

hatkirby commented Jul 4, 2017

Entries should be able to transclude sections from other entries (most notably wikis, but maybe other entries too). The reasoning for this is that I write a lot of blogs that involve similar concepts; for instance, in my series on catching legendary Pokémon, EV training my helper Pokémon is often a part of the strategy. I do not want to re-explain how stats work and what EV training is in every blog I write, because that gets boring and also deters/bores people who read my older posts. I do not want to just leave it out and link to an older post, because that raises the bar to entry and will deter new readers. A happy medium, I think, would be to remove the content from both posts, and move it into a wiki. Then, instead of linking to the wiki when it comes time to bring up EV training, the entry can transclude the section from the wiki into a <details> block (thanks HTML5!), which will be obviously styled as being separate from the main body of the entry, and will say shortly in the <summary> tag that the transclusion will explain so-and-so concept. This way, older readers can just skip the block and keep reading, and newer readers can expand the block to read about the concept without having to leave the page. Optionally, a link to the full wiki can be included in the <details> block as well.

This may be complex to implement. The main UI to this will be a dialog in CKEditor, so a plugin will have to be written. An API on the server that the plugin can use to list existing entries will also need to be created. Then, a way to denote the transcluded section will have to be devised. One way would be for the API to produce a list of subheadings in the chosen entry, and the transclusion will contain the body governed by that subheading.

@hatkirby hatkirby added this to Need to do for Hoenn legendaries status update in This website Jul 4, 2017
@hatkirby hatkirby self-assigned this Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
This website
Need to do for Hoenn legendaries stat...
Development

No branches or pull requests

1 participant