vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
11.33k stars 1.83k forks source link

Hero image don't get included in built website #3776

Closed kristoferlund closed 2 weeks ago

kristoferlund commented 2 weeks ago

Describe the bug

The hero image referenced below shows up as expected in development. When building the project, it is not included in the finished build.

hero:
  name: "C–ATTS"
  text: "Composite Attestations"
  tagline: Composite attestations are a new type of attestation combining data from multiple sources to form a unified and verifiable credential.
  actions:
    - theme: brand
      text: Composite Attestations?
      link: /docs
    - theme: alt
      text: GitHub
      link: https://github.com/c-atts
  image: /images/diagram.png

Reproduction

GitHub: https://github.com/c-atts/web

Live web: https://catts.run/

Expected behavior

The image should be included in the build and show up in the hero section on the index page.

System Info

System:
    OS: macOS 14.4
    CPU: (10) arm64 Apple M1 Pro
    Memory: 2.05 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
    pnpm: 8.15.4 - /opt/homebrew/bin/pnpm
    bun: 0.7.3 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 122.1.63.169
    Chrome: 123.0.6312.107
    Edge: 123.0.2420.81
    Safari: 17.4
  npmPackages:
    vitepress: ^1.1.0 => 1.1.0

Additional context

No response

Validations

brc-dd commented 2 weeks ago

You need to keep it in your public directory. https://github.com/vuejs/vitepress/issues/2422#issuecomment-1664116356

kristoferlund commented 2 weeks ago

Thanks! The fact that the images folder works during development creates a slightly confusing situation though.