-
Couldn't load subscription status.
- Fork 176
base configuration option #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Changes from 7 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
07dce39
relative fetch and FileAttachments
Fil 73052eb
Merge branch 'main' into fil/relative-file
Fil a4a9bfc
merge main
Fil 07c69ba
relative prev/next
Fil 0e3c901
fix public path to _file
Fil 78bac0f
**base** config option : /path/to/root/ or /
Fil 6c1048d
support / and /\w+/
Fil 32338a1
Update src/preview.ts
Fil 2ec483c
Merge branch 'main' into fil/base
Fil 73ca919
validate config.base in readConfig
Fil d261525
Update src/config.ts
Fil 3521391
Update src/render.ts
Fil 38a96c6
Merge branch 'main' into fil/base
Fil 7169605
fix check and tests
Fil 762f392
Merge branch 'main' into fil/base
Fil a621c08
Merge branch 'main' into fil/base
Fil 8ed021f
Merge branch 'main' into fil/base
Fil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| a { color: pink; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Hello,world | ||
| 1,2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <link rel=stylesheet href="custom-styles.css" /> | ||
| <link rel=stylesheet href="subsection/additional-styles.css" /> | ||
|
|
||
| ```js | ||
| fetch("./file-top.csv") | ||
| ``` | ||
|
|
||
| ```js | ||
| fetch("./subsection/file-sub.csv") | ||
| ``` | ||
|
|
||
| ```js | ||
| FileAttachment("file-top.csv") | ||
| ``` | ||
|
|
||
| ```js | ||
| FileAttachment("subsection/file-sub.csv") | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| a { color: green; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Bonjour,monde | ||
| 1,2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <link rel=stylesheet href="../custom-styles.css" /> | ||
| <link rel=stylesheet href="additional-styles.css" /> | ||
|
|
||
| ```js | ||
| fetch("../file-top.csv") | ||
| ``` | ||
|
|
||
| ```js | ||
| fetch("./file-sub.csv") | ||
| ``` | ||
|
|
||
| ```js | ||
| FileAttachment("../file-top.csv") | ||
| ``` | ||
|
|
||
| ```js | ||
| FileAttachment("file-sub.csv") | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| a { color: pink; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Hello,world | ||
| 1,2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| a { color: green; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Bonjour,monde | ||
| 1,2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| <!DOCTYPE html> | ||
| <meta charset="utf-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
| <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap"> | ||
| <link rel="stylesheet" type="text/css" href="./_observablehq/style.css"> | ||
| <link rel="modulepreload" href="./_observablehq/runtime.js"> | ||
| <script type="module"> | ||
|
|
||
| import {define} from "./_observablehq/client.js"; | ||
| globalThis._FileAttachmentBase = "./_file/"; | ||
|
|
||
| define({id: "a7808707", inputs: ["display"], files: [{"name":"./file-top.csv","mimeType":"text/csv"}], body: (display) => { | ||
| display(( | ||
| fetch("./_file/file-top.csv") | ||
| )) | ||
| }}); | ||
| define({id: "03b99abc", inputs: ["display"], files: [{"name":"./subsection/file-sub.csv","mimeType":"text/csv"}], body: (display) => { | ||
| display(( | ||
| fetch("./_file/subsection/file-sub.csv") | ||
| )) | ||
| }}); | ||
| define({id: "10037545", inputs: ["FileAttachment","display"], files: [{"name":"file-top.csv","mimeType":"text/csv"}], body: (FileAttachment,display) => { | ||
| display(( | ||
| FileAttachment("file-top.csv") | ||
| )) | ||
| }}); | ||
| define({id: "453a8147", inputs: ["FileAttachment","display"], files: [{"name":"subsection/file-sub.csv","mimeType":"text/csv"}], body: (FileAttachment,display) => { | ||
| display(( | ||
| FileAttachment("subsection/file-sub.csv") | ||
| )) | ||
| }}); | ||
|
|
||
| </script> | ||
| <input id="observablehq-sidebar-toggle" type="checkbox"> | ||
| <nav id="observablehq-sidebar"> | ||
| <ol> | ||
| <li class="observablehq-link observablehq-link-active"><a href="./files">Untitled</a></li> | ||
| <li class="observablehq-link"><a href="./subsection/subfiles">Untitled</a></li> | ||
| </ol> | ||
| </nav> | ||
| <script>{ | ||
| const toggle = document.querySelector("#observablehq-sidebar-toggle"); | ||
| const initialState = localStorage.getItem("observablehq-sidebar"); | ||
| if (initialState) toggle.checked = initialState === "true"; | ||
| else toggle.indeterminate = true; | ||
| }</script> | ||
| <div id="observablehq-center"> | ||
| <main id="observablehq-main" class="observablehq"> | ||
| <span><link rel="stylesheet" href="./_file/custom-styles.css"> | ||
| <link rel="stylesheet" href="./_file/subsection/additional-styles.css"> | ||
| </span><div id="cell-a7808707" class="observablehq observablehq--block"></div> | ||
| <div id="cell-03b99abc" class="observablehq observablehq--block"></div> | ||
| <div id="cell-10037545" class="observablehq observablehq--block"></div> | ||
| <div id="cell-453a8147" class="observablehq observablehq--block"></div> | ||
| </main> | ||
| <footer id="observablehq-footer"> | ||
| <nav><a rel="next" href="./subsection/subfiles"><span>Untitled</span></a></nav> | ||
| <div>© 2023 Observable, Inc.</div> | ||
| </footer> | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| <!DOCTYPE html> | ||
| <meta charset="utf-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
| <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap"> | ||
| <link rel="stylesheet" type="text/css" href="../_observablehq/style.css"> | ||
| <link rel="modulepreload" href="../_observablehq/runtime.js"> | ||
| <script type="module"> | ||
|
|
||
| import {define} from "../_observablehq/client.js"; | ||
| globalThis._FileAttachmentBase = "../_file/subsection/"; | ||
|
|
||
| define({id: "62f1fd0c", inputs: ["display"], files: [{"name":"../file-top.csv","mimeType":"text/csv"}], body: (display) => { | ||
| display(( | ||
| fetch("../_file/file-top.csv") | ||
| )) | ||
| }}); | ||
| define({id: "94d347ec", inputs: ["display"], files: [{"name":"./file-sub.csv","mimeType":"text/csv"}], body: (display) => { | ||
| display(( | ||
| fetch("../_file/subsection/file-sub.csv") | ||
| )) | ||
| }}); | ||
| define({id: "ef9a31ef", inputs: ["FileAttachment","display"], files: [{"name":"../file-top.csv","mimeType":"text/csv"}], body: (FileAttachment,display) => { | ||
| display(( | ||
| FileAttachment("../file-top.csv") | ||
| )) | ||
| }}); | ||
| define({id: "834ecf9f", inputs: ["FileAttachment","display"], files: [{"name":"file-sub.csv","mimeType":"text/csv"}], body: (FileAttachment,display) => { | ||
| display(( | ||
| FileAttachment("file-sub.csv") | ||
| )) | ||
| }}); | ||
|
|
||
| </script> | ||
| <input id="observablehq-sidebar-toggle" type="checkbox"> | ||
| <nav id="observablehq-sidebar"> | ||
| <ol> | ||
| <li class="observablehq-link"><a href="../files">Untitled</a></li> | ||
| <li class="observablehq-link observablehq-link-active"><a href="./subfiles">Untitled</a></li> | ||
| </ol> | ||
| </nav> | ||
| <script>{ | ||
| const toggle = document.querySelector("#observablehq-sidebar-toggle"); | ||
| const initialState = localStorage.getItem("observablehq-sidebar"); | ||
| if (initialState) toggle.checked = initialState === "true"; | ||
| else toggle.indeterminate = true; | ||
| }</script> | ||
| <div id="observablehq-center"> | ||
| <main id="observablehq-main" class="observablehq"> | ||
| <span><link rel="stylesheet" href="../_file/custom-styles.css"> | ||
| <link rel="stylesheet" href="../_file/subsection/additional-styles.css"> | ||
| </span><div id="cell-62f1fd0c" class="observablehq observablehq--block"></div> | ||
| <div id="cell-94d347ec" class="observablehq observablehq--block"></div> | ||
| <div id="cell-ef9a31ef" class="observablehq observablehq--block"></div> | ||
| <div id="cell-834ecf9f" class="observablehq observablehq--block"></div> | ||
| </main> | ||
| <footer id="observablehq-footer"> | ||
| <nav><a rel="prev" href="../files"><span>Untitled</span></a></nav> | ||
| <div>© 2023 Observable, Inc.</div> | ||
| </footer> | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.