Activities

shuyanzi

shuyanzi posted a new question

modules •

query参数有什么用?

what's the following params means?

pageTracking: false,
pageViewEventName: 'nuxtRoute',
respectDoNotTrack: false,
query: {
// query params…
gtmauth: '…', gtmpreview: '…',
gtmcookieswin: '…'
},

Jones-S

Jones-S resolved the question #c170

modules •

Google Tag Manager – Track only with Opt-In

Indeed it was because I had to use actual cookies.
Then it should work.
Also it was necessary to push an event manually which the module normally does on each routechange. (I just trigger it as soon as the user opts-in)

Jones-S

Jones-S posted a new question

modules •

Google Tag Manager – Track only with Opt-In

I want to only track page views when the user opts-in.
I have an opt-in button that sets a localStorage cookie cookie:accepted to true.

Now I want to use my trigger nuxtRoute only to be triggered if that cookie is set to true.

So my trigger has this rule:
Screenshot 2019-10-09 at 14 55 29

Where the referenced variable looks like this:
Screenshot 2019-10-09 at 14 58 43

But still my nuxtRoute trigger appears in the debug bar all the time.
Screenshot 2019-10-09 at 15 00 36

Is this because I use localStorage instead of a cookie?
Or is this the wrong approach to handle this?

I would be really glad if somebody could elaborate a bit how this module is actually used…

Thank you in advance.

AlexZd

AlexZd posted a new question

modules •

Brackets rendering does not work

When I'm trying to render MD as following:

<div class="md" v-html="$md.render('Hello World! ~~olo~~ **test**')">
</div>

It is working fine, but my eslint is complaining about XSS attack, I know I can add command to ignore but not sure that it is proper way. So i tried to do like:

<div class="md">
   {{ $md.render("Hello World! ~~olo~~ **test**") }}
</div>

But in this case it is showing just html string:

<p>Hello World! <s>olo</s> <strong>test</strong></p>

My config:

markdownit: {
    linkify: true,
    breaks: true,
    injected: true
}

Is there way to avoid using v-html and use brackets instead?

Zsavajji

Zsavajji posted a new question

modules •

Tag Manager module - release

Hi!
Are there any plans to update the npm release of the tag-manager module to include the latest pull request?
I'm gonna need that for a project soon :)

Thanks!

sabutai

sabutai posted a new question

modules •

[toast] how use toast in Vuex?

I want to fire up toast after I get an Axios response in vuex actions.
action for example:
deletePage: async (context, payload) => {
await axios
.delete(blah-blah-blah/Page/${payload})
.then((response) => {
if (response.status === 200) {
this.$toast.global.deletePage();
context.commit('deletePage', payload);
}
})
.catch(err => {
console.log(err);
})
.finally();
}
in this case I'm get TypeError: "_this is undefined"

What should I do?

inweid

inweid posted a new question

modules •

webvisor does not work in yandex.metrika

hi!

Subject: https://github.com/nuxt/nuxt.js/issues/6413

Steps to reproduce
include to the project https://github.com/nuxt-community/modules/tree/master/packages/yandex-metrika

What is actually happening?
webvisor is not vorked

jpsc

jpsc posted a new feature request

modules •

idea Critical CSS Module

What problem does this feature solve?

The short version:
Improve First Contentful Paint

The longer version:
No matter how much you optimize your css size (hint: purgeCSS) you will most likely load too much for the screen you are showing.
Critical CSS module would help with optimizing the loading of your styles without blocking the page render.
This link explains clearly the benefits.

What does the proposed changes look like?

We can use either criticalCSS or critical on the module and add a module to nuxt.config (only on production) that would generate the critical inline css and append it to the page.
We can then load the remaning css async. This should only work if extractCSS is active.

VarghaSabee

VarghaSabee posted a new question

modules •

@nuxtjs/google-tag-manager TypeError: The 'request' argument must be string. Received type object

I have this error. I cant add id to google-tag-manager module
Capture

After reinstall the module !Solved!

KO-Good-code

KO-Good-code posted a new question

modules •

Failure to use

I can't find the markdown-it-div module by installing the error message according to your document

the1nikola

the1nikola posted a new question

modules •

Markdown-it: How to avoid parent div duplication and still add .class on all instances?

Hi,
I'm only starting out with vue and nuxt so pardon me if I'm asking something too basic or impossible.
How to avoid parent div duplication and still add an id or class on all instances? (For static site generation)

<section id="hello">
  <p>Hi Tony!</p>
</section>

Following example usage on nuxtjs/markdownit:

  1. using .vue - produces a single <section> parent, but don't know how to avoid writing the dread that is <hello id="hello" /> every time.
  2. using .md - duplicates parent div, result is <div id="hello"><section>....
  3. using $md to render - same as above.

Constraints (?)

I don't want to use scoped styling because I would be targeting p and img elements (and that would be bad I believe). Moreover, I'd like to have those elements navigable with example.com#id. Ofc, p and img are generally styled elsewhere, but I still want to adjust their positions on a per section basis.

markdown-it-attrs doesn't solve my problems because it adds classes to specific children elements and not to the parent section. Likewise with markdownit-container.

I guess what I want is not available from what I see on markdown-it-loader line 35 return '<section>' + html + '</section>\n' and not something like return '<section :attrs>' + html + '</section>\n'


Ideally, I would like a way to say

<template>
  <hello />

<style>
  #hello
    // available both in component and here

with hello.vue being e.g. (since there is no parent el available)

<template lang="md" id="hello">
  Hi {{ name }}!
</template>

or (still great but a bit less clean and less functional)

<template>
  <md id="hello" src='~/path/to/some/MD' />
  // in which md.vue component is e.g. a factory or translator taking the path to .md and importing it for the main file

<style>
  #hello
    // only available in here
    // (though md can possibly be extended with style later)

Thanks!

renovate[bot]

renovate[bot] posted a new question

modules •

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (@nuxtjs)

incompletude

incompletude posted a new feature request

modules •

idea Font Awesome proper documentation

What problem does this feature solve?

Efficiency when using this package.

What does the proposed changes look like?

https://github.com/nuxt-community/modules/tree/master/packages/font-awesome

Can the following be added to the documentation:

Are additional packages necessary?
Example usage?
Additional configuration?

Thx

incompletude

incompletude posted a new question

modules •

Font Awesome

https://github.com/nuxt-community/modules/tree/master/packages/font-awesome

How can I use this properly? Are additional packages necessary? Can the documentation be more clear?

Youhan

Youhan posted a new question

modules •

[@nuxtjs/localtunnel] Is localtunnel.me down!?

Is localtunnel.me down!?

I run the yarn dev and it keeps reconnecting to localtunnel
I also tried to use it manually

$ lt --port 3000
tunnel server offline: read ECONNRESET, retry 1s
tunnel server offline: read ECONNRESET, retry 1s
tunnel server offline: read ECONNRESET, retry 1s
chiboreache

chiboreache posted a new question

modules •

OpenCV.js module

How it make properly?

I have a working example in Vue environment https://github.com/greenpdx/opencv-vue

so it looks pretty simple, just add npm i opencv.js into your project

and then

import * as cv from 'opencv.js'
Vue.prototype.$cv = cv

so after it we can use $cv globally in our project

but main question — is how to implement it in Nuxt.js ?

syffs

syffs posted a new feature request

modules •

idea google-tag-manager consent opt-out

What problem does this feature solve?

I haven't found any related info or guideline, so this could be only documentation related.

This is needed for european gdpr compliance

What does the proposed changes look like?

allow to disable gtm somehow, or disable it by default, and allow to enable it on opt-in

adamkhan

adamkhan posted a new bug report

modules •

bug @nuxtjs/markdownit not parsing HTML tags

Version

1.2.3

Reproduction link

https://codesandbox.io/s/l780y229q7?fontsize=14

Steps to reproduce

Install @nuxtjs/markdownit, follow the instructions to inject text as laid out in its README, and include some HTML in the markdowned text.

What is expected ?

Markdownit will parse HTML.

What is actually happening?

HTML tags are rendered literalIy, at least, the ones I have in my text, namely span and cite.

adamkhan

adamkhan posted a new question

modules •

delete me

delete me

waghcwb

waghcwb posted a new question

modules •

@nuxtjs/google-tag-manager - Add debug option

It would be nice if we have a option to enable/disable the debug mode instead of turning NODE_ENV to production.