Ask HN: Best way to create a landing page?
Let's say I have an app, residing at app.example.com. I want a separate landing page for this app at example.com.
This landing page should be easily managed for updating content and also have multiple pages. What stack would you use for this today?
I want it to be SEO optimized.
I use Vue for the app but feels overkill for the landing page and also not ideal in terms of SEO. I don't feel like going the SPA+SSR way either.
Is wordpress still a good alternative?
Or maybe just a html+jquery site hosted at for example Firebase?
I don't expect to update it too much with news etc so a CMS is not required.
What would you do?
64 comments
[ 3.0 ms ] story [ 148 ms ] threadIf the objective of a landing page is to reach the largest audience possible in a sustainable, fast and efficient way, I wouldn't choose any SPA solution. And I must add that this comes from experience. For few years I did try to go the SPA way, with server side rendering, but the extra work and overheads are just not worth it.
IMHO, nothing beats static pages for landings.
I dunno. This means you're excluding people who disable JS from your audience. I'm going to stick out my neck a suggest that they're probably very few and very unlikely to spend money on your product (my bias)
> extra work and overheads are just not worth it.
I'd say the other way around, this tool will get you a fast, single page site in shorter time than it will take for you to decide which static site generator to use (I'm being facetious)
And once you get the hang of it, it takes less than 15 minutes.
The structure was something like this:
In `header.php` I used variables for the title, description, etc. and then in each page I specified the values for those variables. This way each page had the same header HTML code, but with a different title, description and so on.All my HTML is held in template .html files, with %%PLACEHOLDER%% text where the dynamic content should be, Then my index.php is the main 'app' loading in the templates to build the output, doing string replaces on the html, and then a single final 'echo' to send the result to the user at the end of the process.
I think this is called 'code behind' - I've just always had a problem with mixing code and layout in the same file.
Does anyone else do it like this?
https://twig.symfony.com/
You mentioned you don't want to do SPA+SSR. With static pre-rendering from Next.js, there isn't a SPA. It's a fully static site.
You also mentioned having multiple pages. Rather than dealing with React Router or other SPA approaches, Next has a `/pages` directory where each file nested inside maps to a route. So `pages/about.js` is /about. It's similar to PHP in that regard.
If you don't need CMS, then you don't need Wordpress. For hosting, I would recommend Zeit's Now. They're also the creators of Next.js, so the tech pairs well together.
It's as simple as `npx create-next-app` to make the app and then `now` to deploy.
https://nextjs.org/ https://zeit.co/home
You have nice static HTML pages with a CDN, super fast, and there's even a CMS option with NetlifyCMS, which works by creating git commits for you and then automatically pushes the new static version on Netlify. The basics in Netlify are free and there are nice add-ons where some are also free (e.g. forms).
Check out the template list here: https://templates.netlify.com
No, you just said you don't need a CMS.
I would hand edit the HTML and deploy it on Netlify with a Parcel build step, at least that's what I've done.
https://parceljs.org/
> I want it to be SEO optimized.It's a complex problem, it all boils down the template you use. I usually hunt hours for free HTML/CSS templates then get mad about them and create one from scratch using some CSS framework :)
These paid tools help focusing on the content and getting things done.
You might enjoy my blog post on how I host my personal website for free with Hugo and GitLab Pages: https://tkainrad.dev/posts/using-hugo-gitlab-pages-and-cloud...
I host my hugo sites on Azure Blob Storage for few cents (literally) per month.
This[0] is the issue that broke lots of themes. The fix was certainly an easy and small one but still a breaking change, and not the only one, in a minor version change; that should have been a major version change, if you want to use semver[1] as a convention you must respect it.
[0]: https://github.com/gohugoio/hugoThemes/issues/682 [1]: https://semver.org/
We are using Zola for two static sites.
[1] https://www.getzola.org
If you're not well versed with using Wordpress (like me) than there's 2 routes you can take:
Developer route: Use a static site generator. (not meant to be exhaustive)
- Gatsby: if you know React
- Hugo
- Jekyll: ruby
- simple HTML + CSS static website
Non Dev route: If you're not a developer, you could use one of the following paid tools:
- clickfunnels
- hubspot
- mailchimp
- leadpages
- unbounce
- and many more
If you're using a static site generator, it's really easy to host it on AWS Amplify Console for free.
Disclaimer: not associated with any of the above listing products
There's tons of themes available: https://www.jekyll-resources.com/
And hosting with Netlify maybe.
We've used it to build Rezi - https://rezi.io
I'm currently converting a site from static HTML to Gatsby because I got tired of having to copy-paste changes to repeating elements between the different pages. The Vue/React component approach works really well in that regard. And you don't lose out on the static element, nor the SEO.