datopian / flowershow

💐 Publish your obsidian digital garden or any markdown site easily and elegantly.
https://flowershow.app/
MIT License
815 stars 99 forks source link

Tutorial: Custom page types and layouts #427

Open olayway opened 1 year ago

olayway commented 1 year ago

This is the tutorial subject that won in our latest Discord poll.

image

Acceptance

Notes

PhilippeduPreez commented 1 year ago

@khalilcodes @olayway I assume when a user wants to create a custom layout, they have to do that outside .flowershow and create a symlink in eg. .flowershow/layouts/custom , otherwise if they want to upgrade flowershow by reinstalling with npx flowershow@latest install , they will lose their custom components.

Creating a custom layout component in .flowershow/layouts seems to work as expected when used. But I am getting an error when trying to use a symlinked layout component like the error below:

image

So just using a non symlinked component for the tutorial for now

olayway commented 1 year ago

@PhilippeduPreez I think for now it's ok to add the custom layout to .flowershow/layouts. The user will have to mess around with .flowershow/contentlayer.config.ts file anyway. We'll worry about the upgradeability problem later on.

olayway commented 1 year ago

@PhilippeduPreez I've also created this issue about warning users about potentially losing custom stuff after re-running install command #444

olayway commented 1 year ago

@PhilippeduPreez let me know if you need any help with the copy! 😊