GithubHelp home page GithubHelp logo

Comments (8)

claycarpenter avatar claycarpenter commented on July 23, 2024

This issue seems to have been fixed by my PR #5 .

If you want to give it a try on your site, you can use this command:

npm install --save-dev git://github.com/claycarpenter/metalsmith-browser-sync#active-check

from metalsmith-browser-sync.

franklinjavier avatar franklinjavier commented on July 23, 2024

@claycarpenter thanks, but... Am I missing something?

npm install --save-dev git://github.com/claycarpenter/metalsmith-browser-sync#active-check
zsh: no matches found: git://github.com/claycarpenter/metalsmith-browser-sync#active-check

from metalsmith-browser-sync.

franklinjavier avatar franklinjavier commented on July 23, 2024

Now it worked. I changed the contents manually and it worked.
I'll have repeat this process until our friend accepts your PR.
Thanks mate @claycarpenter

from metalsmith-browser-sync.

claycarpenter avatar claycarpenter commented on July 23, 2024

@franklinjavier great! I was just going to reply that I couldn't replicate the error and suggest you make the changes manually. Glad to hear it's working for you.

from metalsmith-browser-sync.

franklinjavier avatar franklinjavier commented on July 23, 2024

🍻

from metalsmith-browser-sync.

franklinjavier avatar franklinjavier commented on July 23, 2024

@claycarpenter every time I save a file, duplicates the quantity of posts.

from metalsmith-browser-sync.

claycarpenter avatar claycarpenter commented on July 23, 2024

@franklinjavier As far as I can tell right now, this looks like an issue with metalsmith-collections when it's run multiple times without a fresh Metalsmith build. It's late and I'm sleepy and stupid, but it looks like the ms-collections plugin adds the matching files it finds to the global (Metalsmith) metadata each time it's run.

I made a very quick hack that fixed the problem by clearing out the metadata.posts collection before each metalsmith-collections run. The "plugin" looks like this:

    .use(function (files, metalsmith, done) {
        var metadata = metalsmith.metadata();
        delete metadata.posts;
        done();
    })

And should be inserted before the metalsmith-collections plugin in the pipeline. I'm not saying this is a smart hack, but it should get you going for the time being.

Considering this issue probably isn't the fault of this metalsmith-browser-sync plugin, we should probably move the conversation over to your repo if you want to continue.

from metalsmith-browser-sync.

franklinjavier avatar franklinjavier commented on July 23, 2024

Thanks for the solution.

from metalsmith-browser-sync.

Related Issues (11)

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.