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

How to replace "Doks" in top left of screen #909

Open
h-enk opened this issue Sep 20, 2022 Discussed in #905 · 2 comments
Open

How to replace "Doks" in top left of screen #909

h-enk opened this issue Sep 20, 2022 Discussed in #905 · 2 comments

Comments

@h-enk
Copy link
Member

h-enk commented Sep 20, 2022

Discussed in #905

Originally posted by purplefox September 19, 2022
Hi, I am new to Doks and interested in using it for my project website.

I would like to replace "Doks" in the top left of the screen (which links to the home page) with my project logo, but I couldn't figure out how to configure doks to do that.

Any help greatly appreciated

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Oct 21, 2022
@h-enk h-enk added keep and removed stale labels Oct 22, 2022
@LazyScholar
Copy link

Pull the Starter Theme and insert the image html in layouts/partials/header/header.html:

diff --git a/layouts/partials/header/header.html b/layouts/partials/header/header.html
index bb5ae72..c4b2f18 100644
--- a/layouts/partials/header/header.html
+++ b/layouts/partials/header/header.html
@@ -1,3 +1,5 @@
+{{ $logo := resources.Get (printf "%s%s" "images/" site.Params.logo) }}
+
 {{ if .Site.Params.alert -}}
   {{ partial "header/alert.html" . }}
 {{ end -}}
@@ -12,7 +14,7 @@
   <nav class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }} flex-wrap flex-lg-nowrap" aria-label="Main navigation">
 
     <a class="navbar-brand order-0" href="{{ .Site.BaseURL | relLangURL }}" aria-label="{{ .Site.Params.Title }}">
-      {{ .Site.Params.Title }}
+      <img src="{{ $logo.Permalink }}" alt="{{ .Site.Params.Title }}" style="width: auto; height: auto; display: inline; max-height: 1.75em;"/>
     </a>
 
     {{ if (in .Site.Params.sections.sectionNav .Section) -}}

@h-enk h-enk removed the keep label Jan 8, 2024
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