求助,C大进来看看

指南Nan 2022-2-15 3603

nuxt如何编译feed文件

https://github.com/nuxt-community/feed-module

看了这个,没有用

最新回复 (24)
  • C 2022-2-15
    2

    这问题你问我也不懂骂了半个月vue,根本不想学,别说nuxt了……

  • yixianc 2022-2-15
    3

    "scripts": {

        "dev": "nuxt test/fixture",

        "generate": "nuxt generate test/fixture",

        "lint": "eslint --ext .js,.vue lib test",

        "test": "yarn lint && jest",

        "release": "yarn test && standard-version && git push --follow-tags && npm publish"

      }

    这几个你看哪个像。。。你就npm run ...加上就好了

  • yixianc 2022-2-15
    4

    怀疑是  npm run release    或者是  npm run generate

  • 指南Nan 2022-2-15
    5
    yixianc "scripts": { "dev": "nuxt test/fixture", "generate" ...

    不是,我是说nuxt.config.js咋写

  • yixianc 2022-2-15
    6
    Bug2021 不是,我是说nuxt.config.js咋写

    那就真的不知道了

  • C 2022-2-15
    7
    Bug2021 不是,我是说nuxt.config.js咋写

    按官方的写就能用吧,不过后端你用啥generator注意下。

    export default {
      // Global page headers: https://go.nuxtjs.dev/config-head
      head: {
        title: 'test',
        htmlAttrs: {
          lang: 'en'
        },
        meta: [
          { charset: 'utf-8' },
          { name: 'viewport', content: 'width=device-width, initial-scale=1' },
          { hid: 'description', name: 'description', content: '' },
          { name: 'format-detection', content: 'telephone=no' }
        ],
        link: [
          { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
        ]
      },
    
      // Global CSS: https://go.nuxtjs.dev/config-css
      css: [
        'element-ui/lib/theme-chalk/index.css'
      ],
    
      // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
      plugins: [
        '@/plugins/element-ui'
      ],
    
      // Auto import components: https://go.nuxtjs.dev/config-components
      components: true,
    
      // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
      buildModules: [
      ],
    
      // Modules: https://go.nuxtjs.dev/config-modules
      modules: [
        '@nuxtjs/feed'
      ],
    
      feed: [
        {
          path: '/feed.xml', // The route to your feed.
          async create(feed) {}, // The create function (see below)
          cacheTime: 1000 * 60 * 15, // How long should the feed be cached
          type: 'rss2', // Can be: rss2, atom1, json1
          data: ['Some additional data'] // Will be passed as 2nd argument to `create` function
        }
      ],
    
      // Build Configuration: https://go.nuxtjs.dev/config-build
      build: {
        transpile: [/^element-ui/],
      }
    }
    

    主要注意JSON里[]数组后面有没有逗号,另外就是版本问题。

    我用的NodeJS14,官网貌似是NuxtJS2,配置编辑后重新run一下。

  • 500 2022-2-15
    8

    没用过这个

    NUXT 升级3.0 和VUE3.0都没有用过,也没空去研究 哈哈哈

  • fsioi 2022-2-15
    9
    C 按官方的写就能用吧,不过后端你用啥generator注意下。 export default { // Global page headers: https://go.nuxtjs.dev/co ...

    C大,可以问问FUCK插件的问题嘛

    不生效,死活不出水印,测试各类大小的图片,各类后缀的图片.jpg png 都不出..

    url改成绝对地址也不出

  • fsioi 2022-2-15
    10
    C 按官方的写就能用吧,不过后端你用啥generator注意下。 export default { // Global page headers: https://go.nuxtjs.dev/co ...

    C大,是我设置出问题了吗,希望C大答复下

  • C 2022-2-15
    11
    fsioi C大,是我设置出问题了吗,希望C大答复下

    【上传】和【输出】两项设置都要写的,上传是哪些图片会经过前端压缩,输出是压缩后的格式。

    可以像本站这样设置,width和height是限制最大宽高的,不加的话保持原始尺寸。

    //【压缩】

    ////_*: 输出格式模板 对象键名任意

    ////width: 转换后最大宽度

    ////width:(undefined)||null||false 不限制

    ////height: 转换后最大高度

    ////height:(undefined)||null||false 不限制

    ////fill: 背景填充色

    ////fill:(undefined)||null||false 透明

    ////format:image/png||image/jpeg||image/webp 输出格式选项

    ////format:(undefined)||null||false image/png

    ////quality:<0.01-1> 压缩比例 输出格式image/png无视该项

    ////quality:(undefined)||null||false 0.9

    ////render:{} CanvasRenderingContext2D 渲染属性

    ////render:(undefined)||null||false 使用浏览器默认

    _png:{width:2048,height:2048,fill:null,format:"image/png",quality:0.9},

    _jpg:{width:2048,height:2048,fill:"#FFF",format:"image/jpeg",quality:0.9},

    _webp:{width:2048,height:2048,fill:null,format:"image/webp",quality:0.9},

    //【上传】

    ////png|jpg|bmp|ico|gif|webp: 指定格式设置

    ////normal: 常规输出使用哪个模板

    ////normal:(undefined)||null||false 使用脚本默认

    ////nowebp: 浏览器不支持webp输出时使用哪个模板

    ////nowebp:(undefined) 继承normal模板

    ////nowebp:null||false 不压缩直接输出

    ////animate: 图片检测到动画时使用哪个模板

    ////animate:(undefined) 继承normal模板

    ////animate:null||false 不压缩直接输出

    png:{normal:"_webp",nowebp:"_png",animate:false},

    jpg:{normal:"_webp",nowebp:"_jpg"},

    bmp:{normal:"_webp",nowebp:"_jpg"},

    ico:null,

    gif:{normal:"_webp",nowebp:"_jpg",animate:false},

    webp:{normal:"_webp",nowebp:"_png",animate:false},

  • fsioi 2022-2-15
    12
    C 【上传】和【输出】两项设置都要写的,上传是哪些图片会经过前端压缩,输出是压缩后的格式。 可以像本站这样设置,width和height是限制最大宽高的,不加的话保持原始尺寸。 //【压缩】 /// ...

    谢谢C大,出来了

  • fsioi 2022-2-16
    13
    C 【上传】和【输出】两项设置都要写的,上传是哪些图片会经过前端压缩,输出是压缩后的格式。 可以像本站这样设置,width和height是限制最大宽高的,不加的话保持原始尺寸。 //【压缩】 /// ...

    C大,再次求助(小声

    请问FUCK插件支持远程图片自动上传嘛,未来有希望增加吗?

  • C 2022-2-16
    14
    fsioi C大,再次求助(小声 请问FUCK插件支持远程图片自动上传嘛,未来有希望增加吗?

    不支持,远程图片指的是啥?

    七牛阿里那类当时没人赞助,所以也没考虑过写,其实改个接口就能传,但传上去的就没法在删帖时一块删除了。

    如果是FTP或者SSH远程的话做不了,没有相关技术支持,可以考虑在VPS挂载远程磁盘然后调用,也相当于传远程。

  • C 2022-2-16
    15
    fsioi C大,再次求助(小声 请问FUCK插件支持远程图片自动上传嘛,未来有希望增加吗?

    不过之前搞过一个Chevereto图床的外链脚本,挺好用的,所有基于它的图床都可以链,自建也可以。

    脚本我忘了扔哪了,机智库那有可以问问他。

    另外xiuno这么老的程序真的还要继续用吗,随时淘汰了。

    我们一直在考虑换掉屌丝的程序,只是一直没时间……

    • 屌丝论坛
      26