
Ask HN: What are the *dynamic* needs for a static site these days? - 12s12m
Static sites are getting more popular by the day. What are the <i>dynamic</i> needs of a site that are holding you back from using a static site generator? Things like comments, search are covered by tools like disqus and algolia. I&#x27;d love to see some examples.
======
hanniabu
Always wanted to build a SaaS around services meant for static sites. Feel
free to take these ideas and run with them since I don't believe I'll have the
time to follow through with these anymore.

1\. A content suggestion tool where based off of the current content and past
content you'd build an interest profile so you can populate suggestion widgets
on the page, while also not recommending articles they have already read
before.

2\. A user option to hide read content. When they read content, the link will
be hidden from the site so they don't waste time sorting through old content
to get to new content. I was planning on pairing this with the option to hide
a story that's not of interest for the same reasons. All these articles can be
viewed again either by turning off this option(provided the developers
integrate it) or by viewing a page with all the content that has been
hidden(or however the site developers integrate the api to access hidden
content).

3\. A favorites/history tool for users on a site. What I had in mind is being
able to allow users to favorite content and this will be saved and accessible
by the site developers through API to integrate, such as the obvious
favorite's page.

Had a few others but don't remember off the top of my head.

------
marktangotango
I built a service last year that provided a SQL database over CORS, access
control (user login, registration with email confirmation, and password reset
via email). Security was over https and user controlled authentication tokens.
The idea was to provide toolkit for building dynamic services for static
sites. The archetypical use case was comments for static blogs. I built a
simple forum that supported user signup, posting topics etc... as a single
page app. Excercised the whole thing.

I had some interest but acquired no regular users. Email me if you'd like more
info, I'll not promote it here.

~~~
12s12m
I saw the link to it from your profile. Interesting concept. There are
variations of this available:
[https://fieldbook.com/](https://fieldbook.com/), Airtable, etc. I'll send you
an email :)

------
DamonHD
I have some completely static sites and some completely dynamic ones.

Most of my sites are served from my solar-powered RPi2 with boring old Apache
2.2 and various site checkers plaster them with As for technical performance.
Very little need for JS. You may of course not like my content, but for me for
those sites the answer to your question is "none".

You should see the rant about AMP, trending on the HN front page, to see an
example of why more JS is not more bettererorz UX... B^>

Declaratory and static for me, where possible.

------
owebmaster
Some of the dynamic needs also could be static some day. Comments are easy to
generate a json everytime, search is a little more difficult.

------
waibelp
Depends on the usecase. Sites for local stores need opening hours. Having
those information as plain html is enough but that can be extended via ajax to
show if store is currently open... So no need for dynamically rendered pages
serverside.

~~~
OtterCoder
No need for ajax/fetch. You can calculate that in the browser with the data in
your plain, static HTML.

~~~
waibelp
Sure, but can we trust the date and time of the client?

~~~
thenomad
99% of the time, yes, I'd say.

Having time/date wrong on your device - particularly a phone, which a lot of
people use instead of a watch - is sufficiently annoying that it usually gets
fixed.

~~~
waibelp
Good point! I'll have a look into this, thanks!

Edit: Great advice! Works like a charm! I've never really worked with dates in
JS. Should have read the docs earlier ;-)

------
evince
I would say blogging, whitepapers, product updates are the dynamic things
which one can update regular on static sites.

------
binhqx
sites that are used for adverting may want to show different content based on
a users past behavior (new vs returning visitor, for example) it is hard to
achieve this in front end javascript without content flashing as one piece of
content is replaced with another

------
iDemonix
A contact form.

~~~
12s12m
There are a lot of options available for forms in a static site. A few from a
quick google search are: [https://www.jotform.com/](https://www.jotform.com/)
, [https://liveformhq.com/](https://liveformhq.com/),
[https://www.google.com/forms/about/](https://www.google.com/forms/about/) .

------
eevilspock
Access control (login).

~~~
12s12m
There is auth0 ([https://auth0.com/](https://auth0.com/)) for authentication,
and many hosts which support basic auth. What kind of use cases are you
thinking when you say access control?

~~~
eevilspock
Static site hosted on GitHub Pages, or S3. I can't figure out whether auth0
supports that.

~~~
12s12m
I don't think GitHub Pages or S3 can support authentication using auth0 for
static pages. This could be an interesting service, which allows you to put
your website behind authentication from auth0. What use cases would need this
kind of a setup?

------
id122015
the LIKE button

~~~
12s12m
You can use the Like button on static websites. Or did you mean something
else?

