Merge lp:~davidc3/developer-ubuntu-com/1471160_publication into lp:~dholbach/developer-ubuntu-com/1471160
| Status: | Merged |
|---|---|
| Merged at revision: | 136 |
| Proposed branch: | lp:~davidc3/developer-ubuntu-com/1471160_publication |
| Merge into: | lp:~dholbach/developer-ubuntu-com/1471160 |
| Diff against target: |
186 lines (+92/-27) 1 file modified
developer_portal/management/commands/import-snappy-branches.py (+92/-27) |
| To merge this branch: | bzr merge lp:~davidc3/developer-ubuntu-com/1471160_publication |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Daniel Holbach | 2015-07-16 | Approve on 2015-07-16 | |
|
Review via email:
|
|||
Description of the Change
This is the publication part of the Snappy doc importer. Here is the whole process:
1) The previously imported documentation is removed
2) The importer gets new branches
3) A page is created for each branch at "snappy/
-- These pages are not visible in navigation
-- The "current" page redirects to "snappy/guides"
-- FIXME these pages are currently empty
4) Each set of docs is published under its own <alias> namespace
-- eg."snappy/
-- They are visible in navigation when the user is at:
--- "snappy/
5) Redirects are created for "snappy/
-- They are visible in navigation when user at "snappy/guides"
- 137. By David Callé on 2015-07-16
-
Make page titles more explicit about the origin of the doc
| Daniel Holbach (dholbach) wrote : | # |
- 138. By David Callé on 2015-07-16
-
Replace filename.
split(/ )[-1] with os.path. basename( filename)
| Daniel Holbach (dholbach) wrote : | # |
_slugify could probably be a function as opposed to being a method.
| Daniel Holbach (dholbach) wrote : | # |
How does updating of articles work? Will a new page be created nonetheless or does create_page() work similarly to get_or_create()?
| Daniel Holbach (dholbach) wrote : | # |
One file with the title "Cross Build.Md" was imported.
| David Callé (davidc3) wrote : | # |
Pages are created from scratch each time, since everything existing is removed when the importer starts, this way we don't have leftovers when a page is removed or renamed in branches.
| Daniel Holbach (dholbach) wrote : | # |
"Back to the latest stable release ›" link does not work.
| David Callé (davidc3) wrote : | # |
That's a fix for the doc branch, afaict :) (unless we want to deal with wrongly formatted/named pages, but I think we shouldn't and enforce a strict "docs doesn't break" policy upstream)
| David Callé (davidc3) wrote : | # |
"Back to the latest stable release ›" link does not work.
Can you paste one of these here ? I have things like "http://
| Daniel Holbach (dholbach) wrote : | # |
<div class="box pull-three three-col"><p>You are browsing the Snappy <code>rolling<
<div class="eight-col">
| Daniel Holbach (dholbach) wrote : | # |
"Cross Build.Md" → "Cross Build" as a fallback maybe?
| David Callé (davidc3) wrote : | # |
Huh, that's an odd paste...
Not sure about the fallback. We can cater for this specific case, sure, but seeing doc names such as "The hashes.yaml file" makes me think we shouldn't try to sanitize, but fix it upstream. If the doc is wrongly formatted, let's not pretend it isn't.
| Daniel Holbach (dholbach) wrote : | # |
For "Cross Build.Md" this might fix it:
return os.path.
→
return _slugify(
... or something?
- 139. By David Callé on 2015-07-16
-
Slugify misc fixes
| David Callé (davidc3) wrote : | # |
Sounds good to me. Fixed + made it a function.
| Daniel Holbach (dholbach) wrote : | # |
I'll merge this now and will just add a couple of FIXME entries. These branches are still WIP anyway.
Thanks a lot. Truly fantastic work!


Replace filename. split(' /')[-1] with os.path. basename( filename) maybe.