Giter Club home page Giter Club logo

nuxt-netlify-lambda-starter's Introduction

nuxt-netlify-lambda-starter

๐Ÿ› ๏ธ SEO-friendly website starter backed by Netlify lambda functions in a simple, friendly repo

This is a basic starter project for a prerendered Vue.js + Nuxt.js frontend with a Netlify lambda function backend. The Nuxt.js app is pre-rendered for improved SEO.

Features

NOTE: this project can only be deployed via Netlify with continuous deployment enabled.

Build Setup

# Install dependencies
$ yarn install

# Serve with hot reload at localhost:3000 and serves Netlify Functions
$ yarn run dev

# Build for production
$ yarn run build

Note that Prettier will automatically clean up your code when you save. You can adjust this behavior in the build section at line 127 in nuxt.config.js.

Pre-rendered Dynamic Pages

This project includes a series of pre-rendered pages using a generic Item datatype. The data for these pages is maintained in assets/content/items.json and they're generated with a custom generate field in nuxt.config.js:

generate: {
  routes: items.map(g => '/items/' + g.id)
}

This ensures that each item has a page that's pre-renderd and SEO-optimized. You can clone, modify, or remove the Item datatype and associated pages to better suit your needs.

Environment Configuration

The following production environment variables are required for the respective plugins to work correctly:

# Google Analytics Tracking Code
GA_TRACKING_ID=UA-XXX-X

# HotJar Site Identifier
HOTJAR_SITE_ID=1234567

# Mailchimp Script Variables
MAILCHIMP_BASE_URL=mc.us19.list-manage.com
MAILCHIMP_LID=abcde12345
MAILCHIMP_UUID=aabbccddeeffgghhiijj12345

These variables can be configured in a variety of ways - please consult the Netlify Continuous Deployment Docs. You can deactivate any of these plugins by modifying the plugins field in the nuxt.config.js file.

JSON-LD Structured Data

The JSON-LD Structured Data can be updated by modifying the jsonld() function in the layouts/default.vue file. This feature shouldn't be used anywhere else - one JSON-LD snippet should describe the entire site.

OpenGraph and Twitter Card Meta Tags

The <meta> tags for OpenGraph and Twitter Cards are located in the head section of nuxt.config.js. You should change these from their default values. You can validate your changes using the Twitter Card Validator and the Facebook Sharing Debugger.

Bootstrap + SASS Configuration

You can modify the assets/sass/main.sass file to optionally include Bootstrap component styles as-needed. PROTIP - only include the Bootstrap components your app depends on - this will keep your CSS bundle nice and slim :)

You can also modify any of Bootstrap's SASS Variables inside the assets/sass/variables.sass file to customize the framework to your liking.

FontAwesome Vue Configuration

The repo includes a minimal subset of icons by default. When you need an additional icon, you must import it directly in plugins/fontawesome.js and register it with the FontAwesome plugin. You can learn more about the Vue-FontAwesome library here.

References

nuxt-netlify-lambda-starter's People

Contributors

aeksco avatar zachheine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nuxt-netlify-lambda-starter's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.