some undocumented neocities mechanics

techno-mystic reveals esoteric secrets from years of research

last update: 7/25/24

discovered through personal experience, experimentation, and a very poor analysis of the open source neocities code (i have some experience coding but none whatsoever with the language ruby, which most of the important bits are written in).

updated ※ profile activity updates: if an html file has been updated on a site and the site’s last activity update was over 24 hours ago, a new activity update will be generated. no activity updates are generated by editing css, xml, or script files, nor if photos are uploaded. if an activity update is manually deleted, there will still be a 24-hour cooldown before another activity update is generated. the main site screenshot displayed will always be of the latest distinct html file edited during that activity update’s 24 hour span. one way to think about it is like a stack: every time an html file not already in the stack is edited, it gets added to the top of the stack. the main thumbnail is the file/page at the top of the stack, and the smaller side thumbnails (up to 5, raised from 3 on 7/22/24) are the next ones in the stack, in ascending order from top to bottom (the 2nd position in the stack is at the top). a page/file's position in the stack cannot be changed, so if it gets "buried" by other pages being added to the top of the stack, it can't appear as a thumbnail again until the stack resets for the next activity update, when the 24 hours is up. NOTE: there was a brief period in april 2024 when the thumbnail behavior was reversed: the first page edited would appear as the main thumbnail, rather than the last (new) page edited. then, for a few months the thumbnails appeared in apparently random order until the sorting was updated on 7/22/24.

※ site activity update screenshots are taken using a window size of 1280x960 (verified experimentally using inline javascript)

※ to appear on global activity page, a site must not be marked as nsfw, must not be shadowbanned, and must have at least 3,000 views and 2 followers.

※ to appear on the browse page, a site must have at least 100 views, or 10,000 for the default sort or the "tipping enabled" sort.

※ the block system was overhauled on 5/31/24 in the aftermath of the Divsel Incident, which exposed its prior lack of functionality. the pop-up warning that comes up before blocking a site has not yet been updated to describe the new functionality, which is as follows: blocking a site will now hide your site profile page, site update rss feed, stats page, following page, and followers pages from that site by redirecting them to a 404 when they try to visit any of those pages. your site will also be hidden from them in the browse page, and should they figure out how to do so without viewing your profile page, it will also prevent them from following your site or commenting on its profile page. it will not prevent them from viewing your site itself using its url, and may possibly still allow them to like posts or comments should they figure out how to do so without being able to view them. on the other hand, blocking a site will hide it from you on the browse page (though their site updates will still be visible to you on the global activity feed), hide their following/followers pages from you by redirecting to a 404, and prevent you from commenting on their site. it does not prevent you from viewing their profile page, stats page, site update rss page, or site itself. you can also still like their site activity updates. note that all of the above only applies when logged in, e.g. it is still possible to view the site profile of a site that has blocked you by logging out.

※ shadowbans (referred to in the code as “is_a_jerk”): the shadowban requirements were revised again on 4/16/24 in response to the Federi Affair. regardless of follower count, a site now gets shadowbanned if it is blocked by more than 50 users. additionally, sites that themselves block more than 100 users now get shadowbanned (mass blocking was a favored enforcement tactic of the federi regime). as far as i can tell, the last line in the jerk detector is currently redundant (due to the && blocks_count > 60 at the end, the whole statement is only true when the earlier line return true if blocks_count > BLOCK_JERK_THRESHOLD * 2 is also true, since BLOCK_JERK_THRESHOLD = 25. maybe it is meant to be && blockings_count > 60?), perhaps someone with a github should alert kyle. shadowbanned sites are suppressed from the global activity feed and are only allowed to comment on their own profile pages or those of sites that follow them.

※ for some reason you can like your own site activity updates or comments although it's probably uncouth to do so. i feel like i understand the code well enough now that i could submit a pull request fixing this issue, but i find the jankiness endearing.

※ an rss feed of site activity updates is available for any site, even ones with site profiles disabled (as long as you know their username): neocities.org/site/[username].rss

※ even if a site has profile disabled, it is still possible to view their followers/following using these two links, as long as you know their username: neocities.org/site/[username]/follows
neocities.org/site/[username]/followers

※ sites that have marked themselves nsfw in the settings are very difficult to find in the neocities interface, they do not appear in the global activity feed nor can they be found under any of the visible browse settings. however, they can still be viewed on the browse page by manually passing in the "is_nsfw=true" parameter to the url like so:
neocities.org/browse?is_nsfw=true
the sort buttons on the page won't work for the nsfw sites, but you can pass in the different sort parameters manually to sort them:
neocities.org/browse?is_nsfw=true&sort_by=last_updated
it seems there are some sites that use the nsfw tag just for hiding themselves, like the neocities blog or the site of kyle drake (benevolent dictator of neocities).

※ the maximum file upload size is 100mb and the maximum number of sites that can be followed on one account is 2000 (raised from 1000 on 3/27/2024, it seems a longtime user and prolific follower finally hit the limit and requested a raise. wonder what their feed must look like...)

updated ※ there is a file name limit of 200 characters (raised from 100 on 7/22/24), and a 1200 character limit for the length of a file's full path.

※ the maximum comment length is 420 characters (this is accompanied by a comment in the code: # Used to be the limit for Facebook.. no comment (PUN NOT INTENDED).).

※ to be "allowed" to comment, a site must be at least one week old and have been updated at least twice. i have not tested this but from the code, there appears to be a limit of 5 comments per day for users that aren't supporters. this limit may or may not apply only to comments made on other users' sites. there also appears to be a way for admins to manually ban sites from commenting.

※ to comment on a site or a site's events, the commenter must not be blocked by the site or blocking the site, the site must have profile/commenting enabled, and the commenter must be "allowed" to comment (see above). additionally, shadowbanned sites are only allowed to comment on their own site or sites following them.

※ neocities is somewhat picky about image file extensions that are capitalized, and will not generate thumbnails for them. however, they will display in sites just fine as long as the path to the image includes the capitalized file extension in the html img tag src attribute. incidentally, using the "※ " character makes the neocities site editor act a little funny visually.

※ the site name displayed on neocities is taken from the "title" tag of index.html in the site's root directory, the only site file which neocities won't let you delete.

※ the "site traffic stats" update every day at midnight GMT/8 pm EST.

※ profile pages only display the total view count for a site, but the total hit count for a site can be found using the "info" api call for a site (e.g. https://neocities.org/api/info?sitename=[username]). going to the stats page and downloading the data as a CSV will include bandwidth usage info as well, although downloading stats can only be done for one's own site (the info api call works for any site as long as you know the username). i'm not sure what units bandwidth usage is measured in, though.

※ it's possible to send a one-way pseudo-DM by making a post on a site's profile page and then immediately deleting it, thanks to neocities email notifications. although the post will no longer be publicly viewable, an email notification with the post's contents will still be sent to the site's associated email address, provided that the site hasn't unsubscribed from neocities email notifications.

※ the "New Followers" thing on a site profile shows new followers from within the last month.

updated ※ this section used to discuss the mechanics behind the default "most followers" sort on the browse page, which for a long time was poorly understood because it is quite clearly not based solely on number of followers. however, in light of continuing abuse by various clout-chasing bad actors, i've decided to designate it "forbidden knowledge".

※ the "special sauce" sort works by scoring sites using the following algorithm:

  
			1 SCORE_GRAVITY = 1.8
			2 
			3 def compute_score
			4	points = 0
			5	points += (follow_count || 0) * 30
			6	points += profile_comments_dataset.count * 1
			7	points += views / 1000
			8	points += 20 if !featured_at.nil?
			9
			10	# penalties
			11	points = 0 if changed_count < 2
			12	points = 0 if api_calls && api_calls > 1000
			13
			14	(points / ((Time.now - updated_at) / 7.days)**SCORE_GRAVITY).round(4)
			15 end
				

line 5 heavily favors follower count, line 6 favors profiles with many comments, line 7 favors high view counts. line 8 gives a bonus based on if a site has been featured (not sure in which direction), although practically this probably has very little effect since i don't think i've ever seen the featured sites change. line 11 penalizes sites that have not been changed by nullifying their score, and line 12 does the same thing to sites that use the api too much (probably to punish sites that use scripts to update constantly, like those weather sites). line 14 heavily favors sites that have updated recently.