Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug: should the margin-header image reference link be relative/local rather than global/https ? #67

Open
mh0w opened this issue Sep 18, 2023 · 2 comments

Comments

@mh0w
Copy link

mh0w commented Sep 18, 2023

Describe the bug
Sorry if I'm not describing the possible bug very well. Grateful for any thoughts on why I encountered this issue while others (presumably) did not.

I cloned the coding-in-the-open repo and found that I could not render or preview. When trying to do so, I'd get the following error message:

PS C:\Users\hawkem\coding-in-the-open> quarto render
ERROR: The filename, directory name, or volume label syntax is incorrect. (os error 123), stat '<a href="https://datasciencecampus.ons.gov.uk/">
  <img src="https://datasciencecampus.ons.gov.uk/wp-content/uploads/sites/10/2017/03/data-science-campus-logo-new.svg" alt="Data Science Campus logo">
</a>
'

Error: The filename, directory name, or volume label syntax is incorrect. (os error 123), stat '<a href="https://datasciencecampus.ons.gov.uk/">
  <img src="https://datasciencecampus.ons.gov.uk/wp-content/uploads/sites/10/2017/03/data-science-campus-logo-new.svg" alt="Data Science Campus logo">
</a>
'
    at Object.lstatSync (deno:runtime/js/30_fs.js:305:9)
    at existsSync (file:///C:/Program%20Files/Quarto/bin/quarto.js:492:14)
    at resolveProjectPaths (file:///C:/Program%20Files/Quarto/bin/quarto.js:83448:13)
    at Array.map (<anonymous>)
    at Object.websiteProjectConfig [as config] (file:///C:/Program%20Files/Quarto/bin/quarto.js:83455:73)
    at projectContext (file:///C:/Program%20Files/Quarto/bin/quarto.js:82789:48)
    at async render (file:///C:/Program%20Files/Quarto/bin/quarto.js:90657:21)
    at async Command.fn (file:///C:/Program%20Files/Quarto/bin/quarto.js:90856:32)
    at async Command.execute (file:///C:/Program%20Files/Quarto/bin/quarto.js:8437:13)
    at async quarto (file:///C:/Program%20Files/Quarto/bin/quarto.js:127545:5)
PS C:\Users\hawkem\coding-in-the-open>

I was able to resolve this issue in my case by downloading the data-science-campus-logo-new.svg image to the ../assets/image folder and then changing the image reference in _quarto.yml like so:

# How it was before:
  margin-header: |
    <a href="https://datasciencecampus.ons.gov.uk/">
      <img src="https://datasciencecampus.ons.gov.uk/wp-content/uploads/sites/10/2017/03/data-science-campus-logo-new.svg" alt="Data Science Campus logo">
    </a>

# The new version:
  margin-header: |
    ![Data Science Campus logo](/assets/images/data-science-campus-logo-new.svg)

After implementing this change, I find I can render normally:

PS C:\Users\hawkem\coding-in-the-open> quarto render
[ 1/10] CONTRIBUTING.md
Sending fatal alert BadCertificate
[ 2/10] general-considerations\guidance.qmd
[ 3/10] general-considerations\references.qmd
[ 4/10] index.qmd
[ 5/10] never-open\guidance.qmd
[ 6/10] open-at-the-end\guidance.qmd
[ 7/10] open-at-the-end\process-chart.qmd
[ 8/10] open-at-the-end\risk-table.qmd
[ 9/10] open-at-the-start\guidance.qmd
[10/10] what-could-go-wrong\checklist.qmd

Output created: docs\index.html

To Reproduce
Steps to reproduce the behavior:

  1. Clone coding-in-the-open repo (main branch)
  2. Try to quarto render
  3. See error

Expected behavior
I expect quarto to render successfully, but it does not unless I implement the change I describe above.

Desktop (please complete the following information):

  • OS: Win10
  • Browser: not sure this is relevant here, but Chrome 115.0.5790.171
@r-leyshon
Copy link
Contributor

@mh0w that's interesting, thanks for raising. There's accessibility reasons to keep the img tag rather than markdown. As you're on a network machine, I wonder if it's a proxy issue.

Could you try accessing Bash and try to run:

curl -i https://datasciencecampus.ons.gov.uk/wp-content/uploads/sites/10/2017/03/data-science-campus-logo-new.svg
If you're not seeing a HTTP 200 response, I'd imagine that's preventing the successful render. Notably, the way we have the CI setup should not prevent a network machine user from contributing because they cannot locally render the site, but that's not ideal all the same.

I also notice that you encounter a certificate issue when rendering your local changes, alternative to proxy problems, it could be an SSL thing:
Sending fatal alert BadCertificate

@mh0w
Copy link
Author

mh0w commented Sep 26, 2023

@r-leyshon thanks for sharing your thoughts on this.

The footer uses markdown rather than the img tag, but presumably the accessibility requirements are different for the footer.

I tried the curl command you suggested. I do indeed get the HTTP/2 200 response.

$ curl -i https://datasciencecampus.ons.gov.uk/wp-content/uploads/sites/10/2017/03/data-science-campus-logo-new.svg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0HTTP/2 200
content-type: image/svg+xml
content-length: 7902
date: Tue, 26 Sep 2023 07:32:39 GMT
server: nginx
last-modified: Thu, 15 Sep 2022 15:51:48 GMT
etag: "63234a14-1ede"
cache-control: public, max-age=604800
accept-ranges: bytes
vary: Accept-Encoding
x-cache: Hit from cloudfront
via: 1.1 f7d577dfe2817079490d95ef03bbf5fa.cloudfront.net (CloudFront)
x-amz-cf-pop: LHR62-C5
x-amz-cf-id: 5of3n9oFdA7aYTm3IasQRO84nt2NHvsz8utYRWBW9s65S35_ZyvSjA==
age: 1424

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
         width="159.5px" height="43.6px" viewBox="0 0 159.5 43.6" style="enable-background:new 0 0 159.5 43.6;" xml:space="preserve">
<style type="text/css">
        .st0{fill:#003D59;}
        .st1{fill:#E6007C;}
        .st2{fill:#A8BD3A;}
        .st3{fill:#E9500E;}
</style>
<title>Artboard 1</title>
<g>
        <g>
                <path class="st0" d="M53.5,17.8c-1.8,0-3.1-0.3-4.1-0.8V3.8c0.5-0.2,1.1-0.4,1.7-0.6C51.8,3.1,52.5,3,53.3,3C55.4,3,57,3.6,58,5
                        s1.6,3.1,1.6,5.3c0,2.3-0.5,4.1-1.5,5.5C57.1,17.1,55.5,17.8,53.5,17.8z M53.4,4.7c-0.5,0-1,0.1-1.4,0.2v10.8
                        c0.2,0.1,0.4,0.1,0.6,0.1c0.2,0,0.5,0.1,0.8,0.1c1.2,0,2.1-0.5,2.6-1.4s0.8-2.4,0.8-4.4c0-1.9-0.3-3.3-0.8-4.2
                        C55.5,5.2,54.6,4.7,53.4,4.7z"/>
                <path class="st0" d="M65.8,17.8c-1.5,0-2.7-0.3-3.4-0.9c-0.8-0.6-1.1-1.5-1.1-2.5c0-1.4,0.5-2.4,1.7-3s2.6-1,4.7-1.2V9.6
                        c0-0.7-0.2-1.1-0.6-1.5c-0.4-0.3-0.9-0.4-1.7-0.4c-0.5,0-1,0.1-1.5,0.2S63,8.2,62.5,8.4L61.9,7c0.5-0.2,1-0.4,1.7-0.6
                        c0.6-0.2,1.4-0.2,2.2-0.2c1.3,0,2.3,0.3,3,0.9s1.1,1.6,1.1,3v7c-0.5,0.2-1,0.4-1.8,0.6C67.4,17.8,66.7,17.8,65.8,17.8z M67.5,11.4
                        c-1.4,0.2-2.3,0.4-3,0.8c-0.6,0.4-0.9,1.1-0.9,2c0,0.7,0.2,1.3,0.6,1.6c0.4,0.3,1,0.5,1.8,0.5c0.6,0,1.1-0.1,1.5-0.3V11.4
                        L67.5,11.4z"/>
                <path class="st0" d="M76.2,17.8c-1,0-1.8-0.3-2.3-0.9s-0.8-1.3-0.8-2.2V8h-1.3V6.3h1.3V3.8l2.6-0.7v3.2h1.9V8h-1.9v6.6
                        c0,1,0.4,1.5,1.3,1.5c0.2,0,0.4,0,0.6-0.1v1.6c-0.1,0.1-0.3,0.1-0.5,0.2C76.7,17.7,76.4,17.8,76.2,17.8z"/>
                <path class="st0" d="M83.4,17.8c-1.5,0-2.7-0.3-3.4-0.9c-0.8-0.6-1.1-1.5-1.1-2.5c0-1.4,0.5-2.4,1.7-3c1.1-0.6,2.6-1,4.7-1.2V9.6
                        c0-0.7-0.2-1.1-0.6-1.5c-0.4-0.3-0.9-0.4-1.7-0.4c-0.5,0-1,0.1-1.5,0.2s-0.9,0.3-1.4,0.5L79.5,7c0.5-0.2,1-0.4,1.7-0.6
                        c0.6-0.2,1.4-0.2,2.2-0.2c1.3,0,2.3,0.3,3,0.9s1.1,1.6,1.1,3v7c-0.5,0.2-1,0.4-1.8,0.6C85,17.8,84.3,17.8,83.4,17.8z M85.1,11.4
                        c-1.4,0.2-2.3,0.4-3,0.8c-0.6,0.4-0.9,1.1-0.9,2c0,0.7,0.2,1.3,0.6,1.6s1,0.5,1.8,0.5c0.6,0,1.1-0.1,1.5-0.3V11.4L85.1,11.4z"/>
                <path class="st0" d="M98.5,17.8c-0.8,0-1.5-0.1-2.1-0.2c-0.5-0.1-1-0.3-1.5-0.6l0.6-1.9c0.3,0.2,0.6,0.4,1,0.5s0.8,0.2,1.4,0.2
                        c0.7,0,1.3-0.2,1.7-0.6c0.4-0.4,0.6-0.9,0.6-1.6c0-0.5-0.2-1-0.5-1.4s-1-0.7-1.9-1.1c-0.9-0.4-1.7-0.9-2.1-1.6
                        C95.3,8.8,95,8.1,95,7.3c0-1.2,0.4-2.2,1.2-3C97,3.4,98.1,3,99.4,3c0.7,0,1.3,0.1,1.8,0.2c0.5,0.1,1,0.3,1.3,0.6L102,5.4
                        c-0.3-0.2-0.6-0.3-1-0.5c-0.4-0.1-0.8-0.2-1.2-0.2c-0.6,0-1.1,0.2-1.5,0.6s-0.5,0.9-0.5,1.5s0.2,1,0.5,1.4c0.4,0.4,1,0.7,2.1,1.1
                        c1,0.4,1.7,1,2.2,1.7s0.7,1.5,0.7,2.3c0,1.3-0.4,2.3-1.3,3.2C100.9,17.4,99.8,17.8,98.5,17.8z"/>
                <path class="st0" d="M109.3,17.8c-1.3,0-2.4-0.5-3.2-1.6c-0.8-1-1.3-2.5-1.3-4.3s0.4-3.2,1.3-4.3c0.8-1,1.9-1.6,3.2-1.6
                        c0.6,0,1.2,0.1,1.6,0.2s0.8,0.3,1,0.5l-0.5,1.5c-0.2-0.1-0.4-0.3-0.6-0.3c-0.2-0.1-0.5-0.1-0.9-0.1c-0.8,0-1.5,0.3-1.9,1
                        c-0.4,0.7-0.6,1.7-0.6,3s0.2,2.3,0.6,3s1,1.1,1.8,1.1c0.3,0,0.6,0,0.9-0.1s0.4-0.2,0.7-0.4L112,17c-0.2,0.2-0.6,0.4-1,0.6
                        C110.5,17.8,109.9,17.8,109.3,17.8z"/>
                <path class="st0" d="M115.1,4.4c-0.4,0-0.7-0.1-1-0.4c-0.3-0.2-0.4-0.5-0.4-0.9s0.1-0.7,0.4-0.9s0.6-0.4,1-0.4s0.7,0.1,1,0.4
                        c0.3,0.2,0.4,0.5,0.4,0.9c0,0.3-0.1,0.6-0.4,0.9C115.8,4.3,115.5,4.4,115.1,4.4z M113.8,17.6V6.3h2.6v11.3H113.8z"/>
                <path class="st0" d="M121,12.9c0.2,2.1,1.3,3.1,3.1,3.1c0.6,0,1.1-0.1,1.6-0.2c0.5-0.1,0.9-0.3,1.3-0.5l0.6,1.6
                        c-0.4,0.2-0.9,0.4-1.6,0.6c-0.6,0.1-1.3,0.2-2.2,0.2c-1.6,0-2.9-0.5-3.8-1.5s-1.4-2.5-1.4-4.4c0-1.8,0.4-3.2,1.3-4.3
                        c0.8-1,2-1.6,3.5-1.6s2.6,0.5,3.4,1.5s1.1,2.4,1.1,4.3L121,12.9z M123.3,7.7c-0.8,0-1.4,0.3-1.8,1s-0.6,1.6-0.6,2.9l4.7-0.7
                        c0-1.1-0.2-1.9-0.6-2.4C124.6,8,124,7.7,123.3,7.7z"/>
                <path class="st0" d="M136.3,17.6v-8c0-0.5-0.2-1-0.5-1.4c-0.3-0.4-0.8-0.5-1.6-0.5c-0.4,0-0.7,0-0.9,0.1c-0.2,0-0.5,0.1-0.8,0.2
                        v9.6H130V6.9c0.5-0.2,1.2-0.4,1.9-0.6c0.7-0.1,1.6-0.2,2.5-0.2c1.6,0,2.7,0.3,3.4,1c0.7,0.6,1.1,1.5,1.1,2.5v8H136.3L136.3,17.6z"
                        />
                <path class="st0" d="M145.4,17.8c-1.3,0-2.4-0.5-3.2-1.6c-0.8-1-1.3-2.5-1.3-4.3s0.4-3.2,1.3-4.3c0.8-1,1.9-1.6,3.2-1.6
                        c0.6,0,1.2,0.1,1.6,0.2c0.4,0.1,0.8,0.3,1,0.5l-0.5,1.5c-0.2-0.1-0.4-0.3-0.6-0.3c-0.2-0.1-0.5-0.1-0.9-0.1c-0.8,0-1.5,0.3-1.9,1
                        s-0.6,1.7-0.6,3s0.2,2.3,0.6,3c0.4,0.7,1,1.1,1.8,1.1c0.3,0,0.6,0,0.9-0.1s0.4-0.2,0.7-0.4l0.6,1.6c-0.2,0.2-0.6,0.4-1,0.6
                        C146.6,17.8,146.1,17.8,145.4,17.8z"/>
                <path class="st0" d="M151.9,12.9c0.2,2.1,1.3,3.1,3.1,3.1c0.6,0,1.1-0.1,1.6-0.2c0.5-0.1,0.9-0.3,1.3-0.5l0.6,1.6
                        c-0.4,0.2-0.9,0.4-1.6,0.6c-0.6,0.1-1.3,0.2-2.2,0.2c-1.6,0-2.9-0.5-3.8-1.5c-0.9-1-1.4-2.5-1.4-4.4c0-1.8,0.4-3.2,1.3-4.3
                        c0.8-1,2-1.6,3.5-1.6s2.6,0.5,3.4,1.5c0.8,1,1.1,2.4,1.1,4.3L151.9,12.9z M154.2,7.7c-0.8,0-1.4,0.3-1.8,1
                        c-0.4,0.6-0.6,1.6-0.6,2.9l4.7-0.7c0-1.1-0.2-1.9-0.6-2.4C155.5,8,154.9,7.7,154.2,7.7z"/>
                <path class="st0" d="M54.5,39.4c-1.8,0-3.1-0.7-4.1-2.1c-1-1.4-1.5-3.2-1.5-5.3s0.5-3.8,1.5-5.3c1-1.4,2.3-2.2,4.1-2.2
                        c0.6,0,1.2,0.1,1.7,0.2s0.9,0.3,1.3,0.6l-0.6,1.6c-0.2-0.1-0.5-0.3-0.8-0.4s-0.7-0.1-1-0.1c-1.1,0-2,0.5-2.5,1.6
                        c-0.5,1-0.8,2.4-0.8,3.9c0,1.6,0.3,2.8,0.8,3.9c0.5,1,1.4,1.6,2.5,1.6c0.4,0,0.7,0,1-0.1s0.5-0.2,0.8-0.4l0.6,1.7
                        C56.8,39.1,55.8,39.4,54.5,39.4z"/>
                <path class="st0" d="M63.3,39.4c-1.5,0-2.7-0.3-3.4-0.9c-0.8-0.6-1.1-1.5-1.1-2.5c0-1.4,0.5-2.4,1.7-3c1.1-0.6,2.6-1,4.7-1.2v-0.6
                        c0-0.7-0.2-1.1-0.6-1.5c-0.4-0.3-0.9-0.4-1.7-0.4c-0.5,0-1,0.1-1.5,0.2S60.5,29.8,60,30l-0.6-1.5c0.5-0.2,1-0.4,1.7-0.6
                        c0.6-0.2,1.4-0.2,2.2-0.2c1.3,0,2.3,0.3,3,0.9c0.7,0.6,1.1,1.6,1.1,3v7c-0.5,0.2-1,0.4-1.8,0.6C64.9,39.3,64.1,39.4,63.3,39.4z
                         M65,33c-1.4,0.2-2.3,0.4-3,0.8c-0.6,0.4-0.9,1.1-0.9,2c0,0.7,0.2,1.3,0.6,1.6c0.4,0.3,1,0.5,1.8,0.5c0.6,0,1.1-0.1,1.5-0.3V33
                        L65,33z"/>
                <path class="st0" d="M82.5,39.2v-8c0-0.5-0.2-1-0.5-1.3s-0.8-0.5-1.5-0.5s-1.4,0.3-1.9,0.8v9.1h-2.5v-8.1c0-0.6-0.2-1-0.5-1.3
                        c-0.4-0.3-0.9-0.5-1.6-0.5c-0.6,0-1.2,0.1-1.7,0.3v9.6h-2.6V28.5c0.6-0.3,1.2-0.5,1.9-0.6c0.7-0.1,1.5-0.2,2.4-0.2
                        s1.6,0.1,2.2,0.3c0.5,0.2,1,0.5,1.4,0.9c0.4-0.4,0.9-0.7,1.5-0.9c0.6-0.2,1.3-0.3,2.1-0.3c1.3,0,2.2,0.3,2.9,1
                        c0.6,0.7,1,1.5,1,2.5v8L82.5,39.2L82.5,39.2z"/>
                <path class="st0" d="M91.8,39.3c-0.3,0-0.6,0-0.9-0.1c-0.3,0-0.6-0.1-0.7-0.2v4.6h-2.5V28.5c0.5-0.3,1-0.5,1.7-0.6
                        s1.4-0.2,2.3-0.2c1.7,0,2.9,0.5,3.9,1.5c0.9,1,1.4,2.4,1.4,4.2s-0.4,3.3-1.4,4.3C94.5,38.8,93.3,39.3,91.8,39.3z M91.5,29.2
                        c-0.5,0-0.9,0.1-1.3,0.2v8.2c0.3,0.1,0.7,0.2,1.1,0.2c1,0,1.7-0.4,2.2-1.1c0.5-0.7,0.8-1.8,0.8-3.2s-0.2-2.5-0.6-3.2
                        C93.2,29.5,92.5,29.2,91.5,29.2z"/>
                <path class="st0" d="M103.3,39.4c-1.5,0-2.6-0.3-3.3-0.9c-0.7-0.6-1.1-1.6-1.1-2.8V28h2.6v7.8c0,0.6,0.2,1,0.5,1.4
                        c0.3,0.3,0.8,0.5,1.5,0.5s1.3-0.1,1.7-0.4v-9.4h2.6v10.6c-0.5,0.3-1.1,0.5-1.9,0.6C105,39.3,104.2,39.4,103.3,39.4z"/>
                <path class="st0" d="M112.6,39.3c-0.6,0-1.2-0.1-1.8-0.2c-0.5-0.1-1-0.3-1.4-0.6l0.7-1.7c0.2,0.2,0.5,0.3,0.9,0.5s0.8,0.2,1.2,0.2
                        c0.5,0,0.9-0.1,1.3-0.4c0.3-0.3,0.5-0.7,0.5-1.1c0-0.5-0.1-0.9-0.4-1.1c-0.2-0.3-0.8-0.5-1.6-0.8c-0.8-0.3-1.4-0.7-1.8-1.3
                        c-0.4-0.5-0.5-1.1-0.5-1.8c0-0.9,0.3-1.7,1-2.3c0.6-0.6,1.5-0.9,2.6-0.9c0.6,0,1.1,0.1,1.6,0.2s0.9,0.3,1.3,0.6l-0.6,1.5
                        c-0.2-0.2-0.5-0.3-0.8-0.4s-0.6-0.2-1-0.2c-0.5,0-0.9,0.1-1.2,0.4c-0.3,0.3-0.4,0.6-0.4,1s0.1,0.8,0.4,1c0.3,0.3,0.8,0.6,1.6,0.9
                        c0.8,0.3,1.4,0.7,1.8,1.3s0.6,1.1,0.6,1.9c0,1-0.4,1.8-1.1,2.4C114.8,39,113.8,39.3,112.6,39.3z"/>
        </g>
        <path class="st1" d="M0.2,6.3v5.2c9.7,1,17.2,8.3,17.2,17.1c0,4-1.6,7.7-4.2,10.7h12.1c2.3-3.1,3.6-6.7,3.6-10.5
                C28.8,17,16.1,7.2,0.2,6.3z"/>
        <path class="st2" d="M14.7,28.7c0-7.3-6.3-13.4-14.5-14.4v25.1h9.1C12.6,36.7,14.7,32.9,14.7,28.7z"/>
100  7902  100  7902    0     0  45086      0 --:--:-- --:--:-- --:--:-- 45413.4,11.5,30.4,24.3c0,3.8-1.1,7.3-3.2,10.5h7.3
                c2.5,0,4.5-2,4.5-4.5V16.4C33.2,7.9,20.6,1.7,5.4,0.3z"/>
</g>
<path class="st0" d="M39.2,14.4V0.3H13.7C24.8,2.7,33.9,7.8,39.2,14.4z"/>
</svg>

$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants