mirror of
https://github.com/wassname/template.git
synced 2026-07-01 20:07:53 +08:00
fixing urls
This commit is contained in:
@@ -5,7 +5,11 @@ export default function(dom, data) {
|
||||
data.authors = data.authors || [];
|
||||
|
||||
// paths
|
||||
data.url = data.url ? data.url : "http://distill.pub/" + data.distillPath;
|
||||
if (!data.distillPath && !data.url) {
|
||||
data.url = "http://distill.pub/";
|
||||
} else if (!data.url) {
|
||||
data.url = "http://distill.pub/" + data.distillPath;
|
||||
}
|
||||
data.githubUrl = "https://github.com/" + data.githubPath;
|
||||
|
||||
data.previewURL = data.previewURL ? data.previewURL : data.url + "/thumbnail.jpg"
|
||||
|
||||
Vendored
+5
-1
@@ -5092,7 +5092,11 @@ var expandData = function(dom, data) {
|
||||
data.authors = data.authors || [];
|
||||
|
||||
// paths
|
||||
data.url = data.url ? data.url : "http://distill.pub/" + data.distillPath;
|
||||
if (!data.distillPath && !data.url) {
|
||||
data.url = "http://distill.pub/";
|
||||
} else if (!data.url) {
|
||||
data.url = "http://distill.pub/" + data.distillPath;
|
||||
}
|
||||
data.githubUrl = "https://github.com/" + data.githubPath;
|
||||
|
||||
data.previewURL = data.previewURL ? data.previewURL : data.url + "/thumbnail.jpg";
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user