Browse Source

支持 origin 属性

visuddhinanda 1 year ago
parent
commit
c92968287b
1 changed files with 3 additions and 4 deletions
  1. 3 4
      app/Http/Resources/ArticleResource.php

+ 3 - 4
app/Http/Resources/ArticleResource.php

@@ -198,12 +198,11 @@ class ArticleResource extends JsonResource
 
             $htmlRender = new MdRender([
                 'mode' => $mode,
-                'format'=>$format,
-                'footnote' =>true,
+                'format'=> $format,
+                'footnote' => true,
+                'origin' => $request->get('origin',true),
             ]);
-            //$html = MdRender::render($this->content,$channels,$query_id);
             //Log::debug('article render',['content'=>$this->content,'format'=>$format,'html'=>$html]);
-
             $data["html"] = $htmlRender->convert($this->content,$channels);
             if(empty($this->summary)){
                 $data["_summary"] = MdRender::render($this->content,