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

Add GitHub integration tutorial please. #1439

Closed
IgnatevSV opened this issue Mar 19, 2017 · 12 comments
Closed

Add GitHub integration tutorial please. #1439

IgnatevSV opened this issue Mar 19, 2017 · 12 comments

Comments

@IgnatevSV
Copy link

IgnatevSV commented Mar 19, 2017

Please, add some more information, how to use integration with GitHub, because this is really not enough.
I created sample project from quickstart tutorial, but "Improve this Doc" / "View Source" buttons wasn't showed there. Also I tried to create test project(https://github.com/IgnatevSV/ignatev_docfx_example) and use "docfx-seed" project(https://github.com/docascode/docfx-seed), but "Improve this Doc" / "View Source" buttons didn't appear. Also in my project i used already generated HTML-Website by DocFX, but in other people projects like "docfx-seed" it seems it working somehow without it.
I just don't understand, how to correctly create, enable and use it. Add some additional information, please.

DocFX version: 2.13.2

@vicancy
Copy link
Contributor

vicancy commented Mar 20, 2017

Hi @IgnatevSV, thanks for reporting the issue.

docfx fails to get the source file path from source code when your input files are "files": ["src/**.cs"], change it to "files": ["src/**.sln"] and have a retry. IgnatevSV/ignatev_docfx_example#1

For why docfx fails to extract the source file info direct from source files, we will investigate.

@IgnatevSV
Copy link
Author

Hi @vicancy! Thanks for reply!

I used ".cs" decription over ".sln" to avoid long enumeration of inherited members.
Anyway, i tried to change it to ".sln", but "Improve this Doc" / "View Source" buttons still had disabled.
Also, website loaded from master branch still incorrect. I still load github pages files from "docs" folder, which were pre-generated by DocFX.

@vicancy
Copy link
Contributor

vicancy commented Mar 21, 2017

The output folder is defined in docfx.json, or in command line with -o option. Your case the generated website should be in _site folder. Please run docfx --serve to serve the website by docfx and check the latest result. In my local machine, it works.

Note that "Improve this Doc" / "View Source" is disabled in namespace pages.

@IgnatevSV
Copy link
Author

IgnatevSV commented Mar 21, 2017

The output folder is defined in docfx.json, or in command line with -o option. Your case the generated website should be in _site folder.

Yes, i know. I just replaced it manually.

Please run docfx --serve to serve the website by docfx and check the latest result. In my local machine, it works.

I got the same result as here:
https://ignatevsv.github.io/ignatev_docfx_example/
So there are still no buttons to GitHub.

image

@hellosnow
Copy link
Contributor

From page, source code affix template and conceptual.html.primary.js, I think docurl is null here, and we will investigate on common.js why it's generating null docurl.

@vicancy
Copy link
Contributor

vicancy commented Mar 21, 2017

How did you generate the page? Your repo works perfectly in my local machine.
How about setting up AppVeyor as similar to https://github.com/docascode/docfx-seed/blob/master/appveyor.yml to see if it works in a clean environment?

@IgnatevSV
Copy link
Author

IgnatevSV commented Mar 21, 2017

How did you generate the page?

By docfx ignatev_docfx_example\docfx.json --serve command.

If this way is wrong, can you describe the correct way, please?

I know about separate-command way like:
docfx ignatev_docfx_example\docfx.json command to build website
And docfx serve ignatev_docfx_example\_site command to run website.
This way gives the same result.

How about setting up AppVeyor

I have no any experience with this tool, so results probably will be incorrect. My bad, sorry.

Also, i had installed Build Tools 2015 and Visual Studio Community 2017. There can be a problem in this?

@vicancy
Copy link
Contributor

vicancy commented Mar 23, 2017

Could you run docfx -f with docfx.json changint to include the sln file?
-f means no incremental build.
If it does not help, could you provide me a generated yml file under api folder?

@IgnatevSV
Copy link
Author

IgnatevSV commented Mar 23, 2017

So, i run docfx docfx_issue_example\docfx.json -f command.
Next i run docfx serve docfx_issue_example\_site command.
Unfortunately, it didn't help.
yml files:
https://github.com/IgnatevSV/docfx_issue_example/tree/master/api

@vicancy
Copy link
Contributor

vicancy commented Mar 24, 2017

what happens when you run where git on your OS?
Any 'git' related error message shown when running docfx?
Actually currently docfx relies on git to fetch repo information, it fails when git is not globally found.https://github.com/dotnet/docfx/blob/dev/src/Microsoft.DocAsCode.Common/CommandUtility.cs#L119

@IgnatevSV
Copy link
Author

what happens when you run where git on your OS?

So, here is my mistake. I used "GitHub Desktop"(https://desktop.github.com/), but not installed the Git(https://git-for-windows.github.io/).
So, after git installation it all perfectly works. I'm sorry, my fault.
Thank you very much for your help. On my own I would have been searching for a reason for a long time.

@vicancy
Copy link
Contributor

vicancy commented Mar 27, 2017

@qinezh As we rely on git, is it better for us to

  1. Mention the behavior in our documentation
  2. Provide an option for user to config their git PATH in docfx.json?

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

No branches or pull requests

3 participants