Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect postType media url and path #783

Open
22mahmoud opened this issue Jan 19, 2025 · 0 comments
Open

Respect postType media url and path #783

22mahmoud opened this issue Jan 19, 2025 · 0 comments

Comments

@22mahmoud
Copy link

Hey,

When trying to use indiekit to save the media files alongside the markdown itself , I'm encountering an error that indicates a photo type is required. Could you clarify the role of the media property in the postType configuration?
and here is my config

  publication: {
    me: "https://maw.sh",
    enrichPostData: true,
    postTemplate: getPostTemplate,
    postTypes: {
      note: {
        name: "Thoughts",
        post: {
          path: "src/thoughts/{t}/index.md",
          url: "/thoughts/{t}",
        },
        media: {
          path: "src/thoughts/{t}/{filename}",
          url: "/thoughts/{t}/{filename}",
        },
      },
      article: {
        name: "Blog",
        post: {
          path: "src/blog/{slug}/index.md",
          url: "/blog/{slug}",
        },
        media: {
          path: "src/blog/{slug}/{filename}",
          url: "/blog/{slug}/filename",
        },
      },
    },
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant