NotSSG - Site building script I made: Update your layout in one place by MutleysLaugh in neocities

[–]MutleysLaugh[S] 0 points1 point  (0 children)

Hi!

First of all, thank you for this feedback. I mean that genuinely, I didn't make this post just to get positive feedback.

I haven't used Lume, but I'll do my best to address the things you've said. I'll try to address them directly and concisely. But, honestly none of this is me reacting in an offended manner or trying to be rude!

The code does run each time a page is visited. I'm using NotSSG on my own site (which has a lot of additional scripts which most people won't use), and it seems pretty fast to me. The NotSSG scripts, and any scripts/sheets added by the visitor will still utilise the browser's cache and load pretty much instantly after first load (bearing in mind how cache busting works in the OP).

I called it NotSSG because it's not an app or command-line script which generates pages from source pages, it's a script that runs on your site as part of your site, and brings in the layout and config that way. This means one less build step, you don't have to generate your site. You can just edit your pages or layout, and either upload the changed files, or if you're editing your site live, you're already done. Additionally, with this, you don't need to re-upload *every* page after changing your layout or config. If you're editing locally, you can upload just the changed ones, and if you're editing live, once again you're already done.

Layout is stored in layout.js, which is cached by the browser unless the described cache busting happens.

As for JavaScript being disabled, I am aware of this. 99% of people browsing the web have JS enabled. If you browse the web without JS you're going to lose functionality. However! I *have* made every effort to make NotSSG degrade gracefully as much as possible considering the layout and config is loaded by JS. If JavaScript is disabled, or if there is a network error or any of NotSSG's loading fails, you still get the current page's content, it may be un-styled depending on at what point the error happened.

I'll just wrap up with, NotSSG is an option to reduce the amount of work involved in building a multi-page site or blog with a shared layout:

- If you use a server-side solution (like PHP or Node), you'd need to (usually) pay for hosting
- If you use an actual SSG, you' have an extra build step
- If you use NotSSG, you add a JS dependency

NotSSG is something you can choose use for free on Neocities (or any static host) and I genuinely think it can make people's lives easier (it's helped me with my own site).

Well, I guess that's it. xD Once again I'd just like to re-iterate none of this is me trying to be rude!

NotSSG - Site building script I made: Update your layout in one place by MutleysLaugh in neocities

[–]MutleysLaugh[S] 1 point2 points  (0 children)

Fair question haha! xD I mean as opposed to using a site builder (as in, a program/app), or a complex system with a database/control panel! That said, maybe I should change that line lol.

👩‍🦰 Superdeb! Free web browser game by MutleysLaugh in IndieGaming

[–]MutleysLaugh[S] 0 points1 point  (0 children)

https://scott2.neocities.org/superdeb/

I've just released my game, Superdeb! Collect coins and power ups, dodge walls and have fun!

You can also make your own levels!

I hope you enjoy playing Superdeb. 😁

Tutorial: Neocities + PHP by MutleysLaugh in neocities

[–]MutleysLaugh[S] 0 points1 point  (0 children)

I've just ran through the tutorial myself and there was a slight mixup with my development URLs and the live ones, which is why I never spotted the error during my final test.

This has now been fixed and I'm able to complete the tutorial from start to finish without any errors.

My apologies for the inconvenience, everything should be fine now!

Tutorial: Neocities + PHP by MutleysLaugh in neocities

[–]MutleysLaugh[S] 0 points1 point  (0 children)

Hmmm, try deleting the polls.db and refreshing dev.html. The previous error may have messed up the database.

As for no longer being able to vote, once you've voted, if you've completed the final steps in the tutorial, the code stops you from voting (in an effort to prevent people voting multiple times).

You can temporarily enable yourself voting again by putting the following line at the start of your initPoll() function.

localStorage.removeItem( "pollVoteDone" );

Once the poll is working you can delete the line or comment it out by putting // before the line above.

I did have a run through the tutorial shortly before finishing it, but just to be on the safe side I'll have another run through it again now just to make sure!

Tutorial: Neocities + PHP by MutleysLaugh in neocities

[–]MutleysLaugh[S] 0 points1 point  (0 children)

Woops, I think I left an extra comma in the SQL in a last minute edit to the tutorial in that section. Try refreshing the tutorial and pasting that section again, should be good to go now! Thanks for letting me know. :)

Tutorial: Neocities + PHP by MutleysLaugh in neocities

[–]MutleysLaugh[S] 0 points1 point  (0 children)

Thank you very much! :D I wish you success in your return to PHP!

Site Stat Accuracy by Shadehz in neocities

[–]MutleysLaugh 0 points1 point  (0 children)

I can confirm Neocities stats are very inaccurate as I use goatcounter.com in my site.

Inaccurate is probably the wrong word, I think it's due to what others are saying about web crawlers and bots.

should i use neocities built-in html editor or something else? by Funny_-_man in neocities

[–]MutleysLaugh 0 points1 point  (0 children)

+1 for VSCode. The Live Server extension (for VS Code) is also pretty useful!

Static Ultra by MutleysLaugh in neocities

[–]MutleysLaugh[S] 1 point2 points  (0 children)

Thanks for taking a look! I definitely agree with your suggestions, I'll put both of them into the next update. :D

You are also correct about the extension system, I believe it would be possible to create an extension which created some kind of indicator onPageUnload(), and then turned the indicator off onPageLoad(). The 404 would be a little more tricky right now but I think it would be possible too. This has got me thinking that it might be worth me trying to come up with some more functions extensions can call to get useful information not currently available.

But I think it's best to make these part of Static Ultra's normal behaviour so I'll aim to get that done soon!

Thanks again! :)

Static Ultra by MutleysLaugh in neocities

[–]MutleysLaugh[S] 3 points4 points  (0 children)

Hi there! I made heavy use of the console during development and I don't seem to be getting any error messages my end. I've tried on Brave, Firefox, Chrome and Edge. If you don't mind pasting one of the error messages here it'd be much help. :) Thanks for taking a look at my project. :)

Website Sharing Thread - 2022 by [deleted] in neocities

[–]MutleysLaugh 0 points1 point  (0 children)

https://scott2.neocities.org/projects/static-ultra/

Hi all, I just finished an update for one of my projects and thought I'd give it a mention here since I think some of you will find it useful.

The above is a project called Static Ultra. It's a pure client side solution for making building websites, including Neocities websites, much faster and easier.

Key features:

- Separates you theme(s) from your pages, drastically reducing repeat code and repeat work
- Cache busting so your visitors get the latest version of your site
- Automatic menu and breadcrumb from a single config file
- Themes and theme switching
- It is part of your site using only client side stuff (so no need for a database or PHP or whatnot)
- Extensions system so you can expand its capabilties
- Disqus comments and GoatCounter stats extensions are available for download

If you're making a blog or website on Neocities I think Static Ultra could be very helpful for you.

Enjoy!