I am trying to write my PhD Thesis with bookdown and am mainly using pdf output. I have easily added a bibliography at the end of the document but would rather have a biblio
For a latex-specific solution see this post, i.e. use the sectionbib option for natbib and load the chapterbib package. You will need to edit The bookdown template to set the required options for natbib and tell bookdown to use your custom template in the yaml. See this post for more info on the bookdown template.
I swear I saw instructions in the bookdown docs for doing this with gitbook format, but I can't seem to find it...
EDIT I went and looked at an old bookdown project of mine. For gitbook output, you specify the following in _output.yml:
bookdown::gitbook:
split_by: chapter
split_bib: yes
Which will (you guessed it) split the bibliography by chapter. I'm actually a bit surprised that bookdown doesn't support the equivalent options for bookdown::pdf_book yaml options, but should be easy enough to do by setting up sectionbib/chapterbib in the LaTeX preamble.