Skip to content

Rendering one type of data file in different ways #605

Closed
@ejulen

Description

@ejulen

Say I have two types of content, blog posts and articles, that both are written using JSON. They live in separate parts of the directory structure and need to be rendered completely differently. How would you do this in Gatsby?

Might just be that I'm misunderstanding something here, but it looks to me like, due to the wrapper concept, that I'll have to differentiate between blog posts and articles in the JSON wrapper by analysing the current route, since I don't want to wrap them in exactly the same way. Am I wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions