Skip to content

Commit

Permalink
Create Custom public path.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Machy8 authored Aug 13, 2020
1 parent 62ffefb commit f98095c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/Custom public path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Custom public path

In case, you want to have a domain in the path to bundled files or a some path prefix, you can use public path prefix.

```php
$outputDir = '/webtemp';
$documentRoot = '/';
$publicPathPrefix = '/playground'; // Optional, can be a domain https://static.domain.com
$webloader = new \WebLoader\Engine($outputDir, $documentRoot, $publicPathPrefix);
```

Output:
```html
<link type="text/css" rel="stylesheet" href="/playground/webtemp/my-bundle.css?v=1597237456">
```

Output example, if you use a domain name:
```html
<link type="text/css" rel="stylesheet" href="https://static.domain.com/webtemp/my-bundle.css?v=1597237456">
```

0 comments on commit f98095c

Please sign in to comment.