Skip to content

Commit

Permalink
Fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
irskep committed Sep 6, 2024
1 parent 346f92f commit 0f2a428
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions docs/src/basics/configuration.dj
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ html:
header_links:
- text: "Some text"
url: "https://a/full/url"
extra_static_dirs:
- path: "../node_modules/some_library"
exclude_patterns: ['**/*.ts'] # optional
patterns: # optional; default is '**/*'
- '**/*.css'

gfm:
ignore_static: ["**/*.html", "**/*.css", "**/*.js"]
Expand Down
3 changes: 3 additions & 0 deletions docs/src/changelog.dj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ order: -1
- Probably fixed more Windows bugs

- Many changes to the default theme
- Search results no longer contain duplicated text

### 0.2.4 - 2024-09-04

Expand All @@ -40,11 +41,13 @@ order: -1
- Allow putting custom links in the header

- HTML improvements

- OpenGraph and Twitter Card metadata
- Site-wide search using [lunr](https://lunrjs.com)
- Move "On this page" to a header bar on mobile instead of just disappearing

- Plugin API improvements

- Plugins can provide static files, perhaps based on site content (this powers search)
- More methods can be async
- Plugins can mark nodes as "special" and not to be touched by other plugins
Expand Down
4 changes: 2 additions & 2 deletions src/renderers/htmlRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ export class HTMLRenderer implements DjockeyRenderer {
results: allStaticFileAbsoluteFSPaths,
logCollector,
}),
...config.html.extra_static_dirs.flatMap((extraStaticDir) => {
...(config.html.extra_static_dirs || []).flatMap((extraStaticDir) => {
const fsBase = fsjoin([
config.rootPath,
...refsplit(extraStaticDir.path),
]);
return extraStaticDir.patterns.map(async (pattern) => {
return (extraStaticDir.patterns || ["**/*"]).map(async (pattern) => {
copyFilesMatchingPattern({
base: fsBase,
dest: config.output_dir.html,
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export interface DjockeyConfig {
link_mappings?: LinkMappingConfig[];

html: {
extra_static_dirs: {
extra_static_dirs?: {
path: string;
patterns: string[];
patterns?: string[];
exclude_patterns?: string[];
}[];
footer_text: string;
Expand Down
2 changes: 1 addition & 1 deletion templates/html/static/dj-doctree-and-toc.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
padding: 0 calc(var(--mm) - var(--ms));
}

.DJTableOfContents_Content {
.DJTableOfContents {
font-size: var(--fs-small);
padding: 0 var(--ms);
}
Expand Down

0 comments on commit 0f2a428

Please sign in to comment.