vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
11.33k stars 1.83k forks source link

Add "GitLab" to list of social icons #3750

Closed stritti closed 3 weeks ago

stritti commented 3 weeks ago

Is your feature request related to a problem? Please describe.

I would like to point to a repository at GitLab instead of GitHub.

Describe the solution you'd like

Add social icon for GitLab to the list to be selectable at themeConfic.socialLinks{}

Describe alternatives you've considered

No response

Additional context

No response

Validations

brc-dd commented 3 weeks ago

Specify the SVG manually from simple-icons. New icons won't be added to core.

import { defineConfig } from 'vitepress'

export default defineConfig({
  themeConfig: {
    socialLinks: [
      {
        icon: {
          svg: `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitLab</title><path d="m23.6004 9.5927-.0337-.0862L20.3.9814a.851.851 0 0 0-.3362-.405.8748.8748 0 0 0-.9997.0539.8748.8748 0 0 0-.29.4399l-2.2055 6.748H7.5375l-2.2057-6.748a.8573.8573 0 0 0-.29-.4412.8748.8748 0 0 0-.9997-.0537.8585.8585 0 0 0-.3362.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 0 0 2.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 0 0 1.2197 0l1.4995-1.1321 2.4619-1.8633 5.006-3.7489.0125-.01a6.0682 6.0682 0 0 0 2.0094-7.003z"/></svg>`
        },
        link: 'https://gitlab.com'
      }
    ]
  }
})
stritti commented 3 weeks ago

Okay, thanks for alternative. Probably this is already documented and I have not seen this possibility.

brc-dd commented 3 weeks ago

refer the example - https://vitepress.dev/reference/default-theme-config#sociallinks

stritti commented 3 weeks ago

Oh, yes sure. I was blind. Sorry.