Wiki
Wiki copied to clipboard
Displaying recipes
Description
It could be helpful to display recipes on wiki pages. Some people may enjoy having the option to browse recipes online. People like images, and internal linking can only be a positive thing.
This would mean displaying each ingredient in a grid, with a link to the wiki pages for these ingredients.
Github wikis don't support custom CSS or transclusion, and I'm going to try to work with these limitations. So, the simplest way to achieve this would probably be to use Markdown tables. Take the Lumber Axe recipe for instance:
## Obtaining
### [Magic Workbench](https://github.com/TheBusyBiscuit/Slimefun4/wiki/Magic-Workbench)
| <a href="https://github.com/TheBusyBiscuit/Slimefun4/wiki/Synthetic-Diamond"><img alt="Synthetic Diamond" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-diamond-x32.png" /></a> | <a href="https://github.com/TheBusyBiscuit/Slimefun4/wiki/Synthetic-Diamond"><img alt="Synthetic Diamond" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-diamond-x32.png" /></a> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> |
| --- | --- | --- | --- | --- |
| <a href="https://github.com/TheBusyBiscuit/Slimefun4/wiki/Synthetic-Emerald"><img alt="Synthetic Emerald" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-emerald-x32.png" /></a> | <a href="https://github.com/TheBusyBiscuit/Slimefun4/wiki/Gilded-Iron"><img alt="Gilded Iron" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-gold-ingot-x32.png" /></a> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> | <img alt="Output arrow" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-output-arrow-x32.png" /> | <a href="https://github.com/TheBusyBiscuit/Slimefun4/wiki/Lumber-Axe"><img alt="Lumber Axe" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-diamond-axe-x32.png" /></a> |
| <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> | <a href="https://github.com/TheBusyBiscuit/Slimefun4/wiki/Gilded-Iron"><img alt="Gilded Iron" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-gold-ingot-x32.png" /></a> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> | <img alt="Empty slot" src="https://raw.githubusercontent.com/pentabulge/Slimefun4-Wiki/recipes/images/item-empty-x32.png" /> |
gives:
Obtaining
Magic Workbench
![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
But I can think of a few issues with this:
- This could potentially increase the workload, since you'd have to update or add recipes as the plugin evolves.
- Even in its simplest form, it seems difficult to work with if you're a newcomer.
To be fair, though, the plugin is constantly evolving anyway, and info which is true today might be outdated tomorrow.
As for 2, I was thinking of maybe having some sort of online tool that'd generate the recipe code for you, and then you'd just have to copy and paste it under the right section. After all, the structure should always be the same, with only attributes changing.
With all this in mind, is this is worth looking into? Can you think of a simpler way to do it within Github's limitations? Please share your thoughts and ideas.
Mmmh, having a good way to write recipes would be good. If this was in node then there could have been a way to define recipes which gets parsed. I was talking about this on Discord a month or so ago. Just something where you can see the items in a crafting table with the result, can hover over them and see the whole item (name, lore). Maybe also clicking on the item to see how that is made. Basically a SF guide in web.
Cookie worked on something for images/recipes a bit ago (https://github.com/TheBusyBiscuit/minecraft-svg) but not looked into it much.
Yeah, a SF web guide would be really handy! It would probably be easier to set up as a separate project, but I think it'd still be great to be able to display recipes on the wiki.
Sorry if this is necroposting, but we could use minecraft.gamepedia.com crafting template (with the lua module crafting which is needed as well). Only issue is that if the items that can be made using slimefun have different textures and name we would have to edit the crafting module. And also the lua module has a bunch of other lua module dependencies. and dependencies of dependencies.
Maybe it's a bad idea, but I could try to add an image API for my website, so the final image URL will be like
https://itsthesky.info/sf/?recipe=iron_ingot,null,null,null,null,null,null,iron_ingot,null&result=diamond
I'll ble able to manage back end after that, so the wiki will just load one image.
What do you think about it?





