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

Source code link broken for non-playframework documentation #86

Open
gmethvin opened this issue Apr 24, 2016 · 2 comments
Open

Source code link broken for non-playframework documentation #86

gmethvin opened this issue Apr 24, 2016 · 2 comments

Comments

@gmethvin
Copy link
Member

The source code link at the bottom of the documentation seems to assume it is in the playframework repo, for example:

@Dulya
Copy link
Contributor

Dulya commented Oct 11, 2017

User should be pointed to an external repository. Do we store the source repository url related to a module?

@gmethvin
Copy link
Member Author

gmethvin commented Oct 12, 2017

This issue probably needs a bit more explanation of how the documentation system works. Unfortunately there are parts of the process that are not well documented.

Here's what happens:

  1. The documentation is written in individual repositories. Originally this was just https://github.com/playframework/playframework/, but over the past few years we've broken out external modules not part of the core of Play (play-json, scalatestplus-play, play-slick, play-ebean, anorm). This is where we want to link from the website.
  2. We use the playdoc sbt plugin to take the documentation structure and publish an artifact with the playdoc classifier. For example you'll notice the playdoc jars along with sources and javadoc here: http://central.maven.org/maven2/com/typesafe/play/play-json_2.12/2.6.6/
  3. We use omnidoc to merge this structure and create the full rendered documentation. The most relevant code is probably here: https://github.com/playframework/omnidoc/blob/2.6.6/project/OmnidocBuild.scala#L209
  4. The omnidoc/bin/deploy script is used to deploy the rendered docs to https://github.com/playframework/play-generated-docs, which is used by the website.

One way to solve this issue would be to add an additional task to the extraction stage at omnidoc that adds a footer to the markdown documents (in other words, this link will be in the generated docs, not on the website). Another way would be to introduce a file in the generated docs that maps individual page paths to their source repositories. This information could then be used by the Play website to decide which repo should be linked.

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

No branches or pull requests

3 participants