New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include gh-import source in MkDocs to solve windows path issues. #547
Comments
Not really, there is very little to it. What happens when you run |
It shows deploy successful but doesn't show up in GitHub On Sat, May 23, 2015 at 2:14 PM, Dougal Matthews notifications@github.com
|
What URL does the go and display? What repo is it? Send over as many details as you can. |
@collizo4sky has a point. There are absolutely no instructions anywhere for how to use ghp-deploy. For example, he could be missing any of the following (which I agree all seem obvious because I know how it works--but to a newcomer, maybe not so much):
That's it. The deploy command will build the docs, commit them to the gh-pages branch, and push the gh-pages branch to Github for you all in one step. It is important to note that "You should never edit files in your gh-pages branch by hand if you're using this script because you will lose your work." That last sentence was taken directly from the docs for the ghp-import tool, which mkdocs uses under the hood. And while ghp-import does not push by default, mkdocs ghp-deploy does (and in fact the default behavior cannot be overridden--which may or may not be a good idea). |
I totally was doing this wrong.What I did was,* checkout the gh-branch* copy the content of the site folder to the local branch* run gh-deployThank you for taking time to explain.I will give it a try and get back to you. From: Waylan LimbergSent: Sunday, 24 May 2015 3:44 AMTo: mkdocs/mkdocsReply To: mkdocs/mkdocsCc: Agbonghama CollinsSubject: Re: [mkdocs] Is there a guide to using gh-deploy ? can't get it to work (#547)@collizo4sky has a point. There are absolutely no instructions anywhere for how to use ghp-deploy. For example, he could be missing any of the following (which I agree all seem obvious because I know how it works--but to a newcomer, maybe not so much): Clone the relevant repo from Github That's it. The deploy command will build the docs, commit them to the gh-pages branch, and push the gh-pages branch to Github for you all in one set. It is important to note that "You should never edit files in your gh-pages branch by hand if you're using this script because you will lose your work." That last sentence was taken directly from the docs for the ghp-import tool, which mkdocs uses under the hood. And while ghp-import does not push by default, mkdocs ghp-deploy does (and in fact the default behavior cannot be overridden--which may or may not be a good idea). —Reply to this email directly or view it on GitHub. |
Sure, so we need to cover this workflow in detail when we do #477. |
Hi, i still can't get it to work. BreakDownThe master branch of https://github.com/ProfilePress/documentation/ stores the mkdocs files with all the markdown files in The gh-branch of that repo is the branch for the Github page. Each time i run the
But the gh-branch is being updated @waylan |
@collizo4sky How are your git remotes configured? You can see this with |
Oh, horrible. You must be hitting this I guess: https://github.com/mkdocs/mkdocs/blob/0.12.2/mkdocs/gh_deploy.py#L19 |
This was what i got after running
Any idea? |
Aha! It's
If it asks for a username and password, I bet it wont work with MkDocs. |
There is a bit more info about this here: https://help.github.com/articles/which-remote-url-should-i-use/ |
It didnt ask for a username or password cos i already have lookup the credentials from It says everything s up to date when i ran the command. |
@collizo4sky Are you sure the gh-pages branch is being updated? Something seems horribly wrong if the branch is updated but git claims it is up to date...
That will show you the most recent. On GitHub the most recent is from the 25th of April. https://github.com/ProfilePress/documentation/commits/gh-pages |
I want you to explain this to me.Right now, am in the master local branch.Isn't there where am suppose to run git checkout gh-pages That will show you the most recent. On GitHub the most recent is from the 25th of April. https://github.com/ProfilePress/documentation/commits/gh-pages —Reply to this email directly or view it on GitHub. |
Yes, that is correct.
Yes, it does.
I run |
Why isn't mine deploying. Is 0.13 available on pip? Wana upgrade and see if that works. Regards.Agbonghama Collins. From: Dougal MatthewsSent: Tuesday, 26 May 2015 10:04 AMTo: mkdocs/mkdocsReply To: mkdocs/mkdocsCc: Agbonghama CollinsSubject: Re: [mkdocs] Is there a guide to using gh-deploy ? can't get it to work (#547) Yes, that is correct. My question is, does gh-deploy creates it's own commit to the gh-page branch? Yes, it does. Can u pls explain how u do normally do it with your own doc? I run mkdocs gh-deploy from the master branch, from the same place you run mkdocs serve and every other command. —Reply to this email directly or view it on GitHub. |
No idea.
It will be later today. |
Ping me when it's available on pip. Regards.Agbonghama Collins. From: Dougal MatthewsSent: Tuesday, 26 May 2015 10:09 AMTo: mkdocs/mkdocsReply To: mkdocs/mkdocsCc: Agbonghama CollinsSubject: Re: [mkdocs] Is there a guide to using gh-deploy ? can't get it to work (#547) No idea. Is 0.13 available on pip? Wana upgrade and see if that works. It will be later today. —Reply to this email directly or view it on GitHub. |
I need to get this working cos I wana write an article on mkdocs Regards.Agbonghama Collins. From: Dougal MatthewsSent: Tuesday, 26 May 2015 10:09 AMTo: mkdocs/mkdocsReply To: mkdocs/mkdocsCc: Agbonghama CollinsSubject: Re: [mkdocs] Is there a guide to using gh-deploy ? can't get it to work (#547) No idea. Is 0.13 available on pip? Wana upgrade and see if that works. It will be later today. —Reply to this email directly or view it on GitHub. |
If you want to try the development version, use this:
More users testing and verifying things work will help me get it out faster. |
Got the following erros while installing the master
|
@collizo4sky Sorry, my bad. Can you try again? |
Here is my old page structure
|
That's fine, it is just a warning. You can ignore that for now. The docs for updating will be online soon. |
Full error message
|
Oh, odd. Can you show me your config? Are you using a custom theme? |
Yes am using a custom theme. Using a modified readthedoc theme. i didn't touch any template / python tag. ust the html
|
@collizo4sky As I understand, #473 can only be fixed by python-livereload. They are also working towards a release. lepture/python-livereload#105 |
Thanks mate. |
This is now documented here: http://www.mkdocs.org/user-guide/deploying-your-docs/ |
Sorry for bothering you again @d0ugal i get this error each time i run gh-deploy command
|
I think subprocess is trying to call For instance, on Windows, to use git, I have to open a command prompt via a special script that sets up the environment for me. I can then call Python and git from there. Luckily I use OSX or Linux at home. |
Okay, I actually looked into this as I have never called the It looks like mkdocs calls ghp-import (https://github.com/davisp/ghp-import). On OSX and Linux, you can simply call and see it work:
On Windows, ghp-import is naively installed as a python script without the py extension with a shebang. While this may work fine on OSX and LInux this will in no way launch on Windows. So, to get it to work on windows you would have to do something like this as files without an executable extension will not show up in the path:
Sucks. ghp-import should install itself in a more traditional way. |
Interesting to note, someone actually added proper support for windows back in October: chevah/ghp-import@197a789, but the pull as not been accepted or rejected. To be honest the repo has not been updated since October so the repo is probably not extremely active. |
Hmm, that is annoying. Given how small gh-import is, I'm tempted to say we should just vendor it and update. |
I've commented on the upstream pull request to see if it could be included. If not or we don't get a reply we can just include it or part of it in our tree. |
Yep, that's probably the way to go. |
Second the idea. From: Isaac MuseSent: Saturday, 30 May 2015 3:51 PMTo: mkdocs/mkdocsReply To: mkdocs/mkdocsCc: Agbonghama CollinsSubject: Re: [mkdocs] Is there a guide to using gh-deploy ? can't get it to work (#547)Yep, that's probably the way to go. —Reply to this email directly or view it on GitHub. |
Actually, given that it would be much nicer for us to use if we could import it and not use subprocess we should include the source. |
This change modifies ghp-import to be a library and uses it instead of calling the package with subprocess. Fixes mkdocs#598 Fixes mkdocs#547
@collizo4sky with |
I will do a test now and get back to you. |
Hi @d0ugal, still not working.
|
I wana publish my doc to a github page, i can't seem to get it to work with
mkdocs gh-deploy
but i know how to do with viaChecking out the gh-pages branch and committing the
site
folder to GitHub.The text was updated successfully, but these errors were encountered: