-
Notifications
You must be signed in to change notification settings - Fork 34
Added split documentation from main repo #4
Added split documentation from main repo #4
Conversation
This renders now using Bookdown - it looks right to me @weierophinney. |
@@ -0,0 +1 @@ | |||
{"title":"Zend\\Authentication","target":"html\/","content":["book\/zend.authentication.intro.md","book\/zend.authentication.adapter.dbtable.md","book\/zend.authentication.adapter.digest.md","book\/zend.authentication.adapter.http.md","book\/zend.authentication.adapter.ldap.md","book\/zend.authentication.validator.authentication.md"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can u make this file more readable? Line breaks, indentation...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree; we'll need to be able to edit it in order to insert or re-order pages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@GeeH This is awesome! Here's a list of general issues I see in the conversion:
My guess is that most of the formatting issues are due to the conversion from rst to markdown via pandoc. If so, we may be able to solve points 1, 2, and 5 by post-processing the results:
Point 3 we might be able to handle via regex: Point 4 will be harder. I'm not entirely sure how we'll handle it, to be honest, until we start building the master manual. We could potentially link these to where the markdown files will live in each repo, however: eg., As for 6, pass it through |
Agreed, I'll look at modifying the script for 1,2 and 5 tomorrow and resubmit. |
Script now adds human readable JSON - thanks @danizord |
|
I've done 5 to the best of my ability. @weierophinney - what do you think about 3 and 4 please? |
@GeeH Looks great! I agree with your assessment of my third point:
I also think this applies to 5 (as you and I determined that most of the formatting problems are not handled by either php-cs-fixer or phpcbf at this time). As for 4, I agree. However, I'd like to do the following:
I think this will ensure we can get them fixed well in the future. Since they follow a standard syntax, you should be able to pre-process them easily: $contents = preg_replace('/:ref:`(?P<text>[^<]+)<(?P<link>[^>]+)>`/s', '[$1]($2)', $contents); |
Roger that... on it. |
Damn you to Hades with your pre processing |
Ok, that's now done @weierophinney - what's next? |
`Zend\Authentication\AuthenticationService::authenticate()` stores the identity from the | ||
authentication result into persistent storage. Unless specified otherwise, | ||
`Zend\Authentication\AuthenticationService` uses a storage class named | ||
`Zend\Authentication\Storage\Session`, which, in turn, uses [Zend\\Session ](zend.session). A custom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crap. Looks like we need to adjust the PCRE to:
$docs = preg_replace('/:ref:`(.*?) <([^>]+)>`/', '[$1]($2)', $docs);
(links have the sequence <
; previous regex wasn't taking into account the whitespace before the <
, which leads to extra whitespace inside the link text).
Once the regex is corrected for the links and you're re-run and pushed, I'll merge this. Then it's a matter of moving on to the next repos. :) |
Looking better 😎 |
Added split documentation from main repo
This is just a first stab, but I have a script that can do this now - @weierophinney does this look right to you? I haven't tried rendering with Bookdown yet.