Giter Site home page Giter Site logo

website-v2's Introduction


Website and documentation of Nuxt 2

We are using Docus to write our documentation (we plan to open source it in the following weeks once the documentation is ready).

Setup

git clone https://github.com/nuxt/website-v2.git
cd website-v2
npm install

We also recommend to install the Docus extension for VS Code.

Development

Start the development server on http://localhost:4000

yarn dev

The pages are generated from content/, you can start editing them to start helping us on documenting Nuxt 💚

License

Creative Commons License
Design materials for website by Nuxt project is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.
Based on a work at nuxt/website-v2.

website-v2's People

Contributors

alexchopin avatar atinux avatar aytdm avatar bdrtsky avatar clemcode avatar danielroe avatar danilhendrasr avatar dawntraoz avatar debs-obrien avatar despauxguillaume avatar farnabaz avatar febrihidayan avatar flosciante avatar geminii avatar inouetakuya avatar katakuranatsumi avatar kazupon avatar krutie avatar mannil avatar momokichi avatar nazarepiedady avatar nicodevs avatar oiagorodrigues avatar pi0 avatar rahaug avatar renovate[bot] avatar seongjin605 avatar smarroufin avatar syagawa avatar tahul 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  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  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

website-v2's Issues

License for the web site

I like this site's layout and integrations. but i can't find a license or limitation for public using.

Can I use this source for my open-source project web site?

how to add babel-polyfill to webpack entry nuxt

why i have to add babel-polyfill,my pc application only work in chrome and firefox,other like qq browser cannot load.i found that js file have a error,and some es6 still exist, my config is
build: {
babel: {
presets: ['es2015', 'stage-2'],
'plugins': ['transform-runtime']
},
extractCSS: true,
vendor: [
'babel-polyfill',
'eventsource-polyfill',
'swiper',
'axios'
]}

but after build i found nothing have change, tell my the right way,my application will online soon,i need your help really, thx

Nuxt Searching Woes

I enjoy working in the Nuxt framework and have transitioned to using it for client work with my team. In general, it's fantastic, with only a few obvious pain points (SSR with vendor libraries is a notable one).

However, I do want to complain about the choice of name. I get it; it's a play on NextJS from React, and it's humorous. However, trying to find Nuxt documentation or community examples is a nightmare because Next dominates the SEO. Virtually any time I try to find something for Nuxt, Google attempts to autocorrect to Next, and I end up writing +nuxt -next <my actual query any time I want to find something relevant.

Is there anything we can do to help with this in general? If not, would a name change be completely out of the realm of possibility? I don't imagine we're the only group out there facing this on a regular basis.

nuxt generate` with v-on:click

I was generating a simple project from nuxjs website. It works fine but when i added a button with v-on:click event.,in the generated one, the button doesn't work. It works with npm run dev.
Please help me out. Thanks
Below is my index.vue

<template>
  <section class="container">
    <div>
      <logo/>
      <h1 class="title">
        NUXT
      </h1>
      <h2 class="subtitle">
        Universal Vue.js Application
      </h2>
      <div class="links">
        <a href="https://nuxtjs.org/" target="_blank" class="button--green">Documentation</a>
        <a href="https://github.com/nuxt/nuxt.js" target="_blank" class="button--grey">Github</a>
      </div>
      <button @click="test('1231')"> testButton </button>
    </div>
  </section>
</template>

<script>
import Logo from '~components/Logo.vue'

export default {
  components: {
    Logo
  },
  methods: {
    test: function (val) {
      console.log(val)
    }
  }
}

Server Side Rendering for components called from layouts

Hello ! on my site (https://yineo.fr/), my right sidebar is a component called from layouts/default.vue

Because i don't want to call it in every page component.

So my sidebar with last articles is not server side rendered and google bot can not see it ( see picture below, the left one is what google bot see and probably index )

How can i have server side rendering for my "Sidebar" Component called from layouts/default.vue ( code below the picture ) ?
thanks !

capture d ecran 2017-08-12 a 04 24 47

<!-- main layout -->
<template>
  <div>
    <AppNavigation />
    <AppHeader/>
  
    <div class="container">
      <div class="columns">
  
        <div class="column is-two-thirds">
          <nuxt/>
        </div>
  
        <div class="column">
          <section class="section">
            <TwitterFollowMe/>
            <hr/>
            <h2 class="title is-2">Derniers billets</h2>
            <PostsSidebar :posts="posts" />
          </section>
        </div>
  
      </div>
    </div>
    <AppFooter />
  </div>
</template>

<script>
import AppHeader from '~/components/AppHeader'
import AppNavigation from '~/components/AppNavigation'
import AppFooter from '~/components/AppFooter'
import TwitterFollowMe from '~/components/TwitterFollowMe'
import PostsSidebar from '~/components/PostsSidebar'
import { getPosts } from '~/services/wpContentApi'

export default {
  components: { AppHeader, AppNavigation, AppFooter, TwitterFollowMe, PostsSidebar },
  data () {
    return {
      posts: []
    }
  },
  async created () {
    this.posts = await getPosts(20)
  }
}
</script>

How to support ie

my project in ie can not run

log said:

You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
webpack-hot-middleware's client requires EventSource to work. You should include a polyfill if you want to support this browser: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events#Tools
SCRIPT5022: [vuex] vuex requires a Promise polyfill in this browser.
vendor.bundle.js, 行44130 字符21

but,I don't kown the nustjs entry,where can I write

require("babel-polyfill");

FAQ - iOS Safari with phone number

Hi!
Now I'm working at commercial project with NuxtJS and I have met a very unhandy issue: site crashes at iOS Safari. I have spent several days trying to resolve this problem, and finally I have found the thing that broked down the whole site - it was a small phone number in the footer. What a suprise, mobile Safari turns all phone numbers it found into a link, like +7 (982) 536-50-77 renders into <a href="+7 (982) 536-50-77">+7 (982) 536-50-77</a>.

I even create an small and useless gist with componet for super lazy coders:
https://gist.github.com/queses/8b008a8b6f7b470cb0a8c5e1788d8c63

I believe it would be great, if you will create the FAQ topic with explanation of this very unoblivious problem.

With best regards!
Maxim Kobozev

Broken links when JS disabled

Great to see the doc online! Stumbled across a small issue which I think impacts SEO (and paranoïd users like myself):

Step by step

  1. Disable Javascript in browser
  2. Go to https://nuxtjs.org/
  3. Click any relative link (like "Get Started")

Currently

The "Get Started" link will send me to https://guide/installation, while other relative links have similar effects

Expected

Links should have the same URLs as when JS is enabled (aka "https://nuxtjs.org/guide/installation" for the case of "Get Started")

Dynamic Component

Want to load component based on request

Here is my page

<template>
<Component :is="currentView"/>
</template>
<script>
export default {
   data () {
        return {currentView: '~/components/' + this.$route.query.country + '/content.vue'}
   }
}
</script>

I don't know how to do, but from above you may get an idea

redirect? docs?

Hi there!
Is there a possibility to specify redirects in Nuxt?
And if there is, is there any documentation for it?

HTTPS redirection

Well, me again.

Looks like links were fixed in #1 but now they lead to a page without a trailing /, which triggers a redirection... in HTTP (not "S").

So basically, any link you click brings you to the HTTP website. Kind of sad I think.

how can i use local json

async asyncData ({ params }) { let { data } = await axios.get('~static/test.json') return data }

errmsg:
(node:4796) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: connect ECONNREFUSED 127.0.0.1:80

Code font

image

is rendered like:

image

Maybe a proper monospace font is needed like

image

Redirect to previous page

Hello,

I was wondering, how can I redirect to the previous page with e.g. the nuxt-link?

Greetings,

Cannot deploy to AWS Elastic Beanstalk

Hello!

I'm trying to deploy the dist folder and my package.json to an EB instante but it's not working, some weird errors are showing related to NodeJS.

In this EB instance I have been deploying this same website but with VueJS 2 without NuxtJS but now I'm trying to deploy with the new structure using NuxtJS.

Do you have any idea?

search bar placement error

Hi there
some error with changing language

ru.nuxtjs.org site headers is good - in one line
nuxtjs.org headers are bad, search bar is out of line, can`t change lang

problem at middleware

If i write wrong proxycheck-auth was executed 3362 times in one request

  • code & result

image

image

Vue components in node_modules are not compiled on server-side

I created a simple package named myp:
nuxt.config.js

{
  ...[omitted],
  plugins: ['~/plugins/sample.js']
}

plugins/sample.js

import HisPlugin from 'myp'
Vue.component('HisPlugin', HisPlugin)

node_modules/myp/package.json

{
  ...[omitted],
  "main": "test.vue"
}

node_modules/myp/test.vue

<template>
  <div class="my-plugin">
    It works!
  </div>
</template>
<style>
.my-plugin {
  font-size: 200%;
}
</style>

And the following error message:

C:\Users\Daniel\Desktop\ssrtest\node_modules\myp\test.vue:1
(function (exports, require, module, __filename, __dirname) { <template>
                                                              ^
SyntaxError: Unexpected token <
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)

This presumably comes from the server-side renderer, which does not recognize *.vue files. Is it possible to get the server-side renderer to recognize them?

Some libraries export .vue files, and it is the recommended approach by Evan You (https://forum-archive.vuejs.org/topic/1203/how-to-bundle-a-set-of-vue-components-efficiently/4)

Vuex store behaviour when push back button in the browser

I've found that when you go back (browser back button) you lost the variables stored in vuex store. This happens because the code that initialized the vuex store (from the backend) gets executed again so the store is restarted. The normal behaviour appears to be that the store remains the same when you go back, like how it works on simple html inputs. So the question is, is there any configuration to preserve the store after going back or it is a bug?

Regards

All /_nuxt/* files return 404 Not Found

Hi all,
I deployed my app in production , and start it using this command

pm2 start npm -- start

Nginx config for this app is

server_name MY_IP_ADDR;
location / {

 	 proxy_pass http://127.0.0.1:3000;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection 'upgrade';
              proxy_set_header Host $host;
              proxy_cache_bypass $http_upgrade;
 }

all is fine but i have this issue
all files under this uri #http://my-ip-addr/_nuxt/filename.[css|js], not found.
capture d ecran 2017-07-24 a 12 34 27

Contribution guide

As history showed Many people are making wrong issues here instead of nuxt.js main repo. So i suggest having a .github/ISSUE_TEMPLATE.md
like vue which shows a message when creating new Issues.

/CC @alexchopin @Atinux

How to add SSL to Nuxt

Hi guys
How to integrate https and nuxt?
I found several examples with express, https, etc, but doesn't work to me with nuxt.

This is my code
In the logs shows 'Started!' but doesn't shows in my navigator

const fs = require('fs')
const https = require('https')
const app = require('express')()
const port = process.env.PORT || 80
const Nuxt = require('nuxt')
const config = require('./nuxt.config.js')
const nuxt = new Nuxt(config)
let options = {
  key: fs.readFileSync('/etc/pki/tls/private/localhost.key'),
  cert: fs.readFileSync('/etc/pki/tls/certs/localhost.crt')
}
app.get('/sitemap.xml', require('./xml/sitemap.js'))
app.use(nuxt.render)
https.createServer(options, app).listen(port, '0.0.0.0', function () {
  console.log('Started!')
})

Thanks

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.