Skip to main content
All CollectionsAuthor HelpMarkdown and Markua
Does Leanpub's GitHub writing mode support submodules for resources? (No, sorry!)
Does Leanpub's GitHub writing mode support submodules for resources? (No, sorry!)

Keywords: GitHub, submodules, code

Leanpub Support avatar
Written by Leanpub Support
Updated over a month ago
Does Leanpub's GitHub writing mode support submodules for resources? (No, sorry!)

Sorry, no, we don't support GitHub submodules.

If you're writing a programming book, and you want a separate repo for the code to make it public (which is a good idea), what we recommend you do is write a two-line shell script which copies the code into the book folder in the appropriate place.

Essentially, it's just:
โ€‹

rm -rf /path/to/the/book/code/folder
cp -r /your/repo/path /path/to/the/book/code/folder


If you have any feedback or questions about this article, please email the Leanpub team about it at hello@leanpub.com!

If you have any questions or thoughts on writing and self-publishing with Leanpub, please join our global community of authors in our Authors Forum here!

Are you interested in self-publishing, and creating your first Leanpub book? Here are some quick tutorials for our most popular writing modes: http://help.leanpub.com/en/articles/3088382-quick-walkthroughs-for-getting-started-on-a-leanpub-book

Are you looking for great deals on Leanpub ebooks, ebook bundles, and courses? Sign up for our Weekly and Monthly newsletter sales here!

To learn about amazing new books and authors, subscribe to our YouTube channel here: https://www.youtube.com/leanpub.

You can also follow Leanpub in lots of other places!

Did this answer your question?