Ant Smith

Articles

My Website Framework - Part 5: Oddments

Inevitably, there are some things that I just haven't had the opportunity to discuss in this series of articles. So I am unceremeniously clumping them together here, You might well expect that other stuff will end up here as well, as time goes by.

Right now this article covers:

  • Managing Maturity

  • Managing XML Site Maps

Managing Maturity

Earlier generations of my website (before I created The Framework) declared everything on the site as being of a mature nature; because it pretty much is really. Be that due to poems about diminutive cocks or articles about the application of power-tools, I'm just not writing for kids. Every page had a meta tag that told the internet robots it was mature content, and in the dark ages (from around 2012) there was a 'Parental Advisory - Semantically Explicit' content label visible at the top right of every page.

I felt that this gave me sufficient lee-way to publish and present any idea or images that I cared to. For the last decade I have cited Article 19 on my home page, precisely because of my dedication to free speech. It matters to me.

But really that was a pretty blunt approach which meant folk who would perfectly enjoy some of the content were potentially discouraged. Also people have levels of comfort in these things; and the odd use of the 'C' word even on a page marked explicit can upset, if some pieces are much more 'raw' than the typical; like we really need a 'no, I mean it, this page really isn't suitable for fainthearts'.

As a young punk anarchist I would readilly have published anything (I always yearned to create an underground spirit duplicated magazine back then). The thought that some folk are easilly shocked, disturbed or upset by things would just make me all the keener to publish exactly such material. THESE PEOPLE NEED WAKING UP.

Ah, the energy and arrogance of youth eh?

These days, I'm more about communication lines than battle lines. Although, I think you can still get a sense of the former me when I'm on stage in a drunken rowdy pub perfoming 'Mortician'.

Now I want to invite people on a journey, and to ensure they get good clear signposts along the way so they can duck out, having at least enjoyed some of the scenery, when it all gets to be just a bit too much...

Plus, the whole question of managing the presentation of mature content came in to greater focus once I had shared The Framework and I saw it powering websites of other people's content.

So Version 2 of The Framework takes a much more granular approach. Every page is considered to be 'safe', unless you take some form of manual intervention to declare it as not so.

To understand how marking content as 'NSFW' works, we need to think about how and where the content turns up in front of people; which isn't just on the page where the content resides.

An 'NSFW' piece of content has an associated 'URL' (address) which includes the name of the content. This 'name' might include taboo words, if it refers to a piece of content whose name contains such.

The site contains 'aggregations' - a list of all poems, a list of the poems tagged under mental health, a panel of images representing the collections to be found in a gallery, to name a few. Typically these aggregations will include content titles (which may contain 'taboo' language) and lead images (which might portray flesh).

Some pages present 'promo panels' of content - showing the content's title, lead image and first few paragraphs of text.

Titles, images and the first couple of paragraphs of the content all get included when a page is shared on social media platforms.

Some quite 'safe' content will include links to NSFW content.

The framework allows the site visitor to step from one piece of content to the next or previous piece - so it is possible to move through the site switching constantly between 'safe' and 'unsafe' content.

By god, if you have NSFW content on the site it seems there are somany ways it can 'leak' out into the 'safe areas'!

Before explaining how to manage the NSFW content, let's look at how The Framework handles all of these cases.

How The Framework Presents NSFW Content

The fundamental approach to presenting NSFW content is

  • If we are presenting the content in a 'safe' place, replace it with some purient alternative

  • Add visual indicators where there is potential to step into an 'NSFW' context

  • Don't use purient versions of titles if we are already in an NSFW context - what's the point?

  • DO require a click to show NSFW images even on an NSFW page (why? Because images can shock that much more immediately than words).

  • BUT Not if the NSFW image is in a photo section of the site (Why?? Because in this case the image - not the words on the page - is the main thing and if you have elected to see it, you should see it)

So that's all a little twisty-turny, subtle, delicate - sophisticated you might say; if you wanted me to feel good. But that's up to you.

URLs

Showing a purient title and an impurient URL

URLs get presented as links any and everywhere - oft times in quite plain readable form. Obviously the name of the content item is included in the URL structure - so if the file that presents a poem called NSFW F'It In The Morning happens to contain taboo language you will see that language in the URL.

You should use sanitsed purient names for files - given that the actual title (ultimately displayed in any NSFW context) comes from the referenced file's first line there is no need to use impurient language in filenames.

This little snippet in the image here is from the list of all poems on my website. It shows the use of a purient title for a poem (NSFW F'it in the morning) and the 'nsfw' marker that is used - but on hover you can see the impurient URL for the poem. Much of the content on my website dates from the days when the whole site was stamped as 'NSFW' - when I never gave much heed to the minutiae of the content's potential to offend and outrage. And although I'm such a mellow hippy these days I'm not actually prepared to nanny the internet so much that I'm changing all of my filenames now. Especially as changing filenames changes the URLs that point to them and has the effect of denying our history, which I just will not do. Never, ever, ever - once published - change a URL

I'll take more care going forward, as should you.

Aggregations

Purient content aggregation on tag page

Although we never need to use taboo language in filenames we cannot avoid it within titles. The Framework allows alternative, purient, titles to be provided in these cases and these purient titles are used on aggregation pages; along with a small 'nsfw' marker.

If a lead image for an item is itself nsfw, then it is replaced with the default image of the aggregation; as is the case for NSFW:And I am Blessed in the example shown.

This is the same image that is used when an item doesn't have an image of its own - as for A holding in my breath, also in the example here.

Promo Panels

Purient content aggregation on tag page

Titles and images are handled in the same way that aggregation pages handle them. Promos also display the first part of the promoted item's main text. When promoting NSFW content (in a safe context) This main text is replaced by the standard text "contains mature content for adult minds".

I believe I have nicked this phraseology from my mate Carl.

Social Media Platforms

Link previews for Facebook and Twitter

NSFW Titles and images are replaced, as per the in-site aggregations. The description is not sanitised and is shared as is (the first couple of parapgraphs of the content). I could have elected to replace the description and always use the default 'mature content' text. But I did not do that. It felt just too restrictive, and the first couple of paragraphs might not be the NSFW bit of the content anyway. Plus, anyone seeing the social share alreay knows it is NSFW from the image and/or title, so more fool them if they squint on to read the description in the hope of being offended. You always have the option of not sharing content with very ripe language from the get-go. Or you could ask me to change this behaviour so that potentially impurient descriptions do not get sent to social media platforms. That would be easy to do. But if I don't know you, you should buy me a pint via the donate button before asking.

The example here shows the case where both the lead image and the title have been sanitised for Facebook and Twitter link sharing.

Next And Previous

Previous andNext buttons when pointing to NSFW content

The Framework visibly flags 'NSFW coming up' on the navigation buttons that allow the visitor to move through the site.

Richer content in pages

A page, which may otherwise be quite safe, may present richer content items that are NSFW - eg. audio tracks, video clips, additional notes or incidental images (either as one-offs or in a gallery type display device).

With the exception of gallery displays, all of these richer items can be marked as NSFW so the visitor knows what they are getting into before they click on such content.

Gallery Displays though will typically contain a mix of safe and NSFW images and there is no way to sign-post upcoming images as being NSFW inside this device.

Therefore, typically the inclusion of NSFW additional content on a page doesn't mean the page itself must be marked as being NSFW unless that content is one or more images inside a gallery display on the page - in which case the whole page must be marked NSFW.

Take note, that whilst these richer content items are (largely) clearly flagged as NSFW before they are experienced there is no mechanism to display an alternative purient version of their titles; so avoid using impurient titles for richer content items. If you cannot avoid that then ensure the page they sit upon is iteself marked as NSFW.

Also note, that if an audio playlist player exists on a safe page and comes to play an NSFW track, it will not load the associated description (transcript or lyrics or whatever) into the now-playing display box.

Take special note that the aggregation pages for a given tag or a given collection include audio and video playlist players that list all of the media found within the tag or collection context. If any of this media has impurient titles you will need to mark these aggregation pages as NSFW.

T'internet Robots

As above, the actual content of an NSFW page is somewhat sanitised for consumption by any robots that blunder by (such as the Facebook and Twitter crawlers). Furthermore, any page which in itself is deemed to be NSFW will emmit a pair of tags that alert this disposition. For the geeks among you, that means the document head contains the following:

<meta name="rating" content="adult">

<meta name="rating" content="RTA-5042-1996-1400-1577-RTA">

Also, just a quick word on Section Names. Each section of the site is given a 'name' (in the site-config.php file) - such as 'poetry' or 'stories'. These get used in URLs and the page title that gets exposed to the wider t'internet. Unlike the individual item pages there is no mechanism to provide purient and impurient versions of these - so make sure your section names are purient.

Safe Spaces

I just can't do it. I just can't keep banging on about safe and unsafe (NSFW) spaces without saying something about the freedom of speech.

I just don't want to live in a world where everybody is 'nice' and no body swears. To me, that would be an ugly world. There is a fantastic joy in the use of taboo language and obscene imagery - I want it to abound, I don't want to be an oppressive force of fine form and purience.

But we must also give heed to Article 29:

...In the exercise of [their] rights and freedoms, everyone shall be subject only to such limitations as are determined by law solely for the purpose of securing due recognition and respect for the rights and freedoms of others...

universal declaration of human rights

In other words my freedom of speech has to recognise the freedoms that others have (dammit). I think appropriate signalling (as I have built into The Framework) is the answer - it gives others the agency to opt-in to being horrified and disgusted by me, whilst allowing me to continue being horrific and disgusting.

How to mark content as 'NSFW'

Content Pages

Published pages need to be marked as NSFW if:

  • The title contains taboo language

  • The main text is clearly of mature themes, or contains taboo language

  • The basic Author Notes include mature themes or taboo language.

  • Some of the images within a gallery display device are of an adult nature

  • Some of the titles of included richer media contain taboo language

  • You have enabled the display of audio track transcripts and you have NSFW audio tracks on the page

It doesn't matter if other content on the page is of an adult nature, because it cannot be experienced without some further mouse-click. If people click without taking any notice (and they will) that's their look out - at least they will have been warned. If you're concerned about idiots clicking without reading then you can always mark the whole page as NSFW. Which won't stop idiots clicking around willy-nilly but at least they will have been warned twice. Your call.

In 'item' type sections of the website create a tag file (in the tags subdirectory) called nsfw.txt and add the names of the NSFW items in the site section to this tag. This tag file works slightly differently to other tag files. After adding the nsfw item to this tag file follow its name with a comma and then supply the alternative purient title that is to be used in 'safe' places.

'Photo' sections of the website do not utilise tags (in Version 2) so instead you can place a file called nsfw.txt in the site section's galleries/ directory. Add any NSFW items of this section to that file (including it's purient form of title).

Note that this means NSFW photos must always have a unique name, otherwise entries in the nsfw.txt file will effect all photos of the same name.

These two files can conatin the names of any item or photo in the website section - but also can include tag names, collection names, or gallery names - so that those aggregation pages can be flagged as NSFW is you so wish.

Aggregation Pages

Just because an aggregation page includes reference to NSFW items it does not meant that the aggregation page has to be deemed to be NSFW. This is because these pages sanitise NSFW content. BUT if for whatever reasn you want aggregation pages to be deemed as NSFW - then add them to the appropriate nsfw.txt file.

Top Level Pages

The highest level page in any site section (eg. /poetry, /products) can be marked as NSFW by setting the NSFW flag in the site-config.php file for that section.

Images

Any image who's name ends in -nsfw will be covered over until clicked on, and will not be shared in social media previews, nor used in promos, nor on aggregation pages, nor added to the page's image light-box pop-up device..

There is a rule that lead images must have the same name as the item they belong to. The addition of -nsfw is allowed, The Framework understands (from the rest of the image's filename) that this is the lead image for the item - even though the names are not an exact match.

There is a default lightbox on all pages to allow large-views of all of the incidental images on the page. NSFW images are not added to this default lightbox - when they pop-up they do not include the other page images, and they are not included in the pop-up of the other page images. This ensure you cannot stumble upon an NSFW image whilst browsing through the page lightbox. Because the Lightbox that pops-up cannot give warning about upcoming images.

You can of course create additional pop-up lightboxes by placing over galleries of images on to the page. If these include NSFW images then you need to mark the page as NSFW - as those images can then be stumbled upon without warning.

The Framework always selects a lead image for every page. Sometimes this is the image supplied for a given tag or collection. Sometimes it is the default image for the site section and sometimes it is the default image for the site. You should avoid using mature imagery for any of these default images.

Richer items

Other richer items on the page (audio tracks, video clips, additional notes in an accordion) canbe deemed as NSFW by ending the filename with, you guessed it, -nsfw.

Links and URLs

Do not use taboo language in any filename, to ensure that plainly displayed URLs are not themselves impurient.

If you are including links to NSFW pages in teh content of a safe page then you should manually include some text that flags the NSFW nature of the link. A CSS class has been defned that helps ensure consistency and I oreface links to NSFW content with the following HTML fragment:

<b class="smallbold">NSFW:</b><


Managing XML Site Maps

In Version 2 I have added the creation of XML Sitemaps. These list every page in the website indicating when the page last changed. They are helpful in directing the efforts of robot crawlers.

Every now then a googlebot will drop by on your site and gather up the information needed to index a few of your pages. They never stay long and only gather info for some of the pages. Over time, if you're lucky, you might find Google has indexed your entire site. Of course by then your site will have changed, and google won't know that until its bots come back for another look.

By making a sitemap you can encourage the bots to look at these changes rather than laboriously checking all of the other pages that perhaps have not changed since it was last here.

You can see the sitemap for a section by visiting /<section>/sitemap.xml, eg. The Poetry Section Site Map. There is also a list of all of the site's sitemaps at /sitemap.xml.

The creation of sitemaps is fully automatic, but it takes yonks to make them. So once they have been made they don't change. Which is a bit inconvenient. From time to time, after a series of updates to your website you need to manually re-create the sitemaps.

Do this by delting the existing sitemaps in the sitemaps subdirectory at the root of your server's file system. THEN visit the sitemap URL (as above) and wait for the new sitemap to be created and displayed. Now it is stored back into the sitemaps directory for any future bot visits.


Download The Framework

So you can download this framework for free here.

Or you could take a moment to value the efforts and hit the DONATE button in the footer of the page first.

It kinda depends on what kind of a person you want to be...

Articles