Skip to content
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

Update dependencies #23

Merged
merged 6 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Crowdin

on:
push:
branches: [ main ]
branches: [main]
paths:
- "src/pages/**"
- "src/assets/**"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy

on:
push:
branches: [ main ]
branches: [main]
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -46,4 +46,4 @@ jobs:
HOST: ${{ secrets.VPS_HOST }}
KEY: ${{ secrets.VPS_SSH_PRIVATE_KEY }}
TARGET: "/home/website/thenewoil/"
ARGS: '-z -r -v -l -t --delete-after --exclude node_modules/ .git/'
ARGS: "-z -r -v -l -t --delete-after --exclude node_modules/ .git/"
4 changes: 2 additions & 2 deletions .github/workflows/validate-caddy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Validate Caddyfile
on:
push:
paths:
- 'caddy/**'
- "caddy/**"
pull_request:
paths:
- 'caddy/**'
- "caddy/**"

jobs:
validate:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@

# Typescript
.tsbuildinfo

.astro
2 changes: 0 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@
"options": {
"parser": "astro",
"singleQuote": false,
"editorconfig": true,
"trailingComma": "none",
"printWidth": 120,
"semi": true
}
}
],
"pluginSearchDirs": false,
"singleQuote": false
}
2 changes: 1 addition & 1 deletion FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ github: tnonate
open_collective: thenewoil
liberapay: thenewoil
patreon: TheNewOil413
custom: https://thenewoil.org/en/support/
custom: https://thenewoil.org/en/support/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Readers who speak foreign languages can help us translate the site on [Crowdin](
- [**2023 Transparency Report**](https://blog.thenewoil.org/transparency-report-2023)
- [**2022 Transparency Report**](https://blog.thenewoil.org/transparency-report-2022-and-goals-for-2023)
- [**2021 Transparency Report**](https://blog.thenewoil.org/transparency-report-2021-and-goals-for-2022)
- [**2020 Transparency Report**](https://blog.thenewoil.org/2020-recap-2021-plans)
- [**2020 Transparency Report**](https://blog.thenewoil.org/2020-recap-2021-plans)
34 changes: 27 additions & 7 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type Config from "./typings/config";
const DIRNAME = path.dirname(fileURLToPath(import.meta.url));

const config = JSON.parse(
(await fs.readFile(path.resolve(DIRNAME, "config.json"))).toString()
(await fs.readFile(path.resolve(DIRNAME, "config.json"))).toString(),
) as Config;

// https://astro.build/config
Expand All @@ -21,6 +21,8 @@ import sitemap from "@astrojs/sitemap";
// https://astro.build/config
import mdx from "@astrojs/mdx";

import icon from "astro-icon";

import compress from "astro-compress";

import robotsTxt from "astro-robots-txt";
Expand All @@ -32,15 +34,33 @@ export default defineConfig({
site: "https://thenewoil.org",
outDir: "./www",
integrations: [
tailwind({ config: { applyBaseStyles: false } }),
tailwind({
applyBaseStyles: false,
}),
mdx(),
sitemap(),
robotsTxt({ sitemap: false, policy: [{disallow: "/", userAgent: "GPTBot"}, {disallow: "/", userAgent: "ia_archiver"}, {disallow: "/", userAgent: "User-Agent: Google-Extended"}] }),
icon(),
robotsTxt({
sitemap: false,
policy: [
{ disallow: "/", userAgent: "GPTBot" },
{ disallow: "/", userAgent: "ia_archiver" },
{ disallow: "/", userAgent: "User-Agent: Google-Extended" },
],
}),
compress({
css: { comments: false },
html: { removeComments: true },
js: false,
logger: 1,
Logger: 1,
JavaScript: false,
CSS: {
csso: {
comments: false,
},
},
HTML: {
"html-minifier-terser": {
removeComments: true,
},
},
}),
languagePlugin({
supportedLanguageCodes: config.languages.map((lang) => lang.code),
Expand Down
6 changes: 1 addition & 5 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ files:
source: "/pages/en/**/*.mdx",
translation: "/pages/%two_letters_code%/**/%file_name%.mdx",
ignore:
[
"/pages/en/blog-index.mdx",
"/pages/en/pgp.mdx",
"/pages/en/xmr2.mdx",
],
["/pages/en/blog-index.mdx", "/pages/en/pgp.mdx", "/pages/en/xmr2.mdx"],
},
{
source: "/pages/404.mdx",
Expand Down
6 changes: 3 additions & 3 deletions docs/content/icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

Within `.mdx` and `.astro` you are able to use icons. To allow for this we use "[astro-icon](https://github.com/natemoo-re/astro-icon#readme)" which is able to take icons from various [icon sets](https://icon-sets.iconify.design). Currently most icons are from [Material Design Icons (MDI)](https://icon-sets.iconify.design/mdi/), but others can be used.

The following example shows how to use the Icon component in MDX. First you need to import the Icon component from `astro-icon` and then place it like a regular HTML element. Then specify the specific icon set it needs to take the icons from with the `pack` attribute. Now get specify an icon-name with the `name` attribute. If you wanted to add some extra styling to the icon (which will be passed through directly to the SVG element) you can do this with the `class` attribute.
The following example shows how to use the Icon component in MDX. First you need to import the Icon component from `astro-icon` and then place it like a regular HTML element. Now specify an icon-name with the `name` attribute. If you wanted to add some extra styling to the icon (which will be passed through directly to the SVG element) you can do this with the `class` attribute.

```tsx
import { Icon } from "astro-icon";
import { Icon } from "astro-icon/components";

<Icon pack="mdi" name="house" class="h-7 w-7" />
<Icon name="mdi:house" class="h-7 w-7" />
```
Loading
Loading