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

Issue 10934 - D logo not displayed locally when building on Windows. #552

Closed
wants to merge 1 commit into from
Closed

Issue 10934 - D logo not displayed locally when building on Windows. #552

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 22, 2014

https://issues.dlang.org/show_bug.cgi?id=10934

I'm not sure whether this will continue to work on Posix. Can anyone test?

@CyberShadow
Copy link
Member

I don't think it worked on any system when the HTML is opened locally.

Care needs to be taken that this template is only used for pages located on the site root. E.g. phobos pages must use ../images/... or /images/....

@ghost
Copy link
Author

ghost commented Apr 22, 2014

Well it's not a big deal, I can live without the logo locally. But is there a better fix?

@CyberShadow
Copy link
Member

No, I don't think there is. This fix will work with the above-mentioned condition. If we don't have stuff in subdirectories that uses doc.ddoc, it should be fine I think.

@brad-anderson
Copy link
Member

My workaround is to just execute python -m SimpleHTTPServer from the root folder of the repo where the generated html is and then open http://localhost:8000 in your browser. I think it's reasonable to just suggest that if there is a chance changing the paths will break something.

@@ -63,7 +63,7 @@ function bodyLoad()
</div>
<div id="header">
<a id="d-language" href="/">
<img id="logo" width="125" height="95" border="0" alt="D Logo" src="/images/dlogo.png">
<img id="logo" width="125" height="95" border="0" alt="D Logo" src="./images/dlogo.png">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "images/dlogo.png"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That breaks it on phobos docs. We've actually been through this before. It's why I've just given up trying to get them to work and now use the python trick.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But "./images/logo.png" is the same, isn't it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This only fixes it for root pages locally but would break it for phobos docs (the same way the commit that removed the / did and had to be reversed).

There is <base> that I thought of looking into to try to fix this but I'd say we just close this because it's really a relatively minor issue and only one devs hit.

@ghost
Copy link
Author

ghost commented May 29, 2014

You guys are gonna have to take over. I don't have a pc/laptop at my new home yet. Probably in 4/8+ weeks from now.

@MartinNowak
Copy link
Member

You can also use this simple vibe.d program.

dub init serve vibe.d
cd serve
cat > source/app.d << EOF
import vibe.d;

shared static this()
{
    auto settings = new HTTPServerSettings;
    settings.port = 8080;

    listenHTTP(settings, serveStaticFiles("."));
}
EOF
dub build

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

Successfully merging this pull request may close these issues.

4 participants