Skip to content

Commit 33f6b3d

Browse files
filipslezaklabRobert Olejnik
and
Robert Olejnik
authored
New pricing (#43)
--------- Co-authored-by: Robert Olejnik <[email protected]>
1 parent dbee8a8 commit 33f6b3d

31 files changed

+1680
-1557
lines changed

.vscode/settings.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2-
"cSpell.words": ["pricebox"],
2+
"cSpell.words": [
3+
"dirreferent",
4+
"pricebox"
5+
],
36
"typescript.tsdk": "node_modules\\typescript\\lib"
47
}

README.md

+43-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# defguard website
22

3+
Defguard website built on [Astro](https://astro.build)!
4+
35
## Editing content
46

57
Most of the content is written in HTML but some parts ware made with ease of configuration in mind.
@@ -17,9 +19,15 @@ Files that build content on website are written in `.mdx` files and are stored i
1719
Every content file begins with special section that defines additional information for that file's context, for example title, order of display etc.
1820
You can find definitions of this information inside [content.ts](./src/content/config.ts).
1921

22+
## Content editing notes
23+
24+
### Pricing
25+
26+
Pricing is a special case where we need to render MDX directly on client side only, this means importing any components in pricing collection is forbidden because it will not work. Raw HTML is still OK since we render it through rehype-raw.
27+
2028
## Editor recommendation
2129

22-
[VSCode](https://code.visualstudio.com/download) is as far the easiest to setup.
30+
[VSCode](https://code.visualstudio.com/download) is by far the easiest to setup.
2331

2432
### Recommended extensions
2533

@@ -33,9 +41,42 @@ Extensions to install:
3341

3442
## Development
3543

44+
### Installing Node.js
45+
46+
Version of Node.js should be the same Major as the one specified in [.nvmrc](./.nvmrc) file.
47+
48+
#### Official source
49+
50+
Follow instructions from [official site](https://nodejs.org/en/download/package-manager).
51+
52+
#### Node version manager (NVM)(Recommended for development)
53+
54+
Supports using dirreferent version of Node.js for each project.
55+
56+
- [Windows](https://github.com/coreybutler/nvm-windows)
57+
- [Mac/Linux](https://github.com/nvm-sh/nvm)
58+
59+
After correct install, in root of the project use (once):
60+
61+
```bash
62+
nvm install
63+
```
64+
65+
And then:
66+
67+
```bash
68+
nvm use
69+
```
70+
3671
### Installing dependencies
3772

38-
Install Node.js version specified inside `.nvmrc` and install `pnpm`
73+
Make sure package manager pnpm is installed.
74+
If not use this command to install it:
75+
76+
```bash
77+
npm i -g pnpm
78+
```
79+
3980
Then run install dependencies with:
4081

4182
```bash

astro.config.mjs

+2-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ const __dirname = path.dirname(__filename);
1616
export default defineConfig({
1717
site: "https://defguard.net",
1818
prefetch: true,
19-
integrations: [
20-
mdx(),
21-
preact({ compat: true }),
22-
playformCompress(),
23-
],
19+
integrations: [mdx(), preact({ compat: true }), playformCompress()],
2420
markdown: {
2521
rehypePlugins: [
2622
[
@@ -41,6 +37,7 @@ export default defineConfig({
4137
css: {
4238
preprocessorOptions: {
4339
scss: {
40+
api: "modern",
4441
additionalData: `@use "@/styles/mixins" as *;`,
4542
},
4643
},

package.json

+25-23
Original file line numberDiff line numberDiff line change
@@ -9,48 +9,50 @@
99
"preview": "astro preview",
1010
"astro": "astro"
1111
},
12-
"packageManager": "pnpm@9.7.1",
12+
"packageManager": "pnpm@9.14.2",
1313
"pnpm": {
1414
"default": "9.7.1"
1515
},
1616
"engines": {
1717
"node": ">=22.3"
1818
},
1919
"dependencies": {
20-
"@astrojs/check": "^0.3.4",
21-
"@astrojs/mdx": "^2.0.3",
22-
"@astrojs/preact": "^3.1.0",
23-
"@astrolib/analytics": "^0.5.0",
24-
"@floating-ui/react": "^0.26.6",
20+
"@astrojs/check": "^0.9.4",
21+
"@astrojs/mdx": "^3.1.9",
22+
"@astrojs/preact": "^3.5.3",
23+
"@astrolib/analytics": "^0.6.1",
24+
"@floating-ui/react": "^0.26.28",
2525
"@nanostores/preact": "^0.5.2",
26-
"@playform/compress": "^0.1.1",
27-
"@preact/signals": "^1.2.2",
26+
"@playform/compress": "^0.1.6",
27+
"@preact/signals": "^1.3.0",
2828
"@tuplo/numberfmt": "^1.11.0",
2929
"@types/lodash-es": "^4.17.12",
30-
"astro": "^4.1.0",
31-
"astro-font": "^0.0.67",
30+
"astro": "^4.16.13",
31+
"astro-font": "^0.1.81",
3232
"astro-imagetools": "^0.9.0",
33-
"clsx": "^2.1.0",
33+
"clsx": "^2.1.1",
3434
"lodash-es": "^4.17.21",
35-
"nanostores": "^0.11.2",
36-
"pnpm": "^8.15.9",
37-
"preact": "^10.19.3",
35+
"nanostores": "^0.11.3",
36+
"preact": "^10.24.3",
37+
"react-markdown": "^9.0.1",
3838
"rehype-external-links": "^3.0.0",
39-
"sass": "^1.69.7",
40-
"sharp": "0.33.1",
41-
"short-unique-id": "^5.0.3",
42-
"typescript": "^5.3.3",
39+
"rehype-raw": "^7.0.0",
40+
"sass": "^1.81.0",
41+
"sharp": "0.33.5",
42+
"short-unique-id": "^5.2.0",
43+
"typescript": "^5.6.3",
4344
"typescript-cookie": "^1.0.6",
45+
"use-sync-external-store": "^1.2.2",
4446
"user-agent-data-types": "^0.4.2",
45-
"zustand": "^4.5.0"
47+
"zustand": "^5.0.1"
4648
},
4749
"devDependencies": {
48-
"@astrojs/ts-plugin": "^1.4.0",
50+
"@astrojs/ts-plugin": "^1.10.4",
4951
"@typescript-eslint/parser": "^6.17.0",
5052
"eslint": "^8.56.0",
51-
"eslint-plugin-astro": "^0.31.0",
52-
"prettier": "^3.1.1",
53-
"prettier-plugin-astro": "^0.12.3"
53+
"eslint-plugin-astro": "^1.3.1",
54+
"prettier": "^3.3.3",
55+
"prettier-plugin-astro": "^0.14.1"
5456
},
5557
"overrides": {
5658
"react": "npm:@preact/compat@latest",

0 commit comments

Comments
 (0)