@curiousvlxd/linkedin-badge-renderer 0.1.7 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -1
- package/assets/example.svg +1123 -0
- package/assets/logo.png +0 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -27,9 +27,127 @@ Renders the official LinkedIn badge using Playwright and exports pixel-perfect a
|
|
|
27
27
|
|
|
28
28
|
## Installation
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Install globally from npm:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
+
npm install -g @curiousvlxd/linkedin-badge-renderer
|
|
34
|
+
npx playwright install chromium
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Or clone the repository:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
git clone https://github.com/curiousvlxd/linkedin-badge-renderer.git
|
|
41
|
+
cd linkedin-badge-renderer
|
|
33
42
|
npm install
|
|
34
43
|
npx playwright install chromium
|
|
35
44
|
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
Basic example:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
linkedin-badge --handle vladtimchenko
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Generate SVG (default):
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
linkedin-badge --handle vladtimchenko --format svg
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Generate PNG:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
linkedin-badge --handle vladtimchenko --format png
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Custom output path:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
linkedin-badge --handle vladtimchenko --out dist/badge.svg
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Dark theme, vertical layout:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
linkedin-badge --handle vladtimchenko --theme dark --orientation vertical
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Available Options
|
|
83
|
+
|
|
84
|
+
| Option | Description | Default | Values |
|
|
85
|
+
|--------|-------------|---------|--------|
|
|
86
|
+
| --handle | LinkedIn handle | Required | Any valid handle |
|
|
87
|
+
| --format | Output format | svg | svg, png, jpeg, pdf |
|
|
88
|
+
| --out | Output path | dist/linkedin-badge.svg | Any path |
|
|
89
|
+
| --theme | Badge theme | light | light, dark |
|
|
90
|
+
| --size | Badge size | large | small, medium, large |
|
|
91
|
+
| --locale | LinkedIn locale | en_US | Any locale |
|
|
92
|
+
| --orientation | Layout | HORIZONTAL | HORIZONTAL, VERTICAL |
|
|
93
|
+
| --pad | Padding (px) | 20 | Integer |
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## GitHub Actions Integration
|
|
98
|
+
|
|
99
|
+
You can automatically generate and publish your badge using GitHub Actions.
|
|
100
|
+
|
|
101
|
+
Example workflow:
|
|
102
|
+
|
|
103
|
+
```yaml
|
|
104
|
+
name: Export LinkedIn Badge
|
|
105
|
+
|
|
106
|
+
on:
|
|
107
|
+
schedule:
|
|
108
|
+
- cron: "15 2 * * *"
|
|
109
|
+
workflow_dispatch:
|
|
110
|
+
|
|
111
|
+
permissions:
|
|
112
|
+
contents: write
|
|
113
|
+
|
|
114
|
+
jobs:
|
|
115
|
+
badge:
|
|
116
|
+
uses: curiousvlxd/linkedin-badge-renderer/.github/workflows/export.yml@main
|
|
117
|
+
with:
|
|
118
|
+
handle: "vladtimchenko"
|
|
119
|
+
format: "svg"
|
|
120
|
+
out: "dist/linkedin-badge.svg"
|
|
121
|
+
theme: "dark"
|
|
122
|
+
size: "large"
|
|
123
|
+
locale: "en_US"
|
|
124
|
+
orientation: "HORIZONTAL"
|
|
125
|
+
pad: 20
|
|
126
|
+
output_branch: "output"
|
|
127
|
+
commit_message: "chore: update linkedin badge"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
After the workflow runs, the badge will be available at:
|
|
131
|
+
|
|
132
|
+
```https://raw.githubusercontent.com/<USERNAME>/<REPOSITORY>/<BRANCH>/<FILE_NAME>```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Using in README
|
|
137
|
+
|
|
138
|
+
Real-world example:
|
|
139
|
+
https://github.com/curiousvlxd/curiousvlxd/blob/main/README.md
|
|
140
|
+
|
|
141
|
+
Embed the badge in any README:
|
|
142
|
+
|
|
143
|
+
```md
|
|
144
|
+
<a href="https://www.linkedin.com/in/vladtimchenko/" target="_blank">
|
|
145
|
+
<img
|
|
146
|
+
src="https://raw.githubusercontent.com/curiousvlxd/curiousvlxd/output/linkedin-badge.svg"
|
|
147
|
+
width="500"
|
|
148
|
+
alt="LinkedIn Profile"
|
|
149
|
+
/>
|
|
150
|
+
</a>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|