Gor98 posted a new question
nuxtent-module •
HI,
have an problem with redirect routes. How can I set different redirect rout for
different auth strategies in my nuxt.config.js
This is my config file.
auth: {
redirect: {
login: '/',
logout: '/',
callback: '/',
home: '/'
},
strategies: {
user: {
_scheme: 'local',
endpoints: {
login: { url: '/user/signin', method: 'post', propertyName: 'access_token' },
logout: { url: '/user/logout', method: 'get' },
user: { url: '/user/details', method: 'get', propertyName: 'user' }
},
tokenType: 'Bearer',
},
provider: {
_scheme: 'local',
endpoints: {
login: { url: '/provider/signin', method: 'post', propertyName: 'access_token' },
logout: { url: '/provider/logout', method: 'get' },
user: { url: '/provider/profile', method: 'get', propertyName: 'user' }
},
tokenType: 'Bearer',
},
},
},
Vector-SMG posted a new question
nuxtent-module •
chadananda posted a new question
nuxtent-module •
I've tried about every combination of versions of Nuxtent and Nuxt and Nuxtdown. They all work perfectly fine in development (with server-generated content) but the moment I try to nuxt generate
and deploy, I get a total fail.
Generally the issues are:
No post stubs or JSON content is generated in /dist
for the latest builds (including Nuxtdown)
Older versions of nuxt/nuxtent sometimes generate content -- but it does not work properly. Trying to open a generated post results in a 404 because the HTML stub cannot load its Nuxtent-generated JSON data file. It tries to load it the JSON with a wrong pathname, like postname..json
. (note the two dots)
sarahdayan posted a new question
nuxtent-module •
Hi!
I'm trying to add Nuxtent to my brand new Nuxt website, but having a hard time making it work. For now, I've created a page and set up the necessary configuration, but I'm consistently getting the following error when trying to access a page:
Here's what my configuration looks like:
/* ... */
modules: [ 'nuxtent'],
/* ... */
module.exports = {
content: [
[
'blog',
{
page: '/blog/_slug',
permalink: '/blog/:year/:month/:day/:slug',
isPost: true,
generate: ['get', 'getAll']
}
]
],
api: {
browserBaseURL: 'http://localhost:3000'
}
}
<template>
<section>
<div v-for="post in posts" :key="post.permalink">
<nuxt-link :to="post.permalink">
<h3>
{{ post.title }}
</h3>
</nuxt-link>
</div>
</section>
</template>
<script>
export default {
async asyncData({ app }) {
return {
posts: await app.$content('/blog').getAll()
}
}
}
</script>
<template>
<article>
<h2>
{{ post.title }}
</h2>
<p>
{{ post.date }}
</p>
<nuxtent-body :body="post.body" />
</article>
</template>
<script>
export default {
async asyncData({ app, route }) {
return {
post: await app.$content('/blog').get(route.path)
}
}
}
</script>
Whenever I try to access content-api/blog
, I successfully get a JSON representation of the content of my content/blog
folder:
[
{
"title":"Adding a Nuxtent-Powered Blog to My Nuxt Site",
"tags":"JavaScript, VueJS, Nuxt, Nuxtent",
"abstract":"In this post, I survey markdown blogging options for Vue and React, and briefly describe the process of adding a blog to my Nuxt site using the currently unmaintained Nuxtent module.",
"meta":{
"index":0,
"fileName":"2018-06-04-adding-a-blog-to-nuxt.md",
"section":"/",
"dirName":"/blog"
},
"date":"2018-06-04",
"path":"/blog/blog/2018/06/04/adding-a-blog-to-nuxt",
"permalink":"/blog/2018/06/04/adding-a-blog-to-nuxt",
"anchors":[
],
"body":"<p>Evan You, the creator of Vue, introduced <a href=\"https://vuepress.vuejs.org/\">VuePress</a> just a couple months ago. I was excited about the announcement because it seemed to be exactly what I was looking for at the time: a minimalist, optimized, content-first static site generator that trivializes the process of fusing together markdown assets with dynamic layouts and components. I read through the docs and tried it out.</p>\n"
}
]
Yet, when trying to access the permalink of above blog post (/blog/2018/06/04/adding-a-blog-to-nuxt
), I get the error I posted at the beginning. The error message isn't helpful, so I have no idea where it comes from and how to fix it.
Additionally, when I try to build by using nuxt generate
, either I get a 500 error, or the process timeouts after a while.
I'm using Nuxt v2.3.4 and Nuxtent v1.4.1.
What am I missing?
OfekA posted a new bug report
nuxtent-module •
https://github.com/OfekA/static-site-nuxt-issue
npm install
npm run generate
/careers
)package.json
to 2.3.4
or anything 2.3.x
and abovepackage-lock.json
file and the node-modules
foldernpm install
npm run generate
/careers
)Nuxtent pages to be generated just like in Nuxt 2.2.0 and below
Nuxtent pages are not generated
I've also posted the issue in the Nuxt Discord channel, @manniL checked the issue there and concluded that it is most likely related to Nuxtent and not Nuxt itself.
Would really appreciate some help here as this is the only thing blocking me from upgrading to Nuxt 2.3.x and above. Thanks in advance!
ptdev posted a new question
nuxtent-module •
Hi, is there anyway to get the content per section?
I'll try to explain my setup and what I'm asking.
Take, for example, the following structure:
content/en/ (configured as content folder on nuxtent)
content/en/something/
content/en/something/articleA
content/en/something/articleB
content/en/anotherthing/
content/en/anotherthing/articleX
content/en/anotherthing/articleY
content/de/ (also configured as content folder on nuxtent)
content/de/something/
content/de/something/articleA
content/de/something/articleB
content/de/anotherthing/
content/de/anotherthing/articleX
content/de/anotherthing/articleY
So, as you can see, nuxtent is configured with 2 content folders, one for /en/ and another for /de/. I'm using nuxt-i18n so the folders are named according to the language code and represent different languages.
So now If I call:
app.$content(app.i18n.locale).getAll()
I get all articles from folders "something" and "anotherthing". for the selected language.
My question is: Is there anyway to only get the contents for one folder? For example, something like the following (which doesn't work)
app.$content(app.i18n.locale).getAll('/something')
To only get the articles from inside the "something" folder/section on the current language?
I know I can workaround this by setting up nuxtent with a configuration for each of those language/subfolders combinations, but with X number of languages and then another Y number of sections/subfolders, the configuration will quickly become huge and I believe there's probably a better way to do this.
Any other suggestions that achieves the same result are also welcome of course.
Thank you.
brandonpittman posted a new bug report
nuxtent-module •
Add '@nuxtjs/axios' to nuxt.config.js
Should display content files
Can't find page
cesasol posted a new question
nuxtent-module •
This is a list of goals to meet before releasing a stable 3 version:
The following are the features that would be nice to have but are left for a future release 3.x
All of the previous features are open to discussion and may be expanded to fit more use cases.
sebstr1 posted a new question
nuxtent-module •
Hi! I really enjoy exploring both nuxt & nuxtent-module! I ran into an issue that I have a hard time figuring out. I use yarn generate on the production host (I use netlify) to generate the site, everything builds fine and goes live.
The problem: For example, I have a nuxt-link to content (blog post) /blog/first-blog
which is the perma-link https://www.mysite.com/blog/first-blog
(if you copy the link) for this particular content. If i click on it it results in an error:
```Failed to load https://mysite.com/_nuxt/content/blog/blog.first-blog.json: Redirect from 'https://mysite.com/nuxt/content/blog/blog.first-blog.json' to 'https://www.mysite.com/nuxt/content/blog/blog.first-blog.json' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.mysite.com' is therefore not allowed access.
However if I just copy paste the same link to the browsers url field and press enter, it works fine and displays my blogpost.
On my dev server `localhost:3000/content-api` does work but in production, `https://www.mysite.com/content-api` does not exist if I try to visit it, is it supposed to be this way since I use `yarn generate` to build the website?
content folder:
/content
/blog
2019-08-27-first-blog.md
/nyheter
2019-08-28-hello-news.md
nuxtent.config.js:
module.exports = {
content: [
['blog', {
page: '/blog/blogpost',
permalink: 'blog/:slug',
generate: [
'get',
'getAll'
]
}],
['nyheter', {
page: '/nyheter/newspost',
permalink: '/nyheter/:slug',
generate: [
'get',
'getAll'
]
}],
],
api: {
baseURL: 'http://localhost:3000',
browserBaseURL: 'https://mysite.com'
}
}
```
Appreciate any input I can get on this :) I feel like I have read everywhere but did not find anything that could fix this issue.
cesasol posted a new bug report
nuxtent-module •
Run yarn dev and using markdown components
Run without problems, even in threaded mode
There is a weird message when using nuxt-edge that appears when runing in dev mode complaining about not finding a markdown module. This breaks threaded mode
BereSoto posted a new bug report
nuxtent-module •
Just to work without index or to display an informative error that either of those options are needed (index or same name)
throws a "Atributes not found"
renestalder posted a new bug report
nuxtent-module •
VIsit https://nuxtent.now.sh/
Online documentation to be available.
Getting 402 payment required
renestalder posted a new question
nuxtent-module •
Is the nuxtent-module supposed to generate static pages with nuxt generate
? Or do I still have to manually configuration this in nuxt?
Based on the documentation, nuxtent-module should generate static pages.
I have a configuration like this:
module.exports = {
api: {
baseURL: process.env.NODE_ENV === 'production'
? 'http://myproductionsite.com'
: 'http://localhost:3000'
},
content: {
page: '/_page',
permalink: ':slug',
isPost: false
}
}
A _page.vue
file along with an index.vue
file in the pages folder and a bunch of markdown files in the content folder directly.
In development mode, everything works fine. But the output of nuxt generate
does not create any other HTML files except index.html
. The pages are only available in .js
file format.
So just before I search for any error I want to make sure, I have the correct expectations of the nuxtent-module.
fredDesign posted a new question
nuxtent-module •
Hi,
I'm getting the following error on run dev
This dependency was not found:
mgrandl posted a new question
nuxtent-module •
My posts look like this
['posts', {
page: '/posts/_slug',
permalink: '/:year/:month/:day/:slug',
isPost: true,
generate: ['get', 'getAll']
}]
Now I want my permalinks not to look like this /2018/05/28/2018-05-28-lorem-ipsum
but instead like this /2018/05/28/lorem-ipsum
how do I make this happen?
cschroeter posted a new bug report
nuxtent-module •
https://github.com/nuxt-community/nuxtent-module/tree/master/examples/sitemap
Checkout sitemap example project, yarn && yarn generate
A generated sitemap.xml
Error: connect ECONNREFUSED 127.0.0.1:3000
bin4ryio posted a new question
nuxtent-module •
Hi there, I'm using the versions as shown below. Whenever I access the pages that has get()
or getAll()
, my nuxt will fall into infinite loading.
package.json
"dependencies": {
"nuxtent": "^1.4.1",
"nuxt": "latest",
"@nuxtjs/axios": "latest"
},
components
export default {
asyncData: async ({ app, route, payload }) => ({
post: payload || (await app.$content("/").getAll())
})
};
console
nuxt:render Rendering url /? +2ms
nuxt:render Rendering url /? +1ms
nuxt:render Rendering url /? +3ms
nuxt:render Rendering url /? +1ms
nuxt:render Rendering url /? +3ms
nuxt:render Rendering url /? +1ms
nuxt:render Rendering url /? +3ms
nuxt:render Rendering url /? +1ms
P/S: I'm using Mac OS X, but I'm sure there are no .DS_Store hanging around project folder.
mocheaz posted a new question
nuxtent-module •
ekoeryanto posted a new feature request
nuxtent-module •
it solve big data in a blog list
front-matter
change to gray-matter
that already has excerpt option
ekoeryanto posted a new question
nuxtent-module •
Halo, is there a plan to use gray-matter instead of front-matter as it feature is promising?