First of all we need to install Nuxt.js
vue init nuxt-community/starter-template <project-name>
Then we have to follow instructions. Finally we need to install some additional packages:
module.exports = { | |
/* | |
Headers of the page | |
- Nuxt.js uses vue-meta to update the headers and html attributes of your application. | |
- Nuxt.js configures vue-meta with these options: | |
{ | |
keyName: 'head', // the component option name that vue-meta looks for meta info on. | |
attribute: 'data-n-head', // the attribute name vue-meta adds to the tags it observes | |
ssrAttribute: 'data-n-head-ssr', // the attribute name that lets vue-meta know that meta info has already been server-rendered | |
tagIDKeyName: 'hid' // the property name that vue-meta uses to determine whether to overwrite or append a tag |
$ sudo bash -c "$(curl -s https://gist.githubusercontent.com/zulhfreelancer/0b87a274686cb4d98b8144e116c5117c/raw)"
This script was inspired by this blog post - however I found the technique to be a little insufficient. Many thanks to Artem Butusov as I would not have been able to do this without his blog post.
This script is intended to be used with semantic-ui-react projects. If you are just using semantic-ui, then you may need to do some other troubleshooting... I don't know as I haven't tested. From what I can tell everything should work just fine.
This process is completely different from the one described in the blog post above. This script is intended to do everything for you - no manual copying or updating code is required. If you have already followed
const req = require.context('./components/', true, /\.(js|vue)$/i); | |
req.keys().map(key => { | |
const name = key.match(/\w+/)[0]; | |
return Vue.component(name, req(key)) | |
}); |
{ | |
"name": "project-name", | |
"description": "Template for static sites", | |
"version": "1.0.0", | |
"homepage": "http://www.project-name.com", | |
"author": { | |
"name": "Adam Reis", | |
"url": "http://adam.reis.nz" | |
}, | |
"license": "UNLICENSED", |
#!/bin/bash | |
# This script will automatically set up a single node Flynn Cluster on your linux box | |
# Fresh Flynn install with domain provided by the xip.io service | |
# Tested with Base Image: Ubuntu 14.04 x64 @ DigitalOcean droplet | |
# @date 16 Nov 2015 | |
# @author Edu Wass (eduwass at gmail com) | |
echo '---- START SETUP ----' |
This is an example of how to scaffold API endpoints to list / get / create / update / delete Posts in a Keystone website.
It's a modification of the default project created with the yo keystone
generator (see https://github.com/JedWatson/generator-keystone)
Gists don't let you specify full paths, so in the project structure the files would be:
routes-index.js --> /routes/index.js // modified to add the api endpoints
routes-api-posts.js --> /routes/api/posts.js // new file containing the Post API route controllers
Sign Up for an SSD cloud server or log in if you already have an account.
Click 'Create Droplet' to get your instance running
Select the specifications you wish to mine (16GB/8CPU) on as well as the latest Ubuntu x64 image (Ubuntu 13.10 x64).
Your username and password will be emailed to you within 55 seconds