Neocities
Neocities is a hosting site where you can build your site and have it hosted and therefore accessible on the Internet. You are encouraged to create a site in Neocities so you can see how it works and looks on a hosted server. .
Hot tip: After you create your Neocities account to test all is working in index.html (the homepage page) change “"Welcome to my Website" to "Welcome to <YOURNAME> Website", this just checks things are working as they should.
Issues
It appears that Neocities only allows one instance of a file to be hosted, so you probably can't have two version of the same site hosted in different folders or the same image in two separate folders
There seem to be issues with filenames that have spaces in them (Hint: use CamelCase).
There can be problems if you cut and paste the examples from their tutorials. If you find a line of code doesn't work after you have cut and pasted it retype manually the whole line.
If you have downloaded the entire site Neocities will create a zip file. To test your site make sure you unzip the archive as running html inside a zip archive will have unpredictable results (e.g. images missing, broken links, etc.).
Pages not refreshing
If you have trouble such as pages not refreshing correctly or files not uploading to Neocities first try clearing the browsers Cache (thanks Brad L). You can force a page refresh if you hold the [Shift] key down the click on the Browsers Refresh button. By the way this is also VERY useful in eCampus if you haven’t been working on a page for a while and the system has timed out.
It is worth checking that you are looking at the correct page so right click and view page source to make sure the page you are viewing is the page you are changing.
Images don't show.
If you copy your site from Neocities to your storage device and the images don't appear. Often it is due to your Neocities site thinking it is running in a top level folder, so in your code you have <img src="/cat.png">. to solve this remove the bckslash (/) i.e., <img src="cat.png">
Have you uploaded the image to the same folder as your html file
Is the name of the file in your HTML code EXACTLY the same as the filename in the folder e.g., if you have "cat.png" in the HTML file it must be cat.png in the folder not Cat.png, cat.PNG, CAT.PNG etc.) this is because Neocities is hosted on a Linux server and case matters. Also note that you may need to close the page and reopen for the image to reappear as I noticed that a forced refresh ([Shift]+[Refresh]) didn't work)
Just in case there are issues with the file, upload a different image and change the img src to the new image name and try again.
if you have it in a subfolder you will need to include the path e.g., <img src="media/cat.png"> . Note if you have <img src="/media/cat.png">you need to remove the leading backslash (/).
File naming issues
We discovered that you can get unpredictable results if you have spaces in filenames for Neocities. For example, instead of “Cafe gallery.html” use CamelCase, or “CafeGallery.html” (no space).
Restricted File types (audio = mp3, mp4, etc.)
In order to manage the hosting Neocities do restrict certain file types. Audio files have the capability of overwhelming their servers if the file "goes viral" so they are no able to be uploaded. They suggest using Soundcloud or YouTube and link to them.
August 2021 Students are reporting that Neocities is allowing audio file uploads if you are using a paid account.
For more information refer to https://neocities.org/site_files/allowed_types
(If you are a student of eCampus NZ see note below)
Link issues
Watch the links, especially if you need to copy the site to another location (e.g. Local Hard Drive).
When copying files from Neocities (as for the last assessment I need all the files to be in a zipped folder) make sure that the path names are correct as I had one student submit with all their src’s pointing to “/..” the root folder of the drive
Creating sites in neocities may create “absolute links”. This often happens in tools when the page has not been saved BEFORE the links are added. Please check through the code for two specific things that have shown up.
The stylesheet or hyperlinks do not contain a “/” or “./” in the path
“<link href="/stylesheet.css" rel="stylesheet" type="text/css"> or,
“<link href="./files/stylesheet.css" rel="stylesheet" type="text/css">
should be
“<link href="stylesheet.css" rel="stylesheet" type="text/css">.
OR for a hyperlink
<a href="/index.html">Home</a>, should be
<a href="index.html">Home</a>
If you have “/filename.html” this says that the file is in the root folder of the drive (common if you have been using neocities), so won’t work on my computer. Remove the /.Check that any of the hyperlinks don’t have a neocities part like
<a href="https://mysite.neocities.org/index.html">Home</a>, should be
<a href=" index.html">Home</a>
Neocities comes up with the message "a name for the link has not been supplied". It appears that Neocities has issues with really long URLs, and splits them over 2 lines. So they work fine if copied to the local drive but not in NeoCities. Solution could be to use a URL shortener ( https://chrome.google.com/webstore/detail/url-shortener/oodfdmglhbbkkcngodjjagblikmoegpa?hl=en ) - thanks Mika (2022-04)
eCampus NZ
If you are building a website for eCampus, it must run independently of NeoCities on a local storage device.
You can include your audio files with your website
Techniques
Adding an link on an image (e.g. logo to your homepage
<p>Here's how you can add an image with a link</p>
<p> <a href="virtualmv.neocities.org"><img src="neocities.png" alt="Our logo" width="75" height="75"></a>You can't link back to your personal site</p>
<p><a href="virtualmv.neocities.org/index.html"><img src="neocities.png" alt="Our logo" width="75" height="75"></a>you can't link to your site using the whole neocities URL</p>
<p><a href="index.html"><img src="neocities.png" alt="Our logo" width="75" height="75"></a>you CAN link to a page in your site</p>
Note: There is no / before index.html