Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
146 lines (146 loc) · 4.85 KB
/
Copy pathpackage.json
File metadata and controls
146 lines (146 loc) · 4.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
{
"name": "markdown-link-title",
"displayName": "Markdown Link Title",
"description": "Paste a URL in Markdown and get [Page Title](url). Customisable, zero dependencies, honours VS Code proxy settings.",
"version": "0.5.0",
"publisher": "antoinekh",
"license": "MIT",
"icon": "media/icon.png",
"author": {
"name": "Antoine Keranflech"
},
"repository": {
"type": "git",
"url": "https://github.com/antoinekh/markdown-link-title.git"
},
"homepage": "https://github.com/antoinekh/markdown-link-title#readme",
"bugs": {
"url": "https://github.com/antoinekh/markdown-link-title/issues"
},
"engines": {
"vscode": "^1.136.0"
},
"categories": [
"Formatters",
"Other"
],
"keywords": [
"markdown",
"link",
"url",
"title",
"paste"
],
"activationEvents": [
"onLanguage:markdown"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "markdownLinkTitle.resolveTitles",
"title": "Resolve Title for URL(s)",
"category": "Markdown Link Title"
}
],
"menus": {
"commandPalette": [
{
"command": "markdownLinkTitle.resolveTitles",
"when": "editorLangId == markdown"
}
],
"editor/context": [
{
"command": "markdownLinkTitle.resolveTitles",
"when": "editorLangId == markdown && editorHasSelection",
"group": "1_modification"
}
]
},
"configuration": {
"title": "Markdown Link Title",
"properties": {
"markdownLinkTitle.enabled": {
"type": "boolean",
"default": true,
"description": "Master on/off switch for converting pasted URLs into Markdown links."
},
"markdownLinkTitle.fetchTitle": {
"type": "boolean",
"default": true,
"description": "Fetch the page title for the pasted URL. When off, behaves like the native paste (inserts an empty label for you to type)."
},
"markdownLinkTitle.timeoutMs": {
"type": "number",
"default": 5000,
"minimum": 500,
"description": "Timeout in milliseconds for the title fetch before falling back to an empty label."
},
"markdownLinkTitle.preferOpenGraph": {
"type": "boolean",
"default": true,
"description": "Prefer the og:title meta tag over the <title> element when both are present."
},
"markdownLinkTitle.maxRedirects": {
"type": "number",
"default": 5,
"minimum": 0,
"description": "Maximum number of HTTP redirects to follow while resolving a title."
},
"markdownLinkTitle.userAgent": {
"type": "string",
"default": "",
"markdownDescription": "User-Agent header sent with the title fetch. Leave empty to use the default link-preview bot (`Twitterbot/1.0`), which many sites whitelist to return clean `og:title` metadata where a browser User-Agent hits a bot-wall."
},
"markdownLinkTitle.placeholder": {
"type": "string",
"default": "fetching…",
"description": "Temporary label shown in the link while the title is fetched in the background, e.g. [fetching…](url)."
},
"markdownLinkTitle.maxBodyKb": {
"type": "number",
"default": 512,
"minimum": 16,
"description": "Maximum amount of the response body to read, in kilobytes, while looking for the title."
},
"markdownLinkTitle.maxTitleLength": {
"type": "number",
"default": 0,
"minimum": 0,
"description": "Maximum length of a fetched title before it is truncated at a word boundary with an ellipsis. 0 disables truncation."
},
"markdownLinkTitle.linkStyle": {
"type": "string",
"enum": [
"inline",
"reference"
],
"enumDescriptions": [
"Insert the URL inline: [title](url).",
"Insert a numbered reference [title][1] and append [1]: url at the end of the file."
],
"default": "inline",
"description": "How to insert the link. 'reference' uses Markdown reference-style links with the URLs collected at the bottom of the file."
}
}
}
},
"scripts": {
"compile": "tsc -p ./tsconfig.json",
"bundle": "node esbuild.js",
"watch": "node esbuild.js --watch",
"lint": "tsc -p ./tsconfig.json --noEmit",
"test": "tsc -p ./tsconfig.json && node --test \"out/test/**/*.test.js\"",
"package": "npm run lint && node esbuild.js --production",
"vscode:prepublish": "npm run package"
},
"devDependencies": {
"@types/node": "^26.4.1",
"@types/vscode": "^1.136.0",
"@vscode/vsce": "^3.9.2",
"esbuild": "^0.28.2",
"ovsx": "^1.1.1",
"typescript": "^7.0.2"
}
}