Giter Site home page Giter Site logo

Comments (9)

KiwiKilian avatar KiwiKilian commented on June 10, 2024 1

I've checked out your project and it also builds successfully on my machine. I think there are multiple problems in your GitHub actions setup and there might be a differnent 11ty version installed on CI than locally. First, please run npm install locally and commit the package-lock.json, I see a lot of changes when installing locally. I would recommend against using the eleventy action as it hasn't been updated in two years. A simple action would be:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'
      - run: npm ci
      - run: npm run build

from eleventy-plugin-og-image.

phoopee3 avatar phoopee3 commented on June 10, 2024 1

I was able to get it working, you are fantastic!

from eleventy-plugin-og-image.

KiwiKilian avatar KiwiKilian commented on June 10, 2024

Hard to tell without seeing more of the project. Is it public on GitHub?

from eleventy-plugin-og-image.

phoopee3 avatar phoopee3 commented on June 10, 2024

I have made the repo public, thank you so much for your help with this.

https://github.com/phoopee3/blog

In the src/_includes folde are the layouts for the site, there is the books.njk layout which calls the header-books.njk header that has the reference to ogImage in it. ogImage uses the template file in the same directory, named og-book.og.njk.

Again, this worked successfully locally, but not with the github action build.

from eleventy-plugin-og-image.

KiwiKilian avatar KiwiKilian commented on June 10, 2024

Will have a look later today! Did it work locally with the build command or only serve?

from eleventy-plugin-og-image.

phoopee3 avatar phoopee3 commented on June 10, 2024

That's a great question, I only tried it with serve, I will try it with build locally and see what happens.

from eleventy-plugin-og-image.

phoopee3 avatar phoopee3 commented on June 10, 2024

Yes, the build locally worked successfully.

from eleventy-plugin-og-image.

phoopee3 avatar phoopee3 commented on June 10, 2024

I tried moving the template to a different folder, so it's now in src/og-templates instead of _includes, but it's the same error during the build on github actions

from eleventy-plugin-og-image.

phoopee3 avatar phoopee3 commented on June 10, 2024

I will try this all and I appreciate your assistance!

from eleventy-plugin-og-image.

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.