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

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

Oct. 30, 2017, 4:31 p.m. by wspee
Nov. 14, 2017, 5:30 p.m.
Vasily Kuznetsov


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


Total messages: 2
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

- 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%?


File cms/bin/generate_static_pages.py (right):

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.

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