Skip to content

Commit 57e9933

Browse files
committed
2 parents 4cd1bf8 + 0486323 commit 57e9933

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# gitbucket-embedding-plugin
22

3-
A GitBucket plugin to replace code link to snippet
3+
A GitBucket plugin to replace code link to embed snippet.
44

5-
This is still alpha ver.
5+
**To achieve embed snippet, this plugin is not best way. It should be done by GitBucket itself. Until the day GitBucket get this feature, this plugin could be a one of choices.**
66

77
## Screenshot
88

@@ -33,18 +33,28 @@ for deployment.
3333

3434
## Supported link type
3535

36-
`http(s)://host/{owner}/{repository}/blob/{SHA}/{filename}#L{StartLineNumber}-L{EndLineNumber}`
36+
```
37+
Links Style:
38+
http(s)://{host_with_or_without_prefix}/{owner}/{repository}/blob/{SHA}/{path/to/file}#L{StartLineNumber}-L{EndLineNumber}
3739
38-
example1: `http://localhost:8080/root/gitbucket/blob/19f0431a3fb4a9c3560dbf9b1d74f2073da7708f/GitBucketCoreModuleSpec.scala#L5-L10`
40+
Example1:
41+
http://localhost:8080/root/gitbucket/blob/19f0431a3fb4a9c3560dbf9b1d74f2073da7708f/GitBucketCoreModuleSpec.scala#L5-L10
3942
40-
example2: `http://localhost/root/gitbucket/blob/19f0431a3fb4a9c3560dbf9b1d74f2073da7708f/GitBucketCoreModuleSpec.scala#L5-L10`
43+
Example2:
44+
http://localhost/root/gitbucket/blob/19f0431a3fb4a9c3560dbf9b1d74f2073da7708f/src/main/scala/GitBucketCoreModuleSpec.scala#L5-L10
45+
```
4146

4247
## Note
4348

44-
you better use link with sha, not branch name such as `master`. Because `master` changes by commits.
49+
Please use link with sha, not branch name such as `master`. Because `master` changes by commits.
4550

46-
- Good url: `http://localhost:8080/root/gitbucket/blob/19f0431a3fb4a9c3560dbf9b1d74f2073da7708f/GitBucketCoreModuleSpec.scala#L5-L10`
47-
- Bad url: `http://localhost:8080/root/gitbucket/blob/master/GitBucketCoreModuleSpec.scala#L5-L10`
51+
```
52+
Good url:
53+
http://localhost:8080/root/gitbucket/blob/19f0431a3fb4a9c3560dbf9b1d74f2073da7708f/GitBucketCoreModuleSpec.scala#L5-L10
54+
55+
No Good url:
56+
http://localhost:8080/root/gitbucket/blob/master/GitBucketCoreModuleSpec.scala#L5-L10
57+
```
4858

4959
## Limitation
5060

0 commit comments

Comments
 (0)