konstantinmuenster / gatsby-theme-portfolio-minimal

A Gatsby Theme to create modern one-page portfolios with a clean yet expressive design.
MIT License
161 stars 90 forks source link

Using multiple of the same sections with different sessionIds shows incorrect content #21

Open willcode4food opened 2 years ago

willcode4food commented 2 years ago

Hi! Thank you so much for the theme. I haven't made a gatsby site in a while and the theming feature allows for a quick turnaround. I am having one issue however. I am using the AboutSection with multiple markdown files with unique filenames and section ids. However sometimes the pages with the AboutSection renders the incorrect piece of content. For example I have a file structure in the content folder like this

image

But the AboutSection component with a sectionId="safety" renders the about.md content. If I clear the cache it will sometimes render the correct content. This happens locally and on Netlify. Any help would be much appreciated. Thanks in advance.

willcode4food commented 2 years ago

Looking through the code now, it appears there's no filtering on sectionId. I guess I made an incorrect assumption that the sectionId would provide this type of behavior. This issue should really be a feature request.

konstantinmuenster commented 2 years ago

Hi @willcode4food and thanks for opening this issue! This could very well be the case - the use-case of adding the same section several times on a single page isn't 100% thought through at the moment 😄 I will take a look as soon as I can 🤞

enricoDec commented 1 year ago

Hi @willcode4food and thanks for opening this issue! This could very well be the case - the use-case of adding the same section several times on a single page isn't 100% thought through at the moment 😄 I will take a look as soon as I can 🤞

Actually run into the same problem, I tried using multiple AboutSections to separate Interests into different categories. Would be a nice addition in my opinion. Anyway, really cool project keep it up :)

rolas978 commented 1 year ago

Hello! I have the same issue as well. has there been any updates since @enricoDec posted? Thank you @konstantinmuenster for the amazing project!

konstantinmuenster commented 1 year ago

There hasn't been any change unfortunately. If someone wants to pick up this issue, I would love to have a PR for it 🙌

diiigle commented 1 year ago

Taking this on (at least for the Projects section) and will deliver a PR within the next days.

diiigle commented 1 year ago

The feature is ready for review!