Skip to content

DafnyPages

David Cok edited this page Jul 15, 2022 · 7 revisions

Writing and previewing Dafny on-line user documentation

Dafny on-line documentation is available to users at https://dafny.org. Dafny documentation for developers is on this wiki.

The user documentation is currently mostly resident in the docs folder of the dafny-lang/dafny GitHub project. When the contents of that folder on the master branch is pushed to the shared GitHub repository, then GitHub serves those markdown pages at dafny.org/dafny. (This organization is going to change and will be described more completely then.)

Previewing changes

The user-facing pages are written in GitHub markdown. GitHub only renders them after they are pushed, which requires a PR, review and approval. This is how to preview your edits prior to making a PR.

  • The project workflow is for individual contributors to have their own (team-visible) fork of dafny-lang/dafny.git, from which PRs are created. For a developer named "you", this repo is typically automatically named "you/dafny" (and is at GitHub.com/you/dafny

  • Make sure that the branch on which you are editing the markdown pages has been pushed to the GitHub repo (the mirror of the local repo in which you are editing)

  • In the Settings menu for the "you/dafny" repo, on the "Pages" pane (see the list of panes in the sidebar), make these settings under Source:

    • set the branch to whatever branch you are doing your edits on (so you may change this from time to time)
    • set the folder to /docs
    • The theme should be set to "Minima"
  • The rendered HTML pages are visible at "you.github.io/dafny". Changes will be visible once they are pushed via "git push". There can be some delay while the GitHub server realizes there are changes and rerenders the pages.