Commit bfa87e9 1 parent 9f2f931 commit bfa87e9 Copy full SHA for bfa87e9
File tree 3 files changed +82
-27
lines changed
3 files changed +82
-27
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @staart/site" ,
3
- "version" : " 1.12.3 " ,
3
+ "version" : " 1.12.4 " ,
4
4
"module" : " dist/module.js" ,
5
5
"main" : " dist/index.js" ,
6
6
"bin" : " ./dist/index.js" ,
Original file line number Diff line number Diff line change @@ -117,14 +117,20 @@ export const getSiteContent = async () => {
117
117
} ) ;
118
118
} ;
119
119
120
- const linkify = ( attributes : { [ index : string ] : string } , key : string ) =>
121
- attributes [ key ]
122
- ? `<a href="https://${ key } .com/${
120
+ const linkify = ( attributes : { [ index : string ] : string } , key : string ) => {
121
+ const icon = ( icons as {
122
+ [ index : string ] : { icon : string ; generator ?: ( username : string ) => string } ;
123
+ } ) [ key ] ;
124
+ icon . generator =
125
+ icon . generator || ( ( username : string ) => `https://${ key } .com/${ username } ` ) ;
126
+ return attributes [ key ]
127
+ ? `<a href="${ icon . generator (
123
128
attributes [ key ]
124
- } " aria-label="${ key } " class="no-external">
125
- ${ ( icons as { [ index : string ] : string } ) [ key ] }
129
+ ) } " aria-label="${ key } " class="no-external">
130
+ ${ icon . icon }
126
131
</a>\n`
127
132
: "" ;
133
+ } ;
128
134
129
135
const imageToDataUri = async ( url : string ) => {
130
136
const buffer = await axios . get (
You can’t perform that action at this time.
0 commit comments