Skip to content
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

Closed
w3guy opened this issue May 23, 2015 · 47 comments
Closed

Include gh-import source in MkDocs to solve windows path issues. #547

w3guy opened this issue May 23, 2015 · 47 comments
Labels
Milestone

Comments

@w3guy
Copy link

w3guy commented May 23, 2015

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 via

Checking out the gh-pages branch and committing the site folder to GitHub.

@d0ugal
Copy link
Member

d0ugal commented May 23, 2015

Not really, there is very little to it. What happens when you run mkdocs gh-deploy?

@w3guy
Copy link
Author

w3guy commented May 23, 2015

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
wrote:

Not really, there is very little to it. What happens when you run mkdocs
gh-deploy?


Reply to this email directly or view it on GitHub
#547 (comment).

@d0ugal
Copy link
Member

d0ugal commented May 23, 2015

What URL does the go and display? What repo is it? Send over as many details as you can.

@waylan
Copy link
Member

waylan commented May 24, 2015

@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):

  1. Clone the relevant repo from Github
  2. Checkout the branch which holds the unrendered docs (not the gh-pages branch).
  3. Make sure the docs render properly (using mkdocs build and/or mkdocs serve). If not, fix, commit, and push your changes (not to the gh-pages branch).
  4. From within the working tree of your repo (not the gh-pages branch), run mkdocs ghp-deploy.

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).

@w3guy
Copy link
Author

w3guy commented May 24, 2015

‎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
Checkout the branch which holds the unrendered docs (not the gh-pages branch).
Make sure the docs render properly (using mkdocs build and/or mkdocs serve). If not, fix, commit, and push your changes (not to the gh-pages branch).
From within the working tree of your repo (not the gh-pages branch), run mkdocs ghp-deploy.

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.

@d0ugal
Copy link
Member

d0ugal commented May 24, 2015

Sure, so we need to cover this workflow in detail when we do #477.

@w3guy
Copy link
Author

w3guy commented May 26, 2015

Hi, i still can't get it to work.

BreakDown

The master branch of https://github.com/ProfilePress/documentation/ stores the mkdocs files with all the markdown files in doc folder

The gh-branch of that repo is the branch for the Github page.

Each time i run the mkdocs gh-deploy command, i get this

$ mkdocs gh-deploy
Building documentation to directory: site
Directory site contains stale files. Use --clean to remove
Copying 'site' to `gh-pages` branch and pushing to GitHub.

But the gh-branch is being updated @waylan

@d0ugal
Copy link
Member

d0ugal commented May 26, 2015

@collizo4sky How are your git remotes configured? You can see this with git remote -v

@d0ugal
Copy link
Member

d0ugal commented May 26, 2015

Oh, horrible. You must be hitting this I guess: https://github.com/mkdocs/mkdocs/blob/0.12.2/mkdocs/gh_deploy.py#L19

d0ugal added a commit to d0ugal/mkdocs that referenced this issue May 26, 2015
@w3guy
Copy link
Author

w3guy commented May 26, 2015

This was what i got after running git remote -v

origin  https://github.com/ProfilePress/documentation.git (fetch)
origin  https://github.com/ProfilePress/documentation.git (push)

Any idea?

@d0ugal
Copy link
Member

d0ugal commented May 26, 2015

Aha! It's https I wonder if that could be a problem, I'd expect to see SSH. Can you push the branch manually okay?

git push origin gh-pages

If it asks for a username and password, I bet it wont work with MkDocs.

@d0ugal
Copy link
Member

d0ugal commented May 26, 2015

There is a bit more info about this here: https://help.github.com/articles/which-remote-url-should-i-use/

@w3guy
Copy link
Author

w3guy commented May 26, 2015

It didnt ask for a username or password cos i already have lookup the credentials from .git-credential file.

It says everything s up to date when i ran the command.

@d0ugal
Copy link
Member

d0ugal commented May 26, 2015

@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...

git checkout gh-pages
git log

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

@w3guy
Copy link
Author

w3guy commented May 26, 2015

I want you to explain this to me.Right now, am in the master local branch.Isn't there where am suppose to run mkdocs gh-deploy When I do run the command, it says updated but changes not showing on GitHub.My question is, does gh-deploy creates it's own commit to the gh-page branch?Can u pls explain how u do normally do it with your own doc? From: Dougal MatthewsSent: Tuesday, 26 May 2015 9:47 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 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...

git checkout gh-pages
git log

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.

@d0ugal
Copy link
Member

d0ugal commented May 26, 2015

I want you to explain this to me.Right now, am in the master local branch.Isn't there where am suppose to run mkdocs gh-deploy

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.

@w3guy
Copy link
Author

w3guy commented May 26, 2015

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)
I want you to explain this to me.Right now, am in the master local branch.Isn't there where am suppose to run mkdocs gh-deploy

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.

@d0ugal
Copy link
Member

d0ugal commented May 26, 2015

Why isn't mine deploying.

No idea.

Is 0.13 available on pip? Wana upgrade and see if that works.

It will be later today.

@w3guy
Copy link
Author

w3guy commented May 26, 2015

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)
Why isn't mine deploying.

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.

@w3guy
Copy link
Author

w3guy commented May 26, 2015

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)
Why isn't mine deploying.

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.

@d0ugal
Copy link
Member

d0ugal commented May 26, 2015

If you want to try the development version, use this:

pip install https://github.com/mkdocs/mkdocs/archive/master.tar.gz

More users testing and verifying things work will help me get it out faster.

@w3guy
Copy link
Author

w3guy commented May 26, 2015

Got the following erros while installing the master

Lib\site-packages\mkdocs\themes\simplex\js
    copying build\lib\mkdocs\themes\simplex\js\jquery-1.10.2.min.js -> c:\Python
34\Lib\site-packages\mkdocs\themes\simplex\js
    copying build\lib\mkdocs\themes\simplex\nav.html -> c:\Python34\Lib\site-pac
kages\mkdocs\themes\simplex
    copying build\lib\mkdocs\themes\simplex\toc.html -> c:\Python34\Lib\site-pac
kages\mkdocs\themes\simplex
    creating c:\Python34\Lib\site-packages\mkdocs\themes\slate
    copying build\lib\mkdocs\themes\slate\base.html -> c:\Python34\Lib\site-pack
ages\mkdocs\themes\slate
    copying build\lib\mkdocs\themes\slate\content.html -> c:\Python34\Lib\site-p
ackages\mkdocs\themes\slate
    creating c:\Python34\Lib\site-packages\mkdocs\themes\slate\css
    copying build\lib\mkdocs\themes\slate\css\base.css -> c:\Python34\Lib\site-p
ackages\mkdocs\themes\slate\css
    copying build\lib\mkdocs\themes\slate\css\bootstrap-custom.min.css -> c:\Pyt
hon34\Lib\site-packages\mkdocs\themes\slate\css
    copying build\lib\mkdocs\themes\slate\css\font-awesome-4.0.3.css -> c:\Pytho
n34\Lib\site-packages\mkdocs\themes\slate\css
    copying build\lib\mkdocs\themes\slate\css\highlight.css -> c:\Python34\Lib\s
ite-packages\mkdocs\themes\slate\css
    creating c:\Python34\Lib\site-packages\mkdocs\themes\slate\fonts
    copying build\lib\mkdocs\themes\slate\fonts\fontawesome-webfont.eot -> c:\Py
thon34\Lib\site-packages\mkdocs\themes\slate\fonts
    copying build\lib\mkdocs\themes\slate\fonts\fontawesome-webfont.svg -> c:\Py
thon34\Lib\site-packages\mkdocs\themes\slate\fonts
    copying build\lib\mkdocs\themes\slate\fonts\fontawesome-webfont.ttf -> c:\Py
thon34\Lib\site-packages\mkdocs\themes\slate\fonts
    copying build\lib\mkdocs\themes\slate\fonts\fontawesome-webfont.woff -> c:\P
ython34\Lib\site-packages\mkdocs\themes\slate\fonts
    creating c:\Python34\Lib\site-packages\mkdocs\themes\slate\img
    copying build\lib\mkdocs\themes\slate\img\favicon.ico -> c:\Python34\Lib\sit
e-packages\mkdocs\themes\slate\img
    creating c:\Python34\Lib\site-packages\mkdocs\themes\slate\js
    copying build\lib\mkdocs\themes\slate\js\base.js -> c:\Python34\Lib\site-pac
kages\mkdocs\themes\slate\js
    copying build\lib\mkdocs\themes\slate\js\bootstrap-3.0.3.min.js -> c:\Python
34\Lib\site-packages\mkdocs\themes\slate\js
    copying build\lib\mkdocs\themes\slate\js\highlight.pack.js -> c:\Python34\Li
b\site-packages\mkdocs\themes\slate\js
    copying build\lib\mkdocs\themes\slate\js\jquery-1.10.2.min.js -> c:\Python34
\Lib\site-packages\mkdocs\themes\slate\js
    copying build\lib\mkdocs\themes\slate\nav.html -> c:\Python34\Lib\site-packa
ges\mkdocs\themes\slate
    copying build\lib\mkdocs\themes\slate\toc.html -> c:\Python34\Lib\site-packa
ges\mkdocs\themes\slate
    creating c:\Python34\Lib\site-packages\mkdocs\themes\spacelab
    copying build\lib\mkdocs\themes\spacelab\base.html -> c:\Python34\Lib\site-p
ackages\mkdocs\themes\spacelab
    copying build\lib\mkdocs\themes\spacelab\content.html -> c:\Python34\Lib\sit
e-packages\mkdocs\themes\spacelab
    creating c:\Python34\Lib\site-packages\mkdocs\themes\spacelab\css
    copying build\lib\mkdocs\themes\spacelab\css\base.css -> c:\Python34\Lib\sit
e-packages\mkdocs\themes\spacelab\css
    copying build\lib\mkdocs\themes\spacelab\css\bootstrap-custom.min.css -> c:\
Python34\Lib\site-packages\mkdocs\themes\spacelab\css
    copying build\lib\mkdocs\themes\spacelab\css\font-awesome-4.0.3.css -> c:\Py
thon34\Lib\site-packages\mkdocs\themes\spacelab\css
    copying build\lib\mkdocs\themes\spacelab\css\highlight.css -> c:\Python34\Li
b\site-packages\mkdocs\themes\spacelab\css
    creating c:\Python34\Lib\site-packages\mkdocs\themes\spacelab\fonts
    copying build\lib\mkdocs\themes\spacelab\fonts\fontawesome-webfont.eot -> c:
\Python34\Lib\site-packages\mkdocs\themes\spacelab\fonts
    copying build\lib\mkdocs\themes\spacelab\fonts\fontawesome-webfont.svg -> c:
\Python34\Lib\site-packages\mkdocs\themes\spacelab\fonts
    copying build\lib\mkdocs\themes\spacelab\fonts\fontawesome-webfont.ttf -> c:
\Python34\Lib\site-packages\mkdocs\themes\spacelab\fonts
    copying build\lib\mkdocs\themes\spacelab\fonts\fontawesome-webfont.woff -> c
:\Python34\Lib\site-packages\mkdocs\themes\spacelab\fonts
    creating c:\Python34\Lib\site-packages\mkdocs\themes\spacelab\img
    copying build\lib\mkdocs\themes\spacelab\img\favicon.ico -> c:\Python34\Lib\
site-packages\mkdocs\themes\spacelab\img
    creating c:\Python34\Lib\site-packages\mkdocs\themes\spacelab\js
    copying build\lib\mkdocs\themes\spacelab\js\base.js -> c:\Python34\Lib\site-
packages\mkdocs\themes\spacelab\js
    copying build\lib\mkdocs\themes\spacelab\js\bootstrap-3.0.3.min.js -> c:\Pyt
hon34\Lib\site-packages\mkdocs\themes\spacelab\js
    copying build\lib\mkdocs\themes\spacelab\js\highlight.pack.js -> c:\Python34
\Lib\site-packages\mkdocs\themes\spacelab\js
    copying build\lib\mkdocs\themes\spacelab\js\jquery-1.10.2.min.js -> c:\Pytho
n34\Lib\site-packages\mkdocs\themes\spacelab\js
    copying build\lib\mkdocs\themes\spacelab\nav.html -> c:\Python34\Lib\site-pa
ckages\mkdocs\themes\spacelab
    copying build\lib\mkdocs\themes\spacelab\toc.html -> c:\Python34\Lib\site-pa
ckages\mkdocs\themes\spacelab
    creating c:\Python34\Lib\site-packages\mkdocs\themes\united
    copying build\lib\mkdocs\themes\united\base.html -> c:\Python34\Lib\site-pac
kages\mkdocs\themes\united
    copying build\lib\mkdocs\themes\united\content.html -> c:\Python34\Lib\site-
packages\mkdocs\themes\united
    creating c:\Python34\Lib\site-packages\mkdocs\themes\united\css
    copying build\lib\mkdocs\themes\united\css\base.css -> c:\Python34\Lib\site-
packages\mkdocs\themes\united\css
    copying build\lib\mkdocs\themes\united\css\bootstrap-custom.min.css -> c:\Py
thon34\Lib\site-packages\mkdocs\themes\united\css
    copying build\lib\mkdocs\themes\united\css\font-awesome-4.0.3.css -> c:\Pyth
on34\Lib\site-packages\mkdocs\themes\united\css
    copying build\lib\mkdocs\themes\united\css\highlight.css -> c:\Python34\Lib\
site-packages\mkdocs\themes\united\css
    creating c:\Python34\Lib\site-packages\mkdocs\themes\united\fonts
    copying build\lib\mkdocs\themes\united\fonts\fontawesome-webfont.eot -> c:\P
ython34\Lib\site-packages\mkdocs\themes\united\fonts
    copying build\lib\mkdocs\themes\united\fonts\fontawesome-webfont.svg -> c:\P
ython34\Lib\site-packages\mkdocs\themes\united\fonts
    copying build\lib\mkdocs\themes\united\fonts\fontawesome-webfont.ttf -> c:\P
ython34\Lib\site-packages\mkdocs\themes\united\fonts
    copying build\lib\mkdocs\themes\united\fonts\fontawesome-webfont.woff -> c:\
Python34\Lib\site-packages\mkdocs\themes\united\fonts
    creating c:\Python34\Lib\site-packages\mkdocs\themes\united\img
    copying build\lib\mkdocs\themes\united\img\favicon.ico -> c:\Python34\Lib\si
te-packages\mkdocs\themes\united\img
    creating c:\Python34\Lib\site-packages\mkdocs\themes\united\js
    copying build\lib\mkdocs\themes\united\js\base.js -> c:\Python34\Lib\site-pa
ckages\mkdocs\themes\united\js
    copying build\lib\mkdocs\themes\united\js\bootstrap-3.0.3.min.js -> c:\Pytho
n34\Lib\site-packages\mkdocs\themes\united\js
    copying build\lib\mkdocs\themes\united\js\highlight.pack.js -> c:\Python34\L
ib\site-packages\mkdocs\themes\united\js
    copying build\lib\mkdocs\themes\united\js\jquery-1.10.2.min.js -> c:\Python3
4\Lib\site-packages\mkdocs\themes\united\js
    copying build\lib\mkdocs\themes\united\nav.html -> c:\Python34\Lib\site-pack
ages\mkdocs\themes\united
    copying build\lib\mkdocs\themes\united\toc.html -> c:\Python34\Lib\site-pack
ages\mkdocs\themes\united
    creating c:\Python34\Lib\site-packages\mkdocs\themes\yeti
    copying build\lib\mkdocs\themes\yeti\base.html -> c:\Python34\Lib\site-packa
ges\mkdocs\themes\yeti
    copying build\lib\mkdocs\themes\yeti\content.html -> c:\Python34\Lib\site-pa
ckages\mkdocs\themes\yeti
    creating c:\Python34\Lib\site-packages\mkdocs\themes\yeti\css
    copying build\lib\mkdocs\themes\yeti\css\base.css -> c:\Python34\Lib\site-pa
ckages\mkdocs\themes\yeti\css
    copying build\lib\mkdocs\themes\yeti\css\bootstrap-custom.min.css -> c:\Pyth
on34\Lib\site-packages\mkdocs\themes\yeti\css
    copying build\lib\mkdocs\themes\yeti\css\font-awesome-4.0.3.css -> c:\Python
34\Lib\site-packages\mkdocs\themes\yeti\css
    copying build\lib\mkdocs\themes\yeti\css\highlight.css -> c:\Python34\Lib\si
te-packages\mkdocs\themes\yeti\css
    creating c:\Python34\Lib\site-packages\mkdocs\themes\yeti\fonts
    copying build\lib\mkdocs\themes\yeti\fonts\fontawesome-webfont.eot -> c:\Pyt
hon34\Lib\site-packages\mkdocs\themes\yeti\fonts
    copying build\lib\mkdocs\themes\yeti\fonts\fontawesome-webfont.svg -> c:\Pyt
hon34\Lib\site-packages\mkdocs\themes\yeti\fonts
    copying build\lib\mkdocs\themes\yeti\fonts\fontawesome-webfont.ttf -> c:\Pyt
hon34\Lib\site-packages\mkdocs\themes\yeti\fonts
    copying build\lib\mkdocs\themes\yeti\fonts\fontawesome-webfont.woff -> c:\Py
thon34\Lib\site-packages\mkdocs\themes\yeti\fonts
    creating c:\Python34\Lib\site-packages\mkdocs\themes\yeti\img
    copying build\lib\mkdocs\themes\yeti\img\favicon.ico -> c:\Python34\Lib\site
-packages\mkdocs\themes\yeti\img
    creating c:\Python34\Lib\site-packages\mkdocs\themes\yeti\js
    copying build\lib\mkdocs\themes\yeti\js\base.js -> c:\Python34\Lib\site-pack
ages\mkdocs\themes\yeti\js
    copying build\lib\mkdocs\themes\yeti\js\bootstrap-3.0.3.min.js -> c:\Python3
4\Lib\site-packages\mkdocs\themes\yeti\js
    copying build\lib\mkdocs\themes\yeti\js\highlight.pack.js -> c:\Python34\Lib
\site-packages\mkdocs\themes\yeti\js
    copying build\lib\mkdocs\themes\yeti\js\jquery-1.10.2.min.js -> c:\Python34\
Lib\site-packages\mkdocs\themes\yeti\js
    copying build\lib\mkdocs\themes\yeti\nav.html -> c:\Python34\Lib\site-packag
es\mkdocs\themes\yeti
    copying build\lib\mkdocs\themes\yeti\toc.html -> c:\Python34\Lib\site-packag
es\mkdocs\themes\yeti
    copying build\lib\mkdocs\toc.py -> c:\Python34\Lib\site-packages\mkdocs
    copying build\lib\mkdocs\utils.py -> c:\Python34\Lib\site-packages\mkdocs
    copying build\lib\mkdocs\__init__.py -> c:\Python34\Lib\site-packages\mkdocs

    byte-compiling c:\Python34\Lib\site-packages\mkdocs\build.py to build.cpytho
n-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\cli.py to cli.cpython-34
.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\config\base.py to base.c
python-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\config\config_options.py
 to config_options.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\config\defaults.py to de
faults.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\config\__init__.py to __
init__.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\exceptions.py to excepti
ons.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\gh_deploy.py to gh_deplo
y.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\legacy.py to legacy.cpyt
hon-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\nav.py to nav.cpython-34
.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\new.py to new.cpython-34
.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\relative_path_ext.py to
relative_path_ext.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\search.py to search.cpyt
hon-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\serve.py to serve.cpytho
n-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\base.py to base.cp
ython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\build_tests.py to
build_tests.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\cli_tests.py to cl
i_tests.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\config\base_tests.
py to base_tests.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\config\config_opti
ons_tests.py to config_options_tests.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\config\config_test
s.py to config_tests.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\config\__init__.py
 to __init__.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\integration.py to
integration.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\legacy_tests.py to
 legacy_tests.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\nav_tests.py to na
v_tests.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\new_tests.py to ne
w_tests.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\search_tests.py to
 search_tests.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\toc_tests.py to to
c_tests.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\utils_tests.py to
utils_tests.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\tests\__init__.py to __i
nit__.cpython-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\toc.py to toc.cpython-34
.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\utils.py to utils.cpytho
n-34.pyc
    byte-compiling c:\Python34\Lib\site-packages\mkdocs\__init__.py to __init__.
cpython-34.pyc
    running install_egg_info
    running egg_info
    creating mkdocs.egg-info
    writing requirements to mkdocs.egg-info\requires.txt
    writing mkdocs.egg-info\PKG-INFO
    writing top-level names to mkdocs.egg-info\top_level.txt
    writing entry points to mkdocs.egg-info\entry_points.txt
    writing dependency_links to mkdocs.egg-info\dependency_links.txt
    writing manifest file 'mkdocs.egg-info\SOURCES.txt'
    c:\Python34\lib\site-packages\setuptools\dist.py:283: UserWarning: The versi
on specified requires normalization, consider using '0.13.0.dev0' instead of '0.
13.0.dev'.
      self.metadata.version,
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'mkdocs.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '__pycache__' found under dir
ectory '*'
    warning: no previously-included files matching '*.py[co]' found under direct
ory '*'
    writing manifest file 'mkdocs.egg-info\SOURCES.txt'
    Copying mkdocs.egg-info to c:\Python34\Lib\site-packages\mkdocs-0.13.0.dev0-
py3.4.egg-info
    running install_scripts
    Installing mkdocs-script.py script to c:\Python34\Scripts
    Installing mkdocs.exe script to c:\Python34\Scripts
    Installing mkdocs.exe.manifest script to c:\Python34\Scripts
    writing list of installed files to 'C:\Users\COLLIZ~1\AppData\Local\Temp\pip
-4iw1j9ov-record\install-record.txt'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\COLLIZ~1\AppData\Local\Temp\pip-u5nw40b3-build\setup.py", l
ine 93, in <module>
        zip_safe=False
      File "c:\Python34\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\Python34\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "c:\Python34\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\Python34\lib\site-packages\setuptools\command\install.py", line 6
1, in run
        return orig.install.run(self)
      File "c:\Python34\lib\distutils\command\install.py", line 566, in run
        self.record)
      File "c:\Python34\lib\distutils\cmd.py", line 336, in execute
        util.execute(func, args, msg, dry_run=self.dry_run)
      File "c:\Python34\lib\distutils\util.py", line 301, in execute
        func(*args)
      File "c:\Python34\lib\distutils\file_util.py", line 236, in write_file
        f.write(line + "\n")
      File "c:\Python34\lib\encodings\cp1252.py", line 19, in encode
        return codecs.charmap_encode(input,self.errors,encoding_table)[0]
    UnicodeEncodeError: 'charmap' codec can't encode characters in position 68-6
9: character maps to <undefined>

    ----------------------------------------
    Rolling back uninstall of mkdocs
←[31m    Command "c:\Python34\python.exe -c "import setuptools, tokenize;__file_
_='C:\\Users\\COLLIZ~1\\AppData\\Local\\Temp\\pip-u5nw40b3-build\\setup.py';exec
(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'),
 __file__, 'exec'))" install --record C:\Users\COLLIZ~1\AppData\Local\Temp\pip-4
iw1j9ov-record\install-record.txt --single-version-externally-managed --compile"
 failed with error code 1 in C:\Users\COLLIZ~1\AppData\Local\Temp\pip-u5nw40b3-b
uild←[0m

@d0ugal
Copy link
Member

d0ugal commented May 26, 2015

@collizo4sky Sorry, my bad. Can you try again?

@w3guy
Copy link
Author

w3guy commented May 26, 2015

WARNING -  The pages config in the mkdocs.yml uses the deprecated structure. Thi
s will be removed in the next release of MkDocs. See for details on updating: ht
tp://www.mkdocs.org/about/release-notes/

Here is my old page structure

pages:
- ['index.md', 'Index']
- ['installation.md', 'Get Started', 'Installation']
- ['uninstall.md', 'Get Started', 'Uninstall']
- ['quickstart.md', 'Get Started', 'Quick Start']
- ['shortcode-doc.md', 'Get Started', 'Shortcodes Doc']
- ['install-theme.md', 'Get Started', 'Theme Installation']
- ['build/login-form.md', 'Building', 'Login Form']
- ['build/registration-form.md', 'Building', 'Registration Form']
- ['build/password-reset.md', 'Building', 'Password Reset Form']
- ['build/edit-profile.md', 'Building', 'Edit Profile Form']
- ['build/user-profile.md', 'Building', 'Front-end Profile']
- ['build/widgets.md', 'Building', 'Widgets']
- ['build/shortcodes.md', 'Building', 'Shortcode List']
- ['configuration/redirections.md', 'Configuration', 'Redirections']
- ['configuration/front-end-profile.md', 'Configuration', 'Front-end Profile']
- ['configuration/registration.md', 'Configuration', 'Registration Sugars']
- ['configuration/password-reset.md', 'Configuration', 'Password Reset']
- ['configuration/custom-fields.md', 'Configuration', 'Custom Fields']
- ['social-login/configuration.md', 'Social Login', 'Configuration']
- ['social-login/facebook.md', 'Social Login', 'Creating a Facebook Application']
- ['social-login/twitter.md', 'Social Login', 'Creating a Twitter Application']
- ['social-login/linkedin.md', 'Social Login', 'Creating a LinkedIn Application']
- ['social-login/google.md', 'Social Login', 'Creating a Google+ Application']
- ['social-login/github.md', 'Social Login', 'Creating a GitHub Application']
- ['extras/recaptcha.md', 'Extras', 'reCAPTCHA']
- ['extras/email-login.md', 'Extras', 'Log in With Email']
- ['extras/global-admin-password.md', 'Extras', 'Global Administrator Password']
- ['extras/user-moderation.md', 'Extras', 'User Moderation']
- ['advanced/theme-development.md', 'Advanced', 'Theme Development']
- ['extensions/mailchimp.md', 'Extensions', 'MailChimp']

@d0ugal
Copy link
Member

d0ugal commented May 26, 2015

That's fine, it is just a warning. You can ignore that for now. The docs for updating will be online soon.

@w3guy
Copy link
Author

w3guy commented May 26, 2015

Full error message

WARNING -  The pages config in the mkdocs.yml uses the deprecated structure. Thi
s will be removed in the next release of MkDocs. See for details on updating: ht
tp://www.mkdocs.org/about/release-notes/
Traceback (most recent call last):
  File "c:\Python34\Scripts\mkdocs-script.py", line 9, in <module>
    load_entry_point('mkdocs==0.13.0.dev0', 'console_scripts', 'mkdocs')()
  File "c:\Python34\lib\site-packages\click\core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "c:\Python34\lib\site-packages\click\core.py", line 644, in main
    rv = self.invoke(ctx)
  File "c:\Python34\lib\site-packages\click\core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\Python34\lib\site-packages\click\core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\Python34\lib\site-packages\click\core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "c:\Python34\lib\site-packages\mkdocs\cli.py", line 79, in serve_command
    livereload=livereload,
  File "c:\Python34\lib\site-packages\mkdocs\serve.py", line 77, in serve
    config = builder()
  File "c:\Python34\lib\site-packages\mkdocs\serve.py", line 73, in builder
    build(config, live_server=True)
  File "c:\Python34\lib\site-packages\mkdocs\build.py", line 299, in build
    build_pages(config)
  File "c:\Python34\lib\site-packages\mkdocs\build.py", line 246, in build_pages

    if not build_template('search.html', env, config, site_navigation):
  File "c:\Python34\lib\site-packages\mkdocs\build.py", line 150, in build_templ
ate
    template = env.get_template(template_name)
  File "c:\Python34\lib\site-packages\jinja2\environment.py", line 791, in get_t
emplate
    return self._load_template(name, self.make_globals(globals))
  File "c:\Python34\lib\site-packages\jinja2\environment.py", line 765, in _load
_template
    template = self.loader.load(self, name, globals)
  File "c:\Python34\lib\site-packages\jinja2\loaders.py", line 125, in load
    code = environment.compile(source, name, filename)
  File "c:\Python34\lib\site-packages\jinja2\environment.py", line 554, in compi
le
    self.handle_exception(exc_info, source_hint=source)
  File "c:\Python34\lib\site-packages\jinja2\environment.py", line 742, in handl
e_exception
    reraise(exc_type, exc_value, tb)
  File "c:\Python34\lib\site-packages\jinja2\_compat.py", line 36, in reraise
    raise value.with_traceback(tb)
  File "c:\Users\collizo4sky\Desktop\Code\Code\pp-doc\readthedocs\search.html",
line 26, in <module>
    {% trans %}Please activate JavaScript to enable the search
  File "c:\Python34\lib\site-packages\jinja2\environment.py", line 459, in _pars
e
    return Parser(self, source, name, encode_filename(filename)).parse()
  File "c:\Python34\lib\site-packages\jinja2\parser.py", line 893, in parse
    result = nodes.Template(self.subparse(), lineno=1)
  File "c:\Python34\lib\site-packages\jinja2\parser.py", line 875, in subparse
    rv = self.parse_statement()
  File "c:\Python34\lib\site-packages\jinja2\parser.py", line 122, in parse_stat
ement
    return getattr(self, 'parse_' + self.stream.current.value)()
  File "c:\Python34\lib\site-packages\jinja2\parser.py", line 229, in parse_bloc
k
    node.body = self.parse_statements(('name:endblock',), drop_needle=True)
  File "c:\Python34\lib\site-packages\jinja2\parser.py", line 157, in parse_stat
ements
    result = self.subparse(end_tokens)
  File "c:\Python34\lib\site-packages\jinja2\parser.py", line 875, in subparse
    rv = self.parse_statement()
  File "c:\Python34\lib\site-packages\jinja2\parser.py", line 136, in parse_stat
ement
    self.fail_unknown_tag(token.value, token.lineno)
  File "c:\Python34\lib\site-packages\jinja2\parser.py", line 89, in fail_unknow
n_tag
    return self._fail_ut_eof(name, self._end_token_stack, lineno)
  File "c:\Python34\lib\site-packages\jinja2\parser.py", line 82, in _fail_ut_eo
f
    self.fail(' '.join(message), lineno)
  File "c:\Python34\lib\site-packages\jinja2\parser.py", line 51, in fail
    raise exc(msg, lineno, self.name, self.filename)
jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'trans'. Jinja wa
s looking for the following tags: 'endblock'. The innermost block that needs to
be closed is 'block'.

@d0ugal
Copy link
Member

d0ugal commented May 26, 2015

Oh, odd. Can you show me your config? Are you using a custom theme?

@w3guy
Copy link
Author

w3guy commented May 26, 2015

Yes am using a custom theme.

Using a modified readthedoc theme. i didn't touch any template / python tag. ust the html

site_name: ProfilePress WordPress Plugin
site_url: http://docs.profilepress.net
site_description: Documentation for ProfilePress plugin - The ultimate plugin for creating user account forms such as login, registration, password reset, front-end edit profile forms as well as front-end user profile for WordPress
site_favicon: favicon.ico
theme: 'readthedocs'
repo_url: https://github.com/ProfilePress/documentation/tree/master/docs
repo_name: GitHub
site_author: Agbonghama Collins

@d0ugal
Copy link
Member

d0ugal commented May 26, 2015

@collizo4sky As I understand, #473 can only be fixed by python-livereload. They are also working towards a release. lepture/python-livereload#105

@w3guy
Copy link
Author

w3guy commented May 26, 2015

Thanks mate.

@d0ugal
Copy link
Member

d0ugal commented May 28, 2015

This is now documented here: http://www.mkdocs.org/user-guide/deploying-your-docs/

@d0ugal d0ugal closed this as completed May 28, 2015
@w3guy
Copy link
Author

w3guy commented May 29, 2015

Sorry for bothering you again @d0ugal i get this error each time i run gh-deploy command

$ mkdocs gh-deploy
WARNING -  The pages config in the mkdocs.yml uses the deprecated structure. Thi
s will be removed in the next release of MkDocs. See for details on updating: ht
tp://www.mkdocs.org/about/release-notes/
INFO    -  Building documentation to directory: c:\Users\collizo4sky\Desktop\Cod
e\Code\pp-doc\site
INFO    -  The directory contains stale files. Use --clean to remove them.
INFO    -  Copying 'c:\Users\collizo4sky\Desktop\Code\Code\pp-doc\site' to 'gh-p
ages' branch and pushing to GitHub.
ERROR   -  Failed to deploy to GitHub.
Traceback (most recent call last):
  File "c:\Python34\lib\site-packages\mkdocs\gh_deploy.py", line 26, in gh_deplo
y
    subprocess.check_call(command)
  File "c:\Python34\lib\subprocess.py", line 556, in check_call
    retcode = call(*popenargs, **kwargs)
  File "c:\Python34\lib\subprocess.py", line 537, in call
    with Popen(*popenargs, **kwargs) as p:
  File "c:\Python34\lib\subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "c:\Python34\lib\subprocess.py", line 1112, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

@facelessuser
Copy link
Contributor

I think subprocess is trying to call git. The problem is that often Windows doesn't have git accessible from command line without opening up a special shell that then configures the environment. Don't ask me why every implementation does it that way.

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.

@facelessuser
Copy link
Contributor

Okay, I actually looked into this as I have never called the gh-deploy option from windows.

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:

ghp-import -h

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:

python /full/path/to/ghp-import -h

Sucks. ghp-import should install itself in a more traditional way.

@facelessuser
Copy link
Contributor

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.

@d0ugal
Copy link
Member

d0ugal commented May 30, 2015

Hmm, that is annoying. Given how small gh-import is, I'm tempted to say we should just vendor it and update.

@d0ugal
Copy link
Member

d0ugal commented May 30, 2015

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.

@facelessuser
Copy link
Contributor

Yep, that's probably the way to go.

@w3guy
Copy link
Author

w3guy commented May 30, 2015

‎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.

@d0ugal
Copy link
Member

d0ugal commented May 30, 2015

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.

@d0ugal d0ugal reopened this May 30, 2015
@d0ugal d0ugal added this to the 0.14.0 milestone May 30, 2015
@d0ugal d0ugal changed the title Is there a guide to using gh-deploy ? can't get it to work Include gh-import source in MkDocs to solve windows path issues. May 30, 2015
@d0ugal d0ugal modified the milestone: 0.14.0 Jun 2, 2015
@d0ugal d0ugal closed this as completed in 01d625b Jun 6, 2015
@d0ugal d0ugal reopened this Jun 6, 2015
d0ugal added a commit to d0ugal/mkdocs that referenced this issue Jun 6, 2015
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
@d0ugal d0ugal closed this as completed in eecd83b Jun 7, 2015
@d0ugal
Copy link
Member

d0ugal commented Jun 12, 2015

@collizo4sky with 0.14.0 released, can you confirm this all works now?

@w3guy
Copy link
Author

w3guy commented Aug 1, 2015

I will do a test now and get back to you.

@w3guy
Copy link
Author

w3guy commented Aug 1, 2015

Hi @d0ugal, still not working.

$ mkdocs gh-deploy --clean
INFO    -  Cleaning site directory
INFO    -  Building documentation to directory: c:\Users\collizo4sky\Desktop\Cod
e\Code\pp-doc\site
INFO    -  Copying 'c:\Users\collizo4sky\Desktop\Code\Code\pp-doc\site' to 'gh-p
ages' branch and pushing to GitHub.
Traceback (most recent call last):
  File "c:\Python34\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\Python34\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "c:\Python34\Scripts\mkdocs.exe\__main__.py", line 9, in <module>
  File "c:\Python34\lib\site-packages\click\core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "c:\Python34\lib\site-packages\click\core.py", line 644, in main
    rv = self.invoke(ctx)
  File "c:\Python34\lib\site-packages\click\core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\Python34\lib\site-packages\click\core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\Python34\lib\site-packages\click\core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "c:\Python34\lib\site-packages\mkdocs\cli.py", line 186, in gh_deploy_com
mand
    gh_deploy.gh_deploy(config, message=message)
  File "c:\Python34\lib\site-packages\mkdocs\gh_deploy.py", line 69, in gh_deplo
y
    remote_branch)
  File "c:\Python34\lib\site-packages\mkdocs\utils\ghp_import.py", line 163, in
ghp_import
    if not try_rebase(remote, branch):
  File "c:\Python34\lib\site-packages\mkdocs\utils\ghp_import.py", line 78, in t
ry_rebase
    if sp.call(cmd) != 0:
  File "c:\Python34\lib\subprocess.py", line 537, in call
    with Popen(*popenargs, **kwargs) as p:
  File "c:\Python34\lib\subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "c:\Python34\lib\subprocess.py", line 1086, in _execute_child
    args = list2cmdline(args)
  File "c:\Python34\lib\subprocess.py", line 663, in list2cmdline
    needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: 'str' does not support the buffer interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants