You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config.md
+16-14Lines changed: 16 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ The following options are supported.
21
21
22
22
## root
23
23
24
-
The path to the source root; defaults to `docs`.
24
+
The path to the source root; defaults to `src`. (Prior to <ahref="https://github.com/observablehq/framework/releases/tag/v1.7.0"class="observablehq-version-badge"data-version="^1.7.0"title="Added in 1.7.0"></a>, the default was `docs`.)
25
25
26
26
## output
27
27
@@ -67,9 +67,9 @@ See the [list of available themes](./themes) for more.
67
67
68
68
## style
69
69
70
-
The path to a custom stylesheet, relative to the source root. This option takes precedence over the [theme option](#theme) (if any), providing more control by allowing you to remove or alter the default stylesheet and define a custom theme.
70
+
The path to a custom stylesheet, relative to the source root (typically `src`). This option takes precedence over the [theme option](#theme) (if any), providing more control by allowing you to remove or alter the default stylesheet and define a custom theme.
71
71
72
-
The custom stylesheet should typically import `observablehq:default.css` to build on the default styles. You can also import any of the built-in themes. For example, to create a stylesheet that builds up on the `air` theme, create a `custom-style.css` file in the `docs` folder, then set the style option to `custom-style.css`:
72
+
The custom stylesheet should typically import `observablehq:default.css` to build on the default styles. You can also import any of the built-in themes. For example, to create a stylesheet that builds up on the `air` theme, create a `custom-style.css` file in the source root, then set the style option to `custom-style.css`:
73
73
74
74
```css
75
75
@importurl("observablehq:default.css");
@@ -116,7 +116,7 @@ An array containing pages and sections. If not specified, it defaults to all Mar
116
116
117
117
Both pages and sections have a **name**, which typically corresponds to the page’s title. The name gets displayed in the sidebar. Clicking on a page navigates to the corresponding **path**, which should start with a leading slash and be relative to the root; the path can also be specified as a full URL to navigate to an external site. Each section must specify an array of **pages**.
118
118
119
-
Sections may be **collapsible**. <ahref="https://github.com/observablehq/framework/pull/1208"class="observablehq-version-badge"data-version="prerelease"title="Added in #1208"></a> If the **open** option is set, the **collapsible** option defaults to true; otherwise it defaults to false. If the section is not collapsible, the **open** option is ignored and the section is always open; otherwise, the **open** option defaults to true. When a section is collapsible, clicking on a section header opens or closes that section. A section will always be open if the current page belongs to that section.
119
+
Sections may be **collapsible**. <ahref="https://github.com/observablehq/framework/releases/tag/v1.6.0"class="observablehq-version-badge"data-version="^1.6.0"title="Added in 1.6.0"></a> If the **open** option is set, the **collapsible** option defaults to true; otherwise it defaults to false. If the section is not collapsible, the **open** option is ignored and the section is always open; otherwise, the **open** option defaults to true. When a section is collapsible, clicking on a section header opens or closes that section. A section will always be open if the current page belongs to that section.
120
120
121
121
For example, here **pages** specifies two sections and a total of four pages:
122
122
@@ -162,16 +162,6 @@ An HTML fragment to add to the header. Defaults to the empty string.
162
162
163
163
An HTML fragment to add to the footer. Defaults to “Built with Observable.”
164
164
165
-
## scripts
166
-
167
-
Additional scripts to add to the head, such as for analytics. Unlike the **head** option, this allows you to reference a local script in the source root.
The base path when serving the site. Currently this only affects the custom 404 page, if any.
@@ -262,3 +252,15 @@ export default {
262
252
markdownIt: (md) =>md.use(MarkdownItFootnote)
263
253
};
264
254
```
255
+
256
+
## typographer <ahref="https://github.com/observablehq/framework/releases/tag/v1.7.0"class="observablehq-version-badge"data-version="^1.7.0"title="Added in 1.7.0"></a>
## quotes <ahref="https://github.com/observablehq/framework/releases/tag/v1.7.0"class="observablehq-version-badge"data-version="^1.7.0"title="Added in 1.7.0"></a>
261
+
262
+
The set of replacements for straight double and single quotes used when the [**typographer** option](#typographer) is enabled. Defaults to `["“", "”", "‘", "’"]` which is suitable for English. For example, you can use `["«", "»", "„", "“"]` for Russian, `["„", "“", "‚", "‘"]` for German, and `["«\xa0", "\xa0»", "‹\xa0", "\xa0›"]` for French.
263
+
264
+
## linkify <ahref="https://github.com/observablehq/framework/releases/tag/v1.7.0"class="observablehq-version-badge"data-version="^1.7.0"title="Added in 1.7.0"></a>
265
+
266
+
If true (the default), automatically convert URL-like text to links in Markdown.
Copy file name to clipboardExpand all lines: docs/contributing.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ yarn dev
16
16
17
17
Lastly visit <http://127.0.0.1:3000>.
18
18
19
-
The local preview server restarts automatically if you edit any of the TypeScript files, though you may need to reload. The default page is [docs/index.md](https://github.com/observablehq/framework/blob/main/docs/index.md?plain=1); if you edit that file and save changes, the live preview in the browser will automatically update.
19
+
The local preview server restarts automatically if you edit any of the TypeScript files, though you may need to reload. The default page is [`docs/index.md`](https://github.com/observablehq/framework/blob/main/docs/index.md?plain=1); if you edit that file and save changes, the live preview in the browser will automatically update.
test -f docs/.observablehq/cache/dft-collisions.csv || curl -o docs/.observablehq/cache/dft-collisions.csv 'https://data.dft.gov.uk/road-accidents-safety-data/dft-road-casualty-statistics-collision-1979-latest-published-year.csv'
2
2
duckdb -c "COPY (SELECT longitude, latitude FROM read_csv_auto('docs/.observablehq/cache/dft-collisions.csv') WHERE accident_year = 2022) TO STDOUT WITH (FORMAT CSV);"
Copy file name to clipboardExpand all lines: docs/deploying.md
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ The first time you deploy a project, you will be prompted to configure the proje
26
26
27
27
When the deploy command finishes, it prints a link to observablehq.cloud where you can view your deployed project. If you choose *private* as the access level, that link will only be accessible to members of your Observable workspace. (You can invite people to your workspace by going to observablehq.com.) If you chose *public*, you can share your project link with anyone. You can change the access level of a project later [from your workspace projects page](https://observablehq.com/select-workspace?next=projects).
28
28
29
-
<divclass="note">The deploy command creates a file at <code>docs/.observablehq/deploy.json</code> with information on where to deploy the project. This file is required for automated deploys. You will need to commit this file to git to deploy via GitHub Actions. (If you have configured a source root besides <code>docs</code>, the file will be placed there instead.)</div>
29
+
<divclass="note">The deploy command creates a file at <code>.observablehq/deploy.json</code> under the source root (typically <code>src</code>) with information on where to deploy the project. This file is required for automated deploys. You will need to commit this file to git to deploy via GitHub Actions.</div>
30
30
31
31
<divclass="tip">To see more available options when deploying:<pre><codeclass="language-sh">npm run deploy -- --help</code></pre></div>
This uses one cache per calendar day (in the `America/Los_Angeles` time zone). If you deploy multiple times in a day, the results of your data loaders will be reused on the second and subsequent runs. You can customize the `date` and `cache-data` steps to change the cadence of the caching. For example you could use `date +'%Y-%U'` to cache data for a week or `date +'%Y-%m-%dT%H` to cache it for only an hour.
123
121
124
-
<div class="note">You’ll need to edit the paths above if you’ve configured a source root other than <code>docs</code>.</div>
122
+
<div class="note">You’ll need to edit the paths above if you’ve configured a source root other than <code>src</code>.</div>
Load files — whether static or generated dynamically by a [data loader](../loaders) — using the built-in `FileAttachment` function. This is available by default in Markdown, but you can import it explicitly like so:
7
+
Load files — whether static or generated dynamically by a [data loader](./loaders) — using the built-in `FileAttachment` function. This is available by default in Markdown, but you can import it explicitly like so:
Attached files live in the source root (by default `docs`) alongside your Markdown pages. For example, say `index.md` has some JavaScript code that references `FileAttachment("quakes.csv")`:
214
+
Attached files live in the source root (typically `src`) alongside your Markdown pages. For example, say `index.md` has some JavaScript code that references `FileAttachment("quakes.csv")`:
0 commit comments