8000
  • Added support for GitHub pages using docfx by jscarle · Pull Request #1358 · sshnet/SSH.NET · GitHub
    [go: up one dir, main page]

    Skip to content

    Added support for GitHub pages using docfx#1358

    Merged
    Rob-Hague merged 6 commits intosshnet:developfrom
    jscarle:feature/docfx
    Apr 17, 2024
    Merged

    Added support for GitHub pages using docfx#1358
    Rob-Hague merged 6 commits intosshnet:developfrom
    jscarle:feature/docfx

    Conversation

    @jscarle
    Copy link
    Contributor
    @jscarle jscarle commented Mar 15, 2024

    This PR adds support for publishing documentation as GitHub pages using docfx.

    After this PR is merged, three things need to be done for setup to be completed.

    1. GitHub pages must be activated for this repository by navigating to Settings => Pages and changing the Build and deployment source to GitHub Actions here (https://github.com/sshnet/SSH.NET/settings/pages)
    image
    1. From the main repository page (https://github.com/sshnet/SSH.NET) on the About gear for the settings:
    image

    The option Use your GitHub Pages website should be checked:
    image

    1. The GitHub Action for Docs must be manually run at least once (https://github.com/sshnet/SSH.NET/actions/workflows/docs.yml):
    image

    Once the docs have been published once, they will be automatically published everytime develop is merged with master.

    @jscarle
    Copy link
    Contributor Author
    jscarle commented Mar 15, 2024

    @WojciechNagorski Ready for review and merge. Let me know if you have any questions!

    @jscarle
    Copy link
    Contributor Author
    jscarle commented Apr 3, 2024

    @WojciechNagorski @Rob-Hague This is now ready to merge and synced with develop.

    Copy link
    Collaborator
    @Rob-Hague Rob-Hague left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Thanks @jscarle. I don't know anything about it but it looks nice and simple. Two questions:

    1. Is it possible to preview the output without merging, either locally or on GH?
    2. Is it possible to have the additional docs (features.md, foreward.md, usage.md) without duplicating from the README? E.g. including snippets of markdown (or something). If not, can we just directly use the README for now to avoid having to update in multiple places?

    @jscarle
    Copy link
    Contributor Author
    jscarle commented Apr 8, 2024

    Thanks @jscarle. I don't know anything about it but it looks nice and simple. Two questions:

    1. Is it possible to preview the output without merging, either locally or on GH?

    Certainly! From the root of the repository, simply run the two commands from the pipeline:

    dotnet tool update -g docfx
    docfx ./docfx/docfx.json

    That will produce the site in ./docfx/_site, which as you'll see, is just a plain HTML site. You can view it by opening index.html.

    1. Is it possible to have the additional docs (features.md, foreward.md, usage.md) without duplicating from the README? E.g. including snippets of markdown (or something). If not, can we just directly use the README for now to avoid having to update in multiple places?

    Sure, we can do whatever we'd like with the additional content of the site. I just split up the README as a starting point. I could also work into a way to include the README directly. Though the objective would be to simplify the README and instead grow this site.

    @Rob-Hague
    Copy link
    Collaborator

    On index.html I don't see anything to click on to get to the code. Does that get hooked up automatically?

    For the additional content, I'll leave it up to you if you expect the site and the readme to diverge in the near future. If they are going to stay equal for a while, then having just one place to update would be nicer from a maintenance perspective if it's easy to do.

    @jscarle
    Copy link
    Contributor Author
    jscarle commented Apr 8, 2024

    On index.html I don't see anything to click on to get to the code. Does that get hooked up automatically?

    Sorry about that, I forgot. You have to do:

    docfx ./docfx/docfx.json --serve

    Then, at the end you should see:

    Serving "E:\github\SSH.NET\docfx\_site" on http://localhost:8080. Press Ctrl+C to shut down.

    It runs a little bit of JavaScript, so that's probably why it won't completely load locally without running serve.

    @Rob-Hague Rob-Hague merged commit dd36d5b into sshnet:develop Apr 17, 2024
    @Rob-Hague
    Copy link
    Collaborator

    @jscarle jscarle deleted the feature/docfx branch April 17, 2024 19:51
    @jscarle
    Copy link
    Contributor Author
    jscarle commented Apr 17, 2024

    Good stuff!

    @scott-xu scott-xu mentioned this pull request Apr 19, 2024
    4 tasks
    @scott-xu
    Copy link
    Collaborator

    Buildervt

    This comment was marked as spam.

    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

    Successfully merging this pull request may close these issues.

    4 participants

    0