示例#1
0
文件: Menu.php 项目: jpalala/codex
 /**
  * Resolve the given link.
  *
  * @param  string $link
  * @return string
  */
 protected function resolveLink($link)
 {
     if (Str::startsWith('http', $link, false)) {
         return $link;
     } else {
         $path = Str::endsWith($link, '.md', false) ? Str::remove($link, '.md') : $link;
         return $this->project->getFactory()->url($this->project, $this->project->getRef(), $path);
     }
 }
示例#2
0
 /**
  * Get the url to this document
  *
  * @return string
  */
 public function url()
 {
     return $this->factory->url($this->project, $this->project->getRef(), $this->pathName);
 }