Subdomain on github pages and using same hugo instance

Hi there,

I have a github repository that I want to add my hugo site to. From the docs folder I can run github pages.

I have changed my ouput dir to docs in hugo.

How do I get a subdomain on hugo that is generated into my docs folder that acts like a subdomain on github pages. I know I would need to use a CNAME and then tell it to say /docs/subdomain is actually subdomain.site.com

but I am not sure how to set that up in HUGO. and where do I put the folder? in the static folder like static/subdomain?

If so, can I use all the parameters and shortcodes in my static folder?

If I need to create to hugo installations is their a way to share site params, and static files and layout files etc… ?