Comments (3)
@LovelyBuggies This repo is the output dir after compiling. Settings for custom links with SVG icons can be referred here (https://github.com/Vimux/Mainroad#social-widget-custom-links)
Social Widget: custom links
Mainroad contains built-in social links in the social widget. In addition, you can also set custom social links by adding
Params.widgets.social.custom
to yourconfig.toml
. Here is an example.[[Params.widgets.social.custom]] title = "Youtube" url = "https://youtube.com/user/username" icon = "youtube.svg"Note: You need to put your icon file in
layouts/partials
directory under your project's root if you want to display an icon of your social link. Theicon
filed, which is optional, should be a path relative tolayouts/partials
.Note: Only SVG files are supported to be used as custom social icons in the current version. If you use any files of another format, PNG for example, a compile error will be raised by Hugo.
Note: Not every SVG icon can be used. For better results, it should be one-color SVG file with a special class attribute
{{ with .class }}{{ . }} {{ end }}
and 24x24 size. At a minimum, custom SVG icon needs these attributes:<svg class="{{ with .class }}{{ . }} {{ end }} icon" width="24" height="24">...</svg>
from yuqingc.github.io.
@LovelyBuggies https://www.iconfont.cn/
from yuqingc.github.io.
Thanks, but I mean do you have a folder named like svg
in partials
(I see you put your svg file directly into the index.html). By the way, how do you start your hugo server (I tried hugo server -D
, but this doesn't work)?
from yuqingc.github.io.
Related Issues (5)
- すごい HOT 1
- posts/others/github-actions/ HOT 2
- posts/2020/github-actions/ HOT 2
- about/aboutme/ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yuqingc.github.io.