Skip to content

Commit

Permalink
Merge branch 'v4' of https://github.com/jackyzha0/quartz into v4
Browse files Browse the repository at this point in the history
  • Loading branch information
LeddaZ committed Dec 2, 2024
2 parents fd71a57 + 7ac94e1 commit afb444c
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 58 deletions.
22 changes: 22 additions & 0 deletions docs/hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,28 @@ server {
}
```

### Using Apache

Here's an example of how to do this with Apache:

```apache title=".htaccess"
RewriteEngine On
ErrorDocument 404 /404.html
# Rewrite rule for .html extension removal (with directory check)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI}.html -f
RewriteRule ^(.*)$ $1.html [L]
# Handle directory requests explicitly
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)/$ $1/index.html [L]
```

Don't forget to activate brotli / gzip compression.

### Using Caddy

Here's and example of how to do this with Caddy:
Expand Down
2 changes: 2 additions & 0 deletions docs/showcase.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Want to see what Quartz can do? Here are some cool community gardens:
- [Socratica Toolbox](https://toolbox.socratica.info/)
- [Morrowind Modding Wiki](https://morrowind-modding.github.io/)
- [Aaron Pham's Garden](https://aarnphm.xyz/)
- [The Pond](https://turntrout.com/welcome)
- [Pelayo Arbues' Notes](https://pelayoarbues.com/)
- [Stanford CME 302 Numerical Linear Algebra](https://ericdarve.github.io/NLA/)
- [A Pattern Language - Christopher Alexander (Architecture)](https://patternlanguage.cc/)
Expand All @@ -29,5 +30,6 @@ Want to see what Quartz can do? Here are some cool community gardens:
- [🥷🏻🌳🍃 Computer Science & Thinkering Garden](https://notes.yxy.ninja)
- [Eledah's Crystalline](https://blog.eledah.ir/)
- [🌓 Projects & Privacy - FOSS, tech, law](https://be-far.com)
- [Zen Browser Docs](https://docs.zen-browser.app)

If you want to see your own on here, submit a [Pull Request adding yourself to this file](https://github.com/jackyzha0/quartz/blob/v4/docs/showcase.md)!
136 changes: 82 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"quartz": "./quartz/bootstrap-cli.mjs"
},
"dependencies": {
"@clack/prompts": "^0.7.0",
"@clack/prompts": "^0.8.1",
"@floating-ui/dom": "^1.6.12",
"@myriaddreamin/rehype-typst": "^0.5.0-rc7",
"@napi-rs/simple-git": "0.1.19",
Expand Down Expand Up @@ -84,10 +84,10 @@
"remark-smartypants": "^3.0.2",
"rfdc": "^1.4.1",
"rimraf": "^6.0.1",
"satori": "^0.10.14",
"satori": "^0.11.3",
"serve-handler": "^6.1.6",
"sharp": "^0.33.5",
"shiki": "^1.22.2",
"shiki": "^1.23.1",
"source-map-support": "^0.5.21",
"to-vfile": "^8.0.0",
"toml": "^3.0.0",
Expand Down
3 changes: 2 additions & 1 deletion quartz/components/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export default ((opts: Options) => {
const Comments: QuartzComponent = ({ displayClass, fileData, cfg }: QuartzComponentProps) => {
// check if comments should be displayed according to frontmatter
const disableComment: boolean =
!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false"
typeof fileData.frontmatter?.comments !== "undefined" &&
(!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false")
if (disableComment) {
return <></>
}
Expand Down

0 comments on commit afb444c

Please sign in to comment.