Giter VIP home page Giter VIP logo

jam-nuxt-netlify's Introduction

My personal webpage with blog

Netlify Status

A Nuxt.js static website with a blog

Features

  • Nuxt.js Static Site Generation for easy hosting.
  • Netlify CMS on /admin to modify the posts.
  • Nuxtdown to compile the blogpost pages from each Markdown files in /content/blog/.
  • Netlify compilation on each commit, with automatic deployment to their CDN (once you finish all the steps).

Getting started

Check out this guide for a more thorough reading, or jump straight ahead for more concise instructions.

What's needed

  • Github account
  • Netlify account
  • Vue/Nuxt understanding

Fork the repo

Using your Github account, go ahead and click here to fork the repo or just clone it.

Build Setup

Install all the dependencies

npm i

Now, you can run the code in development with:

npm run dev

This will serve your page in localhost:3000 with hot reload.

Once you're ready to generate your static assets for production:

npm run generate

This will create a /dist folder with the assets. This folder is not committed.
This is what Netlify will be building on their server, and then uploading the results to their CDN.

Configure your repo

Netlify CMS

  • Define your fields and files for your content.
  • Go to static/admin/config.yml.
  • Check the Netlify CMS Documentation.
  • Also, while your local server is running, you can access localhost:3000/admin/ to modify the content of your blog. You can also do it once it's deployed.

Routes

  • Nuxt will build every page inside of the /pages directory, but the _blogpost.vue is a special file, thats handled by Nuxtdown.
  • In this case:
    • index.vue: It's the / route, will be compiled once.
    • _blogpost.vue: For each blog post, gets compiled once for each .md in the content/blog/ directory.
  • Configure Nuxtdown in: nuxtdown.config.js.
  • Check the Nuxtdown Documentation.

The rest of the site

  • It's a regular Vue + Nuxt app.
  • The code is commented to try to assist anyone in modifying the views.
  • Configure Nuxt in: nuxt.config.js.
  • Check the Vue.js and Nuxt.js documentation.

I'm ready, now what?

If you run npm run dev and you like what you see, you're ready to deploy to Netlify!

Go to Netlify

  • Go to Netlify
  • Choose Github and authorize Netlify, if you haven't already
  • Choose this repo
  • Leave the settings as they are and click on Deploy Site

You're done!

Now, with every commit you do, Netlify will compile your site with npm run generate and deploy it on their CDN.

Issues

If you have any problems implementing this, please don't hesitate and create a Github Issue or send me a tweet.

Built with

Hosted in

jam-nuxt-netlify's People

Contributors

israelmuca avatar atinux avatar alexchopin avatar renestalder avatar tabrizian avatar nicopennec avatar ekoeryanto avatar pi0 avatar antoine-brezillon avatar wulthan avatar buhrmi avatar skasi avatar sewede avatar matt123miller avatar limichange avatar lmj0011 avatar potato4d avatar phantompepper avatar danielpost avatar

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.