From c42475cea23bfdb22b5d6cad6042577e47bd6a5c Mon Sep 17 00:00:00 2001 From: pdr Date: Thu, 7 Jul 2016 14:48:52 -0700 Subject: [PATCH] Update markdown to use absolute image paths, fixing broken images Markdown can be served with or without a trailing slash but when a trailing slash is present, relative image links were broken. The following example works as expected: url: https://skia.org/dev/design/pdftheory image url: PdfLogicalDocumentStructure.png resolves to: https://skia.org/dev/design/PdfLogicalDocumentStructure.png The following example was broken before this patch: url: https://skia.org/dev/design/pdftheory/ image url: PdfLogicalDocumentStructure.png resolves to: https://skia.org/dev/design/pdftheory/PdfLogicalDocumentStructure.png The PdfLogicalDocumentStructure.png file lives in /dev/design/, not /dev/design/pdftheory/. This patch updates all images in our markdown files to be served with the full path so a trailing slash no longer breaks images. I hit this bug when promoting the new Skia debugger: https://groups.google.com/a/chromium.org/d/msg/paint-dev/QJ8xpu8dNyA/F4KX2O4ZBwAJ BUG=skia:5493 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2128013003 NOTRY=true DOCS_PREVIEW= https://skia.org/?cl=2128013003 Review-Url: https://codereview.chromium.org/2128013003 --- site/dev/design/pdftheory.md | 2 +- site/dev/tools/debugger.md | 2 +- site/dev/tools/markdown.md | 2 +- site/dev/tools/qtdebugger.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/dev/design/pdftheory.md b/site/dev/design/pdftheory.md index 29ccf91..e0433ba 100644 --- a/site/dev/design/pdftheory.md +++ b/site/dev/design/pdftheory.md @@ -71,7 +71,7 @@ longer document with a bunch of other pages. PDF Objects and Document Structure ---------------------------------- -![PDF Logical Document Structure](PdfLogicalDocumentStructure.png) +![PDF Logical Document Structure](/dev/design/PdfLogicalDocumentStructure.png) **Background**: The PDF file format has a header, a set of objects and then a footer that contains a table of contents for all of the objects diff --git a/site/dev/tools/debugger.md b/site/dev/tools/debugger.md index cd07625..8a82287 100644 --- a/site/dev/tools/debugger.md +++ b/site/dev/tools/debugger.md @@ -26,4 +26,4 @@ Begin by following the instructions to After running `skiaserve`, follow the instructions to open the debugger in your local browser. By default the address will be `http://127.0.0.1:8888`. -![Debugger interface](onlinedebugger.png) +![Debugger interface](/dev/tools/onlinedebugger.png) diff --git a/site/dev/tools/markdown.md b/site/dev/tools/markdown.md index dc7c5d1..59551a4 100644 --- a/site/dev/tools/markdown.md +++ b/site/dev/tools/markdown.md @@ -71,7 +71,7 @@ ordered and unordered lists: Incorporate images: -![image](image.png) +![image](/dev/tools/image.png) Or go old school and use [ASCII art](http://asciiflow.com/): diff --git a/site/dev/tools/qtdebugger.md b/site/dev/tools/qtdebugger.md index e3c5a1f..bb3f97e 100644 --- a/site/dev/tools/qtdebugger.md +++ b/site/dev/tools/qtdebugger.md @@ -115,6 +115,6 @@ down below. ctrl-shift-s | Saves the skp under the new specified name ctrl-q | Quits -![Debugger interface](debugger.png) +![Debugger interface](/dev/tools/debugger.png) -- 2.7.4