The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
''If you’re looking at how to use the new essays page, refer to the user guide. This is the technical documentation for maintenance purposes.'' | ''If you’re looking at how to use the new essays page, refer to the user guide. This is the technical documentation for maintenance purposes.'' | ||
This page relies heavily on DPL3 (Dynamic Page List 3), documentation here: https://help.fandom.com/wiki/Extension:DPL3/Manual. DPL has a 1 day cache and will not update before then. To force it to update, go to the essays homepage and in the menu click on ''' | This page relies heavily on DPL3 (Dynamic Page List 3), documentation here: https://help.fandom.com/wiki/Extension:DPL3/Manual. DPL has a 1 day cache and will not update before then. To force it to update, go to the essays homepage and in the menu click on '''Hard Refresh'''. | ||
I’m unsure how | I’m unsure how many resources DPL needs to make the page, I can only hope the server supports the load once we start getting a lot of essays. | ||
--- | --- | ||
Line 14: | Line 14: | ||
* [[Template:Essay categories|Essay_categories]] | * [[Template:Essay categories|Essay_categories]] | ||
* [[Template:Essay authors|Essay_authors]] | * [[Template:Essay authors|Essay_authors]] | ||
We also use one module ([[Module:Reading time]]) to estimate a reading time. It can be invoked on any page though. | |||
While each template has its own stylesheet, we really only use the ones associated with Essays_homepage and Infobox_essay (found at /style.css). On MediaWiki, once a stylesheet is called on a page (through a template for example), it will apply to ''everything'' it can on that page. By selectively declaring properties in either essays_homepage or infobox_essay, we can control what appears (and how) on the new essays page (called the '''essays feed''') AND on individual '''essay pages''' (one such example: [[Essay:A nutrition and fitness guide]]) as well. | While each template has its own stylesheet, we really only use the ones associated with Essays_homepage and Infobox_essay (found at /style.css). On MediaWiki, once a stylesheet is called on a page (through a template for example), it will apply to ''everything'' it can on that page. By selectively declaring properties in either essays_homepage or infobox_essay, we can control what appears (and how) on the new essays page (called the '''essays feed''') AND on individual '''essay pages''' (one such example: [[Essay:A nutrition and fitness guide]]) as well. | ||
This documentation goes through each template and the module one by one. | This documentation goes through each template and the module one by one. | ||
== Essays_homepage == | == Essays_homepage == | ||
Line 80: | Line 70: | ||
The code:<blockquote><nowiki><dpl></nowiki> | The code:<blockquote><nowiki><dpl></nowiki> | ||
namespace = Essay | |||
ordermethod = lastedit | ordermethod = lastedit | ||
Line 94: | Line 84: | ||
addeditdate=true | addeditdate=true | ||
titlemaxlength= | titlemaxlength=60 | ||
userdateformat = Y-m-d format = ,\n* <span class="essay-small">%DATE%</span>, <span class="lastupdate-title">[[%PAGE%|%TITLE%]]</span>, | userdateformat = Y-m-d format = ,\n* <span class="essay-small">%DATE%</span>, <span class="lastupdate-title">[[%PAGE%|%TITLE%]]</span>, | ||
</ dpl></blockquote>What it does is create a list of the 7 most recently updated essays (that is, when an edit was committed) | </ dpl></blockquote>What it does is create a list of the 7 most recently updated essays (that is, when an edit was committed). You can change that 7 count to anything else in the template by editing '''count = 7''' in the DPL code. | ||
titlemaxlength sets how many characters can appear in the title variable before we truncate it with ... I picked | titlemaxlength sets how many characters can appear in the title variable before we truncate it with ... I picked 60 so that it still looks good on desktop (about 2 full lines of text), but we can change it at any time. | ||
Notably we also order by last edit (ordermethod), meaning the most recently updated essay will be pushed to the top of the list. | Notably we also order by last edit (ordermethod), meaning the most recently updated essay will be pushed to the top of the list. | ||
Line 119: | Line 109: | ||
The code is otherwise pretty straightforward, it just repeats for every category with the names and links changed. I also reused the library module '''Number of works''' to count how many pages are in the category. | The code is otherwise pretty straightforward, it just repeats for every category with the names and links changed. I also reused the library module '''Number of works''' to count how many pages are in the category. | ||
I chose to keep the Essay_categories manual instead of pulling it from DPL for two reasons: one, it kinda reduces the server load (again I don't know how | I chose to keep the Essay_categories manual instead of pulling it from DPL for two reasons: one, it kinda reduces the server load (again I don't know how many resources it takes to generate all this DPL code). and 2, it prevents people from creating categories and creating chaos. I totally expect that with time, some editors might not take the time to check if a category already exists and create their own duplicate. By adding categories manually, they can be | ||
== Essay_authors == | == Essay_authors == | ||
Line 128: | Line 116: | ||
DPL pulls the contents of the category "Essays by author", simple as that. So you just need to add your author category (Essays by X) to that parent category. I provide the full code to also spice up your author category, since this is the category people will actually visit (Essays by author is really just sort of a holding or container category so that we can use DPL). | DPL pulls the contents of the category "Essays by author", simple as that. So you just need to add your author category (Essays by X) to that parent category. I provide the full code to also spice up your author category, since this is the category people will actually visit (Essays by author is really just sort of a holding or container category so that we can use DPL). | ||
So that everyone is equal, I made it so that the authors list is ordered by last update | So that everyone is equal, I made it so that the authors list is ordered by last update, meaning if you publish a new essay, you'll get bumped to the top. I think this can be useful for readers to kinda help them find editors they like (or just new content). | ||
== Homepage setup == | == Homepage setup == | ||
Line 152: | Line 138: | ||
<blockquote><nowiki><dpl></nowiki> | <blockquote><nowiki><dpl></nowiki> | ||
namespace=Essay | |||
mode=unordered | mode=unordered | ||
Line 158: | Line 144: | ||
includesubpages=false | includesubpages=false | ||
ordermethod= firstedit | ordermethod=firstedit | ||
order=descending | order=descending | ||
Line 165: | Line 151: | ||
<nowiki></dpl></nowiki></blockquote> | <nowiki></dpl></nowiki></blockquote> | ||
Line 175: | Line 160: | ||
ordermethod= is how the output will be sorted. Firstedit means that it will list the output by first edit made, i.e. page creation. Lastedit is the last edit made (used for Latest Updates). There’s several other ordering methods available. | ordermethod= is how the output will be sorted. Firstedit means that it will list the output by first edit made, i.e. page creation. Lastedit is the last edit made (used for Latest Updates). There’s several other ordering methods available. | ||
order=ascending or descending to sort the list one way or the other. | order=ascending or descending to sort the list one way or the other. | ||
include= this is the important one. Include allows you to include something specific with your output, pulled from the page. In this case we pull the content of the infobox_essay template | include= this is the important one. Include allows you to include something specific with your output, pulled from the page. In this case we pull the content of the infobox_essay template. | ||
This code together creates a bullet-point list ordered from most recent to oldest essay and pulls the infobox essay template under each bullet point. | This code together creates a bullet-point list ordered from most recent to oldest essay and pulls the infobox essay template under each bullet point. | ||
Line 211: | Line 192: | ||
Random future stuff that I want to fix or implement on that page. | Random future stuff that I want to fix or implement on that page. | ||
* Add more sidebar items if we can find any. | * Add more sidebar items if we can find any. | ||
* Make it so we can collapse sidebar items for mobile users (probably need JS due to MW HTML restrictions) | * Make it so we can collapse sidebar items for mobile users (probably need JS due to MW HTML restrictions) | ||
*make the table of contents available (tried a few things already but it just doesn't get pulled by DPL on the feed page) | *make the table of contents available (tried a few things already but it just doesn't get pulled by DPL on the feed page) | ||
*remove the "Essays by " mention in author sidebar item. Possible with DPL but then number of works doesn't work. | *remove the "Essays by " mention in author sidebar item. Possible with DPL but then number of works doesn't work. | ||