Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29592634: Issue 5333 - Allow cms to generate relative pages

Created:
Oct. 30, 2017, 4:31 p.m. by wspee
Modified:
Nov. 14, 2017, 5:30 p.m.
Reviewers:
Vasily Kuznetsov
Visibility:
Public.

Description

Issue 5333 - Allow cms to generate relative pages

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -7 lines) Patch
M cms/bin/generate_static_pages.py View 4 chunks +38 lines, -7 lines 2 comments Download

Messages

Total messages: 2
wspee
Still working on tests, the tests in master currently fail and this breaks a few ...
Oct. 30, 2017, 4:40 p.m. (2017-10-30 16:40:30 UTC) #1
Vasily Kuznetsov
Nov. 14, 2017, 5:30 p.m. (2017-11-14 17:30:28 UTC) #2
Hi Winsley,

This looks like a workable solution, but it would need tests and a bit of
polishing. A couple of questions/suggestions:

- I think it might make more sense to move this code to converters and also make
it work in the dynamic preview. Is there a particular reason you didn't go this
way?

- Have you tested the performance impact of this filter (compared to the rest of
the CMS)? Is it like 3% or more like 30% or 300%?

Cheers,
Vasily

https://codereview.adblockplus.org/29592634/diff/29592635/cms/bin/generate_st...
File cms/bin/generate_static_pages.py (right):

https://codereview.adblockplus.org/29592634/diff/29592635/cms/bin/generate_st...
cms/bin/generate_static_pages.py:95: def rewrite_link(link):
This seems like it would work but the links would look nicer if we compact the
unnecessary pairs of `../some_path`, where the `some_path` part is the same in
the link and in the current page. Perhaps this is not first priority though and
is more of a cosmetic feature.

https://codereview.adblockplus.org/29592634/diff/29592635/cms/bin/generate_st...
cms/bin/generate_static_pages.py:114: for src_zoom in
elem.attrib['srcset'].split(', '):
Is the space after the comma mandatory? Otherwise we can't just split by ', ',
we need to split by comma.

Powered by Google App Engine
This is Rietveld