Giter Site home page Giter Site logo

Comments (7)

hjvedvik avatar hjvedvik commented on May 22, 2024 2

Gridsome v0.2 was just published. It allows you to have a /static folder with files which will be copied to the /dist folder. Hope that solves your issue.

from gridsome.

hjvedvik avatar hjvedvik commented on May 22, 2024

Thank you! You can have a static folder in the next update. Will publish it within a few days.

from gridsome.

stursby avatar stursby commented on May 22, 2024

@hjvedvik Awesome! Thank you very much. I'm going to close for now as this should solve my issue. Thanks!

from gridsome.

cdvillard avatar cdvillard commented on May 22, 2024

A question about the use of the static folder: Is this just meant for specific files and not assets such as styles? I can't link to anything in the static folder using g-image or g-link, and Gridsome seems to break at the thought of accessing it for anything at compile time.

from gridsome.

u12206050 avatar u12206050 commented on May 22, 2024

@cdvillard Think of the static folder as a place where you can put pdf documents or any other resource that you only need access to once the site is built. Any resource you want Gridsome to have access to should be in your src/assets directory

from gridsome.

gustawdaniel avatar gustawdaniel commented on May 22, 2024

It does not works. Please example or documentation.

from gridsome.

pierrejoye avatar pierrejoye commented on May 22, 2024

The static folder in the root directory of your project seems to only support only one level. Adding f.e.

  • static
    • myimg1.png
    • images
      - myimg2.png

myimg1.png will be accessible at /myimg1.png
mypng2.png will not be avaible at all using /images/myimg2.png

Also the src/assets directory fails on me, not matter if I use sub folders or not. Digging the code :)

from gridsome.

Related Issues (20)

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.