jeawin-astro 5.0.21 → 5.0.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jeawin-astro",
3
- "version": "5.0.21",
3
+ "version": "5.0.22",
4
4
  "author": "chaegumi <chaegumi@qq.com>",
5
5
  "description": "Astro components for Jeawin CMS",
6
6
  "license": "MIT",
@@ -30,8 +30,8 @@ const channeluriarr = _.get(obj, [1], []);
30
30
  const categoryuriarr = _.get(obj, [2], []);
31
31
  let friendlinksHtml = "";
32
32
 
33
- const preview_url =
34
- jeawin_preview_domain + render_value(siteinfo, "site_uri") + "/";
33
+ // const preview_url =
34
+ // jeawin_preview_domain + render_value(siteinfo, "site_uri") + "/";
35
35
 
36
36
  const current_channel_id = channel_id || 0;
37
37
  const current_category_id = category_id || 0;
@@ -46,8 +46,21 @@ for (const link of friendlinks) {
46
46
 
47
47
  if (render_value(link, "link_limit")) {
48
48
  const link_limit1 = render_value(link, "link_limit").split("\n");
49
+ const preview_domains = [
50
+ "http://127.0.0.1:4321",
51
+ "https://admin.jeawin.com",
52
+ "http://admin.jeawin.local",
53
+ "https://generatehtml.jeawin.com",
54
+ "http://generatehtml.jeawin.local",
55
+ "https://preview.jeawin.com",
56
+ "http://preview.jeawin.local"
57
+ ];
49
58
  for (let limit1 of link_limit1) {
50
- uri_array.push(limit1.replace(preview_url, "").replace(".html", ""));
59
+ for(let domain of preview_domains){
60
+ limit1 = limit1.replace(domain+"/"+render_value(siteinfo, 'site_uri')+"/", "")
61
+ }
62
+ limit1 = limit1.replace(".html", "")
63
+ uri_array.push(limit1);
51
64
  }
52
65
  }
53
66