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

Migrate docs from Akka/Akka here, using Paradox #1

Closed
ktoso opened this issue Aug 19, 2016 · 22 comments
Closed

Migrate docs from Akka/Akka here, using Paradox #1

ktoso opened this issue Aug 19, 2016 · 22 comments
Labels
t:docs Issues related to the documentation
Milestone

Comments

@ktoso
Copy link
Member

ktoso commented Aug 19, 2016

We want to move documentation from:

To this repo. Both text and tests of course.

The docs should be generated using https://github.com/lightbend/paradox which will allow us to "aggregate" them together with other akka docs into an "aggregated view" if someone wants that.

Otherwise the docs will be separate so this will allow more focused browsing and searching.

The theme for now can be the plain Akka one, though we'll likely want to differentiate a little bit, maybe just by adding HTTP in the header or sth.

I will attempt to make the first step of this move, and then would like to ask for help migrating all the docs to paradox.

@ktoso
Copy link
Member Author

ktoso commented Aug 19, 2016

Docs will then be published to http://doc.akka.io/api/akka-http/10.0/

@patriknw
Copy link
Member

Then we would probably want to implement the automatic rst->paradox converter first. It's then needed sooner than I first thought of. Note that @drewhk is interested in writing the converter tool.

@ktoso
Copy link
Member Author

ktoso commented Aug 21, 2016

We could move sphinx, but since that will need re-working paths of includes anyway I thought it might be better to take the hit all at once. Open to suggestions ofc

@patriknw
Copy link
Member

yeah, it all depends on how big the effort is. Let's spend at most 2 days on the converter tool and then community can hopefully do the actual conversion and manual adjustments.

@ktoso
Copy link
Member Author

ktoso commented Aug 21, 2016

Yeah, there was some intent to help signalled on gitter, I hope we'll be able to move it over without too much pain

@drewhk
Copy link
Member

drewhk commented Aug 21, 2016

I can do a timeboxed try with Laika to estimate the effort. I used it before on akka-docs (for different purpose) and it is not rocket science.

@ktoso
Copy link
Member Author

ktoso commented Aug 21, 2016

It can be "mostly" correct, we'll fix the rest manually

@ktoso ktoso modified the milestone: FIRST_STABLE_RELEASE Aug 23, 2016
@ktoso ktoso added the 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted label Aug 24, 2016
@johanandren
Copy link
Member

As far as I got playing around with Laika: https://github.com/johanandren/akkadocs-sphinx2paradox

@johanandren
Copy link
Member

Heh, maybe I should add exactly how far that was:

Some special stuff still not covered, includecode works but not includecode2 yet, warning/info boxes becomes regular text with bold header. Got some warning from some markup, can't remember exactly what it was.

@jonas
Copy link
Member

jonas commented Sep 12, 2016

@johanandren I added a few additional code on top of your repo here: https://github.com/jonas/akkadocs-sphinx2paradox

The current state (with includecode2 and @ref[] directives disabled) can be seen here: https://jonas.github.io/akkadocs-sphinx2paradox/

A list of things to resolve:

  • Convert footnotes.
  • Convert tables (there only seem to be a couple)
  • Convert a couple of cross links.
  • Figure out how to convert figure captions and definition lists? New Paradox directives?
  • Some issues with @@snip which is less flexible (and forgiving) in what it can handle, e.g.:
    • Only one #tag per snippet, and a tag cannot appear multiple times: a Paradox feature request?
    • Doc code does not always "close" the snippet correctly.
  • @ref[]() requires that the file being linked to is known. Could be cached on disk from collected InternalLinkTargets.
  • Figure out how to convert toctree properly using @@toc and @@@ index.

Dependencies:

@ktoso ktoso added t:docs Issues related to the documentation 3 - in progress Someone is working on this ticket and removed 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted labels Sep 12, 2016
@ktoso
Copy link
Member Author

ktoso commented Sep 12, 2016

This is great, I'll move existing docs into this repo today and get the build to work as well.
Looking forward to the next step from your side after that then, thanks a lot!

@jonas
Copy link
Member

jonas commented Sep 13, 2016

WIP branch: https://github.com/jonas/akka-http/tree/wip-paradox
WIP Paradox site: https://jonas.github.io/akka-http/

@ktoso
Copy link
Member Author

ktoso commented Sep 13, 2016

Does that mean it does not make sense for us to import historic commits? #289
Would you be able to PR this soon?

@jrudolph
Copy link
Member

@jonas we've rewritten the whole history one last time again to include history for documentation as well but it's now missing a few infrastructure and auxiliary files. Depending on what's your base for the rewriting you/we may have to copy over other files over from akka again. It's also fine if you continue working on your current version (trying to rebase to our new state might conflict) and we polish just the final result coming out from your conversion. WDYT?

@jonas
Copy link
Member

jonas commented Sep 14, 2016

@jrudolph I've rebased on top of the updated rewritten history you pushed.

The next question is how close to working the conversion needs to be before such a PR is acceptable. The main blocker right now is extracting link text for the ~500 cross-reference (likely doable with some sed scripts to feed the conversion tool) and making the directive snippets work. The latter will be a lot of work and I am wondering if it would be better to leave it broken for now and instead try to solve it via #11 or some interim preprocessing tool that extracts directive docs or snippets from code comments.

@ktoso
Copy link
Member Author

ktoso commented Sep 14, 2016

I think an initial PR would be good already. For the "needs lots of work" perhaps we'd get some help from the community

jonas added a commit to jonas/akka-http that referenced this issue Sep 15, 2016
jonas added a commit to jonas/akka-http that referenced this issue Sep 15, 2016
jonas added a commit to jonas/akka-http that referenced this issue Sep 15, 2016
Converts .rst files to .md in a best effor way using:

 - https://github.com/jonas/akkadocs-sphinx2paradox

Fixes akka#1
jonas added a commit to jonas/akka-http that referenced this issue Sep 15, 2016
Converts .rst files to .md in a best effor way using:

 - https://github.com/jonas/akkadocs-sphinx2paradox

References akka#1
jonas added a commit to jonas/akka-http that referenced this issue Sep 15, 2016
Converts .rst files to .md in a best effor way using:

 - https://github.com/jonas/akkadocs-sphinx2paradox

References akka#1
ktoso pushed a commit that referenced this issue Sep 15, 2016
* Fix warnings being treated as a comment

* Fix space after # in markers

> find docs/ -name "*.scala" | xargs sed -i 's,//# ,//#,'
> find docs/ -name "*.java" | xargs sed -i 's,//# ,//#,'

* Fix missing explicit snippet end markers

> find docs/rst/ -type f | xargs grep -l '//#$' | sort -u

* Add index files

* Fix literalinclude paths

* Initial work on fixing missing or non-supported snippet markers

* Fix includecode paths

> find docs/rst/ -type f | while read file; do up=$(cd $(dirname $file) && git rev-parse --show-cdup); sed -i "s#\(includecode2\?:: \).*\(/akka-http\)#\1$up../..\2#" $file; done
> find docs/rst/ -type f | while read file; do up=$(cd $(dirname $file) && git rev-parse --show-cdup); sed -i "s#\(includecode2\?:: \)/../../#\1$up../../#" $file; done

* Move Java and Scala example code to src/test/{java,scala}

> git mv docs/rst/java/code docs/src/test/java
> find docs/rst/java/ -name "*.rst" | xargs sed -i 's#/code/#/../../../test/java/#'
> git mv docs/rst/scala/code docs/src/test/scala
> find docs/rst/scala/ -name "*.rst" | xargs sed -i 's#/code/#/../../../test/scala/#'

* Remove stylistic rst-class directives

* Replace multiple snippets per lines with shared snippet

* =doc Migrate docs from Sphinx to Paradox

Converts .rst files to .md in a best effor way using:

 - https://github.com/jonas/akkadocs-sphinx2paradox

References #1

* =doc Improve conversion of routing DSL and client-side API overviews

* Fix the docs build

Broken by moving example code to docs/src/test in 926a3b8

* Fixup: Apply docFormatSettings and revert some debug build code

* Minor improvements to @@toc rendering and fix included config files having type=none
@ktoso
Copy link
Member Author

ktoso commented Sep 15, 2016

Not marking as resolved yet, until we've made it to an actual rendered page on doc.akka.io :)

@jonas
Copy link
Member

jonas commented Sep 15, 2016

I saw the ticket about redirecting akka.github.io/akka-http to doc.akka.io/http. Do we also need a ticket for porting the theme? Let me know how I can help.

@ktoso
Copy link
Member Author

ktoso commented Sep 15, 2016

Yes and no, I was hoping to get a designer help us do a proper new theme.
One company has ignored my quote inquiry (boooo!), so I'll try another one ;-)

@ktoso
Copy link
Member Author

ktoso commented Sep 15, 2016

AKA we don't want to spend a lot of time on porting the theme just jet

@ktoso
Copy link
Member Author

ktoso commented Oct 17, 2016

Done thanks to the relentless efforts of @jonas! Thanks a lot!
Let us know if you'd like to continue being strongly involved once the docs things are all said and done btw :-)

@ktoso ktoso removed the 3 - in progress Someone is working on this ticket label Oct 17, 2016
@ktoso ktoso closed this as completed Oct 17, 2016
@jonas
Copy link
Member

jonas commented Oct 18, 2016

@ktoso 👍 I would like to keep contributing as time permits. For now I will mainly focus on tooling and documentation.

jedrekn pushed a commit to jedrekn/akka-http that referenced this issue Nov 17, 2016
* Fix warnings being treated as a comment

* Fix space after # in markers

> find docs/ -name "*.scala" | xargs sed -i 's,//# ,//#,'
> find docs/ -name "*.java" | xargs sed -i 's,//# ,//#,'

* Fix missing explicit snippet end markers

> find docs/rst/ -type f | xargs grep -l '//#$' | sort -u

* Add index files

* Fix literalinclude paths

* Initial work on fixing missing or non-supported snippet markers

* Fix includecode paths

> find docs/rst/ -type f | while read file; do up=$(cd $(dirname $file) && git rev-parse --show-cdup); sed -i "s#\(includecode2\?:: \).*\(/akka-http\)#\1$up../..\2#" $file; done
> find docs/rst/ -type f | while read file; do up=$(cd $(dirname $file) && git rev-parse --show-cdup); sed -i "s#\(includecode2\?:: \)/../../#\1$up../../#" $file; done

* Move Java and Scala example code to src/test/{java,scala}

> git mv docs/rst/java/code docs/src/test/java
> find docs/rst/java/ -name "*.rst" | xargs sed -i 's#/code/#/../../../test/java/#'
> git mv docs/rst/scala/code docs/src/test/scala
> find docs/rst/scala/ -name "*.rst" | xargs sed -i 's#/code/#/../../../test/scala/#'

* Remove stylistic rst-class directives

* Replace multiple snippets per lines with shared snippet

* =doc Migrate docs from Sphinx to Paradox

Converts .rst files to .md in a best effor way using:

 - https://github.com/jonas/akkadocs-sphinx2paradox

References akka#1

* =doc Improve conversion of routing DSL and client-side API overviews

* Fix the docs build

Broken by moving example code to docs/src/test in 926a3b8

* Fixup: Apply docFormatSettings and revert some debug build code

* Minor improvements to @@toc rendering and fix included config files having type=none
ktoso pushed a commit that referenced this issue Dec 22, 2016
jonas pushed a commit to jonas/akka-http that referenced this issue Jan 6, 2017
Manage HTTP/2 TCK dependencies with sbt
jrudolph pushed a commit that referenced this issue Jan 9, 2017
Manage HTTP/2 TCK dependencies with sbt
jrudolph pushed a commit that referenced this issue Oct 21, 2019
Merge upstream into fork
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:docs Issues related to the documentation
Projects
No open projects
Development

No branches or pull requests

6 participants