It will depend on what you want to display.
As I told you, you have to duplicate content, and store ID.
So you can create a node "all" in your posts, and with firebase you can only query the last 100 items.
For the category you can only store ID.
Does it make sense ? Take some readings about NoSQL concepts.