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

change the photo in the index #2

Open
hustlrr opened this issue Dec 18, 2016 · 2 comments
Open

change the photo in the index #2

hustlrr opened this issue Dec 18, 2016 · 2 comments

Comments

@hustlrr
Copy link

hustlrr commented Dec 18, 2016

May I ask that how I change the photo in the index of this theme

@specious
Copy link
Contributor

I just changed the logo path in the theme configuration file.

Specifically, I set:

logo: asset/portrait.jpg

Which corresponds to a file, public/asset/portrait.jpg. I'm hosting my blog in a subdirectory at https://specious.github.io/blog/ so using an absolute path didn't work.

@specious
Copy link
Contributor

Actually, I also made a change in layout/layout.ejs to accommodate the subdirectory:

--- a/layout/layout.ejs
+++ b/layout/layout.ejs

         <header id="header">
-            <% if (theme.logo) { %><a id="logo" href="<%- config.root %>"><img src="<%- theme.logo %>" alt="<%- config.title%>" /></a><% } %>
+            <% if (theme.logo) { %><a id="logo" href="<%- config.root %>"><img src="<%- config.root + theme.logo %>" alt="<%- config.title%>" /></a><% } %>
             <h1><a href="<%- config.root %>"><%- config.author %></a></h1>
             <p><%- config.subtitle %></p>
             <%- partial('_partial/follow') %>

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