Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I made a website in 2hr!

A topic by Ether created 22 days ago Views: 34 Replies: 4
Viewing posts 1 to 2

Okay, more like 3, but that's because I tweaked with my pattern generator until it was Just Right(tm). 

Anyway, I have some basics in webdev and I've had a lot of fun playing around with the starter you made! Thank you so much for your hard work! I was really happy to see that this passed the web accessibility evaluation tool as well. 

This is my little page: https://queerofswords.neocities.org/

Developer

oh, wonderful!! your site looks really nice :>

(1 edit)

Thank you!!

I have a question about NPM-- let's say I want to run the starter as a blog that's a subdirectory of the root website. I really like the run upload command, and I'd like to be able to use it for the whole website, not just the strawberry starter subdirectory. 

I assume this might be too complicated to explain for something that's only adjacent to what you did with the starter, but could you please direct me towards the right path? Like... how is this called? What do I look for?

I tried reading the Node.js and NPM docs, but I got really overwhelmed. I know I can do "npm httpserver . -o -p 9999" and run my own local server like that, but it stops here. I don't know how to only upload what's been changed like with "npm run upload". 

Or is it easier to basically recreate the whole website within the strawberry starter? 

Developer

You can run individual scripts with node by using "node path/to/script.js". When you run "npm run upload" you're actually running "node _functions/upload-neo.js".

You could move that script to another node project, but you'd have to tweak it since it's designed for strawberry starter (specifically, it checks for a config.jsonc file in "src/_data" to check for a subdirectory, and it reads a folder named "_site" to check what to upload.) You'd have to initialize a new project with "npm init" and then install the script's dependencies with "npm i form-data jsonc". That's overkill if your site isn't already a Node project, though.

However there's a Neocities Command Line Interface that lets you upload your site from the command line. It has a different syntax and some quirks but fundamentally does the same thing - only uploads what's changed. This is the best way to go about uploading things if your site isn't already a Node project, I think! I would use that tool to upload your base site and use npm run upload to upload the blog.

Thank you so much! I had run into the Neocities CLI before but somehow had only focus on the "upload" command and not the "push" command, which I think does exactly what I want. I have beneficiated greatly from your help, now I will happily go tinker some more!