Browse Source

Remove support for `prepend.md`

shalvah 4 years ago
parent
commit
693ba2bcb1
4 changed files with 6 additions and 11 deletions
  1. 2 1
      CHANGELOG.md
  2. 4 5
      config/scribe.php
  3. 0 2
      resources/views/themes/default/index.blade.php
  4. 0 3
      src/Writing/HtmlWriter.php

+ 2 - 1
CHANGELOG.md

@@ -30,4 +30,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 - Inline validators
 - Infer URL parameter type and name
 - Renamed `interactive` to `try_it_out`
-- 3 base URLs
+- 3 base URLs
+- Remove `prepend.md`

+ 4 - 5
config/scribe.php

@@ -14,6 +14,10 @@ return [
      */
     'description' => '',
 
+    /*
+     * The base URL displayed in the docs. If this is empty, Scribe will use the value of config('app.url').
+     */
+    'base_url' => null,
 
     /*
      * Tell Scribe what routes to generate documentation for.
@@ -249,11 +253,6 @@ INTRO
         'javascript',
     ],
 
-    /*
-     * The base URL to be used in examples. If this is empty, Scribe will use the value of config('app.url').
-     */
-    'base_url' => null,
-
     /*
      * Generate a Postman collection (v2.1.0) in addition to HTML docs.
      * For 'static' docs, the collection will be generated to public/docs/collection.json.

+ 0 - 2
resources/views/themes/default/index.blade.php

@@ -69,8 +69,6 @@
 <div class="page-wrapper">
     <div class="dark-box"></div>
     <div class="content">
-        {!! $prepend !!}
-
         {!! $index !!}
 
         {!! $authentication !!}

+ 0 - 3
src/Writing/HtmlWriter.php

@@ -30,9 +30,7 @@ class HtmlWriter
         $index = $this->transformMarkdownFileToHTML($sourceFolder . '/index.md');
         $authentication = $this->transformMarkdownFileToHTML($sourceFolder . '/authentication.md');
 
-        $prependFile = rtrim($sourceFolder, '/') . '/' . 'prepend.md';
         $appendFile = rtrim($sourceFolder, '/') . '/' . 'append.md';
-        $prepend = file_exists($prependFile) ? $this->transformMarkdownFileToHTML($prependFile) : '';
         $append = file_exists($appendFile) ? $this->transformMarkdownFileToHTML($appendFile) : '';
 
         $theme = $this->config->get('theme') ?? 'default';
@@ -40,7 +38,6 @@ class HtmlWriter
             'metadata' => $this->getMetadata(),
             'baseUrl' => $this->baseUrl,
             'tryItOut' => $this->config->get('try_it_out'),
-            'prepend' => $prepend,
             'index' => $index,
             'authentication' => $authentication,
             'groupedEndpoints' => $groupedEndpoints,