Live data from Hacker News

Ask HN: Best way to create a landing page?

news.ycombinator.com

1–10 of 65 posts

Ask HN: Best way to create a landing page?

#1
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?

Re: Ask HN: Best way to create a landing page?

#4
In a somewhat similar situation I used PHP with `include`.

The structure was something like this:

  - index.php
  - header.php
  - sidebar.php
  - footer.php
  - page-1.php
  - page-2.php
  ...
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.

Re: Ask HN: Best way to create a landing page?

#8
post #7

If you already know and you're familiar with Vue, why don't you use Nuxt.js? You can generate a SPA or a PWA if you don't want to have the SSR version.

Yeah good question, maybe it feels overkill. I also found Gridsome which also looks very interesting

I’ve found for small sites, building a vue SPA and using react-snap to generate the pre-rendered static pages works great, and cut out a lot of the overhead I felt with gridsome.

Re: Ask HN: Best way to create a landing page?

#9
Personally, I would use Next.js. It allows you have dynamic pages (e.g. your app) alongside static pages (e.g. landing page). Since it's server-side rendered, it's great for SEO.

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

Post reply on HN