Decided rather continue to frustrate myself, I’d ask the experts.
Tried to post need links, however, being a new user I keep getting the two link warning no matter how many links I post - so I’ve truncated the links below, removing https.
Hugo Version: Hugo Static Site Generator v0.73.0-428907CC/extended linux/amd64
Theme: themes.gohugo.io/hugo-theme-meme
Issue: Need to render my own svg logo, not sure how to edit svg.toml without breaking anything.
Stored in: siteroot-themes-meme-data
The SVG.toml file in question: justpaste.it/6qznx
(As you can see, there is one path d=)
My created svg image: justpaste.it/45mwn
(My created svg has multiple path d= which mean all attempts to using my svg have broken the theme as I run it locally on my local hugo instance)
What I need to do is get logo.svg into the SVG.toml file and do I then move the SVG.toml file from siteroot-themes-meme/data into siteroot-data?
Thanks so much, been banging my head into this for sometime. In a static page, I’d just do this inline and be done with it. But this is confusing to me.
Thank you
So, I just tried and I don’t understand your problem. Pasting the whole <svg>
block as the brand
inside the SVG.toml
and setting the siteBrandSVG = true
in the config.toml worked just fine.
As reference, your logo as I pasted in the SVG.toml
:
brand = '<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="400.000000pt" height="343.000000pt" viewBox="0 0 400.000000 343.000000" preserveAspectRatio="xMidYMid meet"> <g transform="translate(0.000000,343.000000) scale(0.100000,-0.100000)" fill="#000000" stroke="none"> <path d="M23 3404 l-23 -26 0 -968 0 -969 25 -25 c59 -59 22 -56 605 -56 294 0 546 -3 558 -7 21 -5 23 -9 16 -42 -4 -20 -10 -56 -13 -81 l-6 -45 -165 -21 c-254 -33 -340 -65 -340 -127 0 -41 32 -74 80 -83 19 -4 43 -11 53 -16 33 -17 200 -39 396 -52 158 -11 229 -11 390 0 198 13 365 35 398 52 10 5 36 13 58 16 52 9 94 63 77 100 -21 47 -134 87 -302 105 -171 19 -201 24 -205 31 -2 3 -9 38 -15 76 -10 61 -9 70 6 81 14 10 134 13 551 13 586 0 565 -2 613 62 l25 33 0 955 0 955 -23 33 -23 32 -1357 0 -1357 0 -22 -26z m2672 -994 l0 -935 -1287 -3 -1288 -2 0 940 0 940 1288 -2 1287 -3 0 -935z"/> <path d="M3253 3106 c-48 -18 -90 -52 -121 -99 l-27 -42 -3 -953 -2 -952 24 -54 c30 -65 75 -102 148 -122 66 -17 471 -20 550 -3 64 14 121 56 151 113 l22 41 0 965 0 965 -23 37 c-28 45 -84 91 -131 106 -47 16 -544 14 -588 -2z m667 -583 c0 -5 -166 -8 -370 -8 -203 0 -370 3 -370 8 0 4 167 7 370 7 204 0 370 -3 370 -7z m27 -160 c-2 -27 -3 -5 -3 47 0 52 1 74 3 48 2 -27 2 -69 0 -95z m-787 45 c0 -57 -3 -78 -10 -68 -16 25 -11 150 6 150 2 0 4 -37 4 -82z m735 -118 c-4 -6 -130 -10 -345 -10 -215 0 -341 4 -345 10 -4 7 113 10 345 10 232 0 349 -3 345 -10z m-689 -72 c-18 -10 -39 -2 -31 12 3 4 15 6 26 3 19 -5 19 -7 5 -15z m719 13 c8 -14 -10 -22 -30 -15 -13 5 -14 8 -3 15 17 11 26 11 33 0z m-765 -113 c0 -57 -3 -78 -10 -68 -16 25 -11 150 6 150 2 0 4 -37 4 -82z m787 -30 c-2 -24 -4 -7 -4 37 0 44 2 63 4 43 2 -21 2 -57 0 -80z m-756 -61 c-1 -12 -15 -9 -19 4 -3 6 1 10 8 8 6 -3 11 -8 11 -12z m736 -3 c-3 -3 -12 -4 -19 -1 -8 3 -5 6 6 6 11 1 17 -2 13 -5z m-333 -227 c7 -11 7 -25 0 -44 -18 -53 -94 -35 -94 22 0 49 67 65 94 22z"/> <path d="M276 567 c-36 -21 -53 -49 -73 -122 -3 -11 -13 -42 -23 -70 -69 -185 -80 -221 -80 -256 0 -34 5 -43 30 -57 16 -9 30 -20 30 -24 0 -5 560 -8 1245 -8 685 0 1245 3 1245 8 0 4 14 15 30 24 26 15 30 23 30 59 0 22 -6 55 -14 72 -8 18 -26 66 -40 107 -14 41 -39 113 -56 160 -16 47 -30 86 -30 88 0 2 -19 12 -42 22 -42 19 -78 20 -1128 20 l-1085 0 -39 -23z m151 -43 c3 -9 6 -32 7 -53 1 -39 28 -52 34 -16 6 40 36 85 56 85 29 0 66 -39 66 -71 0 -24 15 -39 41 -39 4 0 6 13 3 30 -4 16 -3 41 0 55 5 21 12 25 41 25 23 0 35 -5 35 -14 0 -7 7 -19 15 -26 8 -7 15 -23 15 -35 0 -16 8 -25 26 -29 23 -6 26 -11 20 -37 -5 -25 -2 -32 14 -36 13 -3 20 -15 22 -37 2 -19 8 -31 18 -31 21 0 25 58 6 75 -9 7 -16 20 -16 30 0 9 -11 29 -25 44 -17 18 -25 39 -25 62 0 31 2 34 30 34 18 0 33 -6 36 -15 3 -8 14 -17 25 -20 13 -4 19 -16 19 -36 0 -22 6 -32 25 -39 28 -11 29 -14 15 -40 -9 -16 -6 -21 15 -26 21 -5 26 -12 23 -33 -2 -18 2 -27 16 -29 32 -7 35 12 11 63 -13 28 -24 58 -24 68 -1 9 -8 17 -16 17 -13 0 -45 58 -45 81 0 19 62 9 81 -13 l20 -23 15 23 c22 30 79 31 87 2 3 -11 12 -20 21 -20 8 0 20 9 26 20 15 28 70 28 77 0 7 -26 39 -26 53 0 7 13 21 20 41 20 l31 0 -7 -49 c-6 -44 -4 -51 14 -61 15 -8 21 -19 19 -38 -2 -21 2 -28 20 -30 17 -3 22 -10 22 -33 0 -24 4 -29 25 -29 15 0 25 6 25 14 0 16 -26 46 -41 46 -5 0 -12 18 -15 41 -4 22 -13 43 -20 46 -41 15 15 93 66 93 17 0 31 -6 31 -12 1 -7 2 -31 3 -53 1 -33 5 -41 28 -49 35 -12 45 -3 29 28 -10 17 -11 32 -4 53 8 23 16 29 46 31 33 3 37 0 43 -25 4 -15 7 -37 6 -48 0 -11 7 -27 18 -37 11 -10 16 -25 13 -36 -6 -24 10 -35 38 -27 15 5 18 10 10 18 -6 6 -11 23 -11 39 0 16 -7 31 -19 37 -16 9 -17 15 -7 46 9 30 15 35 42 35 36 0 74 -44 74 -86 0 -17 6 -28 20 -31 22 -6 26 -18 10 -28 -5 -3 -10 -10 -10 -15 0 -11 37 -23 49 -16 9 6 -8 78 -22 92 -4 4 -7 25 -7 46 0 33 3 38 23 38 33 -1 91 -54 84 -79 -3 -12 1 -22 9 -25 8 -3 14 -19 14 -35 0 -35 8 -42 39 -34 20 5 20 7 6 23 -8 9 -13 24 -10 32 3 8 -1 31 -10 51 -8 20 -15 43 -15 52 0 19 43 20 60 1 6 -8 21 -16 33 -18 17 -2 23 -11 25 -40 2 -24 10 -42 22 -48 11 -6 16 -17 13 -29 -5 -21 11 -35 32 -27 15 5 9 31 -27 113 -10 24 -18 47 -18 53 0 15 36 12 50 -5 7 -8 23 -15 35 -15 12 0 28 7 35 15 17 20 39 19 75 -5 37 -25 42 -25 50 0 16 50 105 3 105 -55 0 -12 6 -28 13 -34 16 -13 37 -97 40 -161 l2 -45 -67 -3 c-67 -3 -78 -8 -58 -28 23 -23 -1 -44 -50 -44 -51 0 -66 14 -55 51 5 15 1 19 -19 19 -37 0 -76 18 -76 34 0 9 9 24 20 34 17 16 19 24 11 46 -6 14 -12 26 -15 26 -12 0 -51 -79 -51 -105 0 -27 -3 -30 -36 -33 -34 -3 -37 -5 -35 -35 1 -30 -1 -32 -38 -35 -44 -4 -99 15 -93 32 2 6 19 12 38 14 19 1 45 5 58 8 l24 5 -21 15 c-22 15 -21 35 4 64 15 19 7 70 -12 70 -8 0 -14 -9 -14 -19 0 -11 -8 -28 -17 -37 -10 -10 -18 -32 -18 -48 0 -29 -3 -31 -37 -34 -40 -3 -46 -10 -26 -30 23 -23 -10 -42 -77 -42 -68 0 -91 14 -81 48 5 16 0 21 -24 25 -36 8 -40 37 -9 66 12 11 19 28 17 42 -5 35 -27 35 -34 1 -4 -21 -14 -32 -31 -37 -21 -5 -24 -10 -18 -35 5 -21 2 -31 -12 -38 -16 -9 -14 -11 12 -17 52 -12 56 -14 53 -37 -2 -14 -13 -25 -28 -29 -33 -9 -737 -9 -770 0 -33 9 -38 44 -10 64 18 13 19 15 5 21 -12 4 -15 13 -10 35 4 21 2 30 -10 35 -25 9 -35 -1 -35 -36 0 -21 -6 -31 -20 -35 -22 -6 -26 -19 -8 -25 10 -4 10 -10 1 -30 -11 -25 -45 -38 -99 -38 -21 0 -74 38 -74 53 0 3 17 9 38 12 73 13 75 14 51 34 -19 15 -20 18 -5 30 24 20 19 31 -13 31 -26 0 -30 -4 -33 -32 -3 -29 -7 -33 -36 -36 -27 -3 -31 -6 -27 -25 8 -29 -13 -54 -51 -62 -23 -4 -36 -1 -48 11 -22 21 -17 48 9 52 62 9 67 12 50 28 -12 12 -13 20 -4 36 14 25 1 39 -29 32 -16 -5 -22 -14 -22 -35 0 -23 -5 -30 -27 -35 -41 -10 -45 -14 -32 -30 19 -23 -17 -44 -71 -41 -38 2 -45 5 -45 22 0 14 8 21 25 23 45 5 52 10 41 30 -6 11 -6 24 -1 32 5 9 5 19 -2 27 -16 19 -51 -3 -43 -27 7 -21 -19 -40 -54 -40 -24 0 -27 -10 -8 -29 19 -19 -18 -41 -70 -41 -52 0 -69 23 -35 49 14 10 19 21 13 29 -7 12 10 82 30 124 5 10 9 28 9 42 0 13 7 29 15 36 8 7 15 23 15 35 0 53 80 102 97 59z m1796 -371 c-7 -2 -19 -2 -25 0 -7 3 -2 5 12 5 14 0 19 -2 13 -5z m300 0 c-7 -2 -19 -2 -25 0 -7 3 -2 5 12 5 14 0 19 -2 13 -5z"/> <path d="M1061 492 c-16 -31 -13 -50 10 -62 16 -9 19 -18 15 -36 -5 -19 -2 -26 18 -33 18 -7 22 -15 19 -34 -6 -29 12 -44 32 -27 15 12 10 35 -11 61 -8 8 -17 29 -20 47 -3 17 -12 33 -20 36 -8 3 -14 13 -14 23 0 10 -4 24 -9 32 -7 11 -11 10 -20 -7z"/> <path d="M1200 486 c0 -8 -2 -21 -5 -28 -6 -15 32 -38 60 -38 20 0 19 26 0 34 -8 3 -15 15 -15 26 0 13 -7 20 -20 20 -11 0 -20 -6 -20 -14z"/> <path d="M2271 456 c-8 -10 -9 -16 -1 -21 5 -3 10 -19 10 -35 0 -25 5 -31 33 -38 25 -6 33 -14 35 -35 5 -40 62 -50 62 -11 0 9 -16 30 -35 47 -19 17 -35 38 -35 47 0 15 -39 60 -52 60 -3 0 -11 -6 -17 -14z"/> <path d="M494 406 c-10 -31 -8 -35 13 -45 24 -11 30 -26 13 -36 -18 -11 -10 -26 12 -23 28 4 35 33 15 56 -8 9 -18 32 -22 50 -9 41 -17 41 -31 -2z"/> <path d="M634 398 c-4 -15 -1 -25 12 -35 10 -7 18 -26 19 -41 0 -17 5 -27 15 -27 16 0 17 30 4 93 -7 38 -39 44 -50 10z"/> <path d="M1234 393 c-18 -18 -17 -20 38 -37 11 -3 15 -12 11 -26 -6 -22 13 -44 29 -34 13 8 9 52 -6 61 -7 4 -18 18 -25 31 -14 26 -24 28 -47 5z"/> <path d="M1546 394 c-22 -15 -22 -15 15 -31 36 -15 29 -55 -11 -70 -22 -8 -27 -15 -23 -32 3 -12 0 -27 -6 -34 -14 -18 -4 -27 28 -27 33 0 58 15 42 24 -19 12 -12 45 13 67 27 24 25 38 -14 87 -23 28 -27 29 -44 16z"/> <path d="M1890 335 c0 -14 -8 -29 -20 -35 -13 -7 -20 -20 -19 -38 1 -15 0 -33 -2 -41 -5 -18 23 -25 59 -16 23 6 25 8 9 16 -23 14 -21 55 4 72 17 12 19 19 10 35 -17 32 -41 36 -41 7z"/> <path d="M1054 287 c-3 -8 -5 -21 -3 -28 3 -28 -2 -39 -18 -39 -15 0 -16 -2 -3 -10 18 -12 70 -13 88 -1 10 6 9 10 -7 14 -17 4 -21 12 -19 38 2 25 -1 34 -15 37 -9 2 -20 -3 -23 -11z"/> <path d="M1224 288 c-5 -7 -7 -23 -5 -36 2 -15 -4 -25 -21 -31 l-23 -9 28 -7 c34 -9 87 3 67 15 -7 4 -13 23 -14 41 -1 34 -19 49 -32 27z"/> <path d="M1383 288 c-4 -7 -6 -23 -5 -35 2 -12 -4 -26 -15 -31 -16 -9 -15 -11 10 -17 16 -4 38 -3 50 3 12 6 16 11 10 11 -8 1 -13 16 -13 41 0 41 -19 55 -37 28z"/> <path d="M3024 583 c-12 -2 -29 -12 -38 -22 -14 -16 -13 -22 21 -77 20 -32 58 -87 85 -121 26 -35 48 -65 48 -69 0 -12 60 -65 111 -96 l54 -33 165 0 c149 0 168 2 192 20 15 11 28 29 28 41 0 26 -84 187 -124 237 -79 99 -166 128 -378 126 -79 -1 -153 -4 -164 -6z m101 -163 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10 4 10 3 0 8 -4 11 -10z"/> </g> </svg>'
1 Like
Thank you very much for the reply. My problem is I am not at all familiar with Hugo, although I’m putting in the time to learn. My experience with svg is limited. So I’m slowly getting there.
Question: How did you get M23 ....and so on
that you added to the SVG.toml
from my logo.svg
Seems like the data is different somehow. Thanks for patience.
And your example worked great. Tweaked the sizing, works perfectly. Much appreciated.
ctsdownloads:
You grabbed the entire justpaste.it/45mwn contents, removed the containers, then merged the raw M23 3404 l-23, etc, etc data to create a workable svg.
Nevermind, I see it now. I need coffee - literally copied and pasted it. lol man I feel foolish. Thanks, I got it now.
1 Like
Sorry to resurrect this, but I could use one more bit of advice.
Simpler svg files work fine, however, anything like this seems to cry foul on me.
The svg code used this time around is:
https://justpaste.it/6eihe
Seems like the break is at line 21, which is the area starting with <svg xmlns:dc="http://purl.org/dc/elements/1.1/"
I’ve tried different svg files also created using Inkscape and all have failed except for very simple attempts - shapes on black only.
Any ideas or thoughts appreciated.
Thanks
It seems the culprits are the three 'sans-serif, Bold'
(single quotes).
1 Like
I suspected this, but wasn’t 100% sure. Thank you
1 Like
system
Closed
July 14, 2020, 3:14am
10
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.