question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Confusion on sequence of operations to publish book online

See original GitHub issue

[disclaimer: I’m a total git newbie and this information might be very obvious to your other users. Apologies for stupid questions]

Is your feature request related to a problem? Please describe.

I’m a little confused on the order of steps required to host a book online, make local edits, and re-host it online. I understand first building the book locally (explained here), and then cloning an empty repository (step 3 here). Step 4 on the latter page is to copy the local files to the local repository. Step 5 is then to push those to the master branch of the remote repository. Cool. So far, I have two folders on my desktop, one called mylocalbook and one called myonlinebook.

Then we get to GitHub Pages (covered here). The first step is to run ghp-import -n -p -f mylocalbook/_build/html. My first question is what the current working directory should be when I run that command? When I run it from the desktop (the parent of /mylocalbook and /myonlinebook), I get an error stating fatal: 'origin' does not appear to be a git repository, which I think makes sense since Desktop is not a git repository. If I should first point the directory to myonlinebook, should I instead do something like ghp-import -n -p -f /Users/.../Desktop/mylocalbook/_build/html?

My second question is whether I should be doing steps 4 and 5 discussed above every time I re-build the book? My understanding is that ghp-import sends things from the local book to the online repository, so I don’t quite see why I would need to (though I’m probably missing something).

So to summarize:

  1. Should the cwd be myonlinebook (or whatever) when running ghp-import?
  2. Should I re-copy and re-push every time I re-build a book?

Thanks so much!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisjsewellcommented, Sep 3, 2020

Oh and btw there’s #888 coming soon

0reactions
dafriedman97commented, Sep 3, 2020

Awesome features! Thanks so much to you both.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is Publishing? The Seven Processes of Book Publishing
The three elements of commercial book publishing are: book making, books supply and book sales. These three elements encompass seven key ...
Read more >
The book publishing process - an 8-step guide
As a new author, the book publishing process can seem bewildering. How does your manuscript end up as a book? Here's a simple...
Read more >
How to Self Publish a Book - IngramSpark
Self-publishing is on the rise! Are you ready to publish a book, but not sure where to start? Learn how to self-publish a...
Read more >
How To Self-Publish A Book Without Overwhelm, Confusion ...
Free video series on writing your first book.
Read more >
Should You Self-Publish Your Book? 5 Essential Questions to ...
Maybe you want to become the next Sarah Dessen of YA fiction, or perhaps you created a series you know will rival the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found