-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Merge de la branche dev en version 1.0.0 vers la branche main
Ajout de l'ensemble des fichiers
- Loading branch information
Showing
110 changed files
with
8,595 additions
and
1,165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
API_URL = "" | ||
FORM_URL = "" | ||
SITE_URL = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"es2022": true, | ||
"browser": true | ||
}, | ||
"plugins": ["prettier"], | ||
"extends": ["eslint:recommended", "plugin:astro/recommended", "plugin:astro/jsx-a11y-strict"], | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"prettier/prettier": "error" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.js"], | ||
"rules": { | ||
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"] | ||
} | ||
}, | ||
{ | ||
"files": ["*.astro"], | ||
"parser": "astro-eslint-parser", | ||
"parserOptions": { | ||
"parser": "@typescript-eslint/parser", | ||
"extraFileExtensions": [".astro"] | ||
}, | ||
"rules": { | ||
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts"], | ||
"parser": "@typescript-eslint/parser", | ||
"extends": ["plugin:@typescript-eslint/recommended"], | ||
"rules": { | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ "argsIgnorePattern": "^_", "destructuredArrayIgnorePattern": "^_" } | ||
], | ||
"@typescript-eslint/no-non-null-assertion": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["**/*.astro/*.js", "*.astro/*.js"], | ||
"parser": "@typescript-eslint/parser" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"tabWidth": 4, | ||
"semi": true, | ||
"singleQuote": false, | ||
"printWidth": 120, | ||
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"], | ||
"pluginSearchDirs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"recommendations": ["astro-build.astro-vscode"], | ||
"unwantedRecommendations": [] | ||
"recommendations": ["astro-build.astro-vscode"], | ||
"unwantedRecommendations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "./node_modules/.bin/astro dev", | ||
"name": "Development server", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "./node_modules/.bin/astro dev", | ||
"name": "Development server", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "astro-build.astro-vscode", | ||
"[typescript]": { | ||
"editor.defaultFormatter": "vscode.typescript-language-features" | ||
}, | ||
"[svelte]": { | ||
"editor.defaultFormatter": "svelte.svelte-vscode" | ||
}, | ||
"vue.codeActions.enabled": false, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "vscode.typescript-language-features" | ||
}, | ||
"typescript.inlayHints.parameterNames.enabled": "all", | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"astro", // Enable .astro | ||
"typescript", // Enable .ts | ||
"typescriptreact" // Enable .tsx | ||
], | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint" | ||
}, | ||
"nuxt.isNuxtApp": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "start", | ||
"problemMatcher": [], | ||
"label": "npm: start", | ||
"detail": "astro dev" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,88 @@ | ||
# Astro Starter Kit: Basics | ||
# Le dico du geek | ||
|
||
``` | ||
npm create astro@latest -- --template basics | ||
``` | ||
**Le dico du geek** est un site web francophone destiné à une meilleure compréhension du langage "geek". Le site a été réalisé à l'aide du framework Astro par Alexis De Chiara dans le but d'avoir un site bien référencé grâce à l'utilisation du SSR. | ||
|
||
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics) | ||
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics) | ||
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json) | ||
## Fonctionnalités | ||
![Alt text](https://raw.githubusercontent.com/littlesticks/odyssey-theme/main/assets/lh-screenshot.png) | ||
|
||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun! | ||
- ✅ Score de 100% sur **Lighthouse** | ||
- ✅ Utilisation de **Tailwind CSS** ([@astrojs/tailwind](https://docs.astro.build/fr/guides/integrations-guide/tailwind/)) avec le support du mode sombre | ||
- ✅ Optimisation du **SEO** ([astro-seo](https://github.com/jonasmerlin/astro-seo)) | ||
- ✅ Génération de la **sitemap** automatique ([@astrojs/sitemap](https://docs.astro.build/fr/guides/integrations-guide/sitemap/)) | ||
- ✅ Utilisation de **Prettier** ([prettier-plugin-astro | ||
](https://github.com/withastro/prettier-plugin-astro)) et **Eslint** ([eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro)) | ||
- ✅ Utilisation des **icônes** simplifiées ([astro-icon](https://github.com/natemoo-re/astro-icon)) | ||
- ✅ Génération automatique des licenses ([astro-licenses-report](https://code.juliancataldo.com/component/astro-licenses-report/)) | ||
|
||
![basics](https://user-images.githubusercontent.com/4677417/186188965-73453154-fdec-4d6b-9c34-cb35c248ae5b.png) | ||
## Structure | ||
|
||
```bash | ||
/ | ||
┣ .vscode/ | ||
┃ ┣ ... | ||
┣ dist/ | ||
┃ ┣ client/ | ||
┃ ┗ server/ | ||
┣ node_modules/ | ||
┃ ┣ ... | ||
┣ public/ | ||
┃ ┣ favicon/ | ||
┃ ┗ img/ | ||
┣ src/ | ||
┃ ┣ assets/ | ||
┃ ┣ components/ | ||
┃ ┣ icons/ | ||
┃ ┣ layouts/ | ||
┃ ┣ pages/ | ||
┃ ┣ styles/ | ||
┃ ┣ utils/ | ||
┃ ┣ env.d.ts | ||
┃ ┗ pwa.ts | ||
┣ .env | ||
┣ .env.development | ||
┣ .eslintrc.json | ||
┣ .gitignore | ||
┣ .prettierrc | ||
┣ astro.config.mjs | ||
┣ package.json | ||
┣ pnpm-lock.yaml | ||
┣ prettier.config.js | ||
┣ README.md | ||
┣ svelte.config.js | ||
┣ tailwind.config.cjs | ||
┣ tsconfig.json | ||
┗ vite.config.ts | ||
``` | ||
|
||
## 🚀 Project Structure | ||
## Utilisation | ||
|
||
Inside of your Astro project, you'll see the following folders and files: | ||
### Commandes | ||
|
||
``` | ||
/ | ||
├── public/ | ||
│ └── favicon.svg | ||
├── src/ | ||
│ ├── components/ | ||
│ │ └── Card.astro | ||
│ ├── layouts/ | ||
│ │ └── Layout.astro | ||
│ └── pages/ | ||
│ └── index.astro | ||
└── package.json | ||
``` | ||
Toutes les commandes sont à exécuter depuis la racine du projet, à partir d'un terminal : | ||
|
||
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. | ||
| Commande | Action | | ||
| :--------------------- | :----------------------------------------------- | | ||
| `pnpm install` | Installe les dépendances dependencies | | ||
| `pnpm run dev` | Démarre le serveur de développement local à `localhost:3000` | | ||
| `pnpm run build` | Génère le site de production dans `./dist/` | | ||
| `pnpm run preview` | Prévisualise la version *build* localement, avant de la déployer | | ||
| `pnpm run astro ...` | Exécute des commandes CLI telles que `astro add`, `astro check` | | ||
| `pnpm run astro --help` | Obtenir de l'aide pour utiliser le CLI d'Astro | | ||
|
||
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. | ||
### Variables d'environnements | ||
|
||
Any static assets, like images, can be placed in the `public/` directory. | ||
| | Nom | Fonction | | ||
|---|---|---| | ||
| URL de l'api | API_URL | Permet de se connecter à la base de données | | ||
| URL du formulaire de reqête | FORM_URL |Redirige vers le formulaire de requête disponible dans le pied de page | | ||
| URL du site | SITE_URL | Renseigne le nom de domaine du site pour la sitemap | | ||
|
||
## 🧞 Commands | ||
Comme la variable "site" dans astro.config.mjs ne fonctionne pas avec la variable d'environnement pour l'intégration du **sitemap**, il faut changer l'URL de celle-ci ainsi que celle présente dans robots.txt. | ||
|
||
All commands are run from the root of the project, from a terminal: | ||
## Pour en savoir plus | ||
|
||
| Command | Action | | ||
| :--------------------- | :----------------------------------------------- | | ||
| `npm install` | Installs dependencies | | ||
| `npm run dev` | Starts local dev server at `localhost:3000` | | ||
| `npm run build` | Build your production site to `./dist/` | | ||
| `npm run preview` | Preview your build locally, before deploying | | ||
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | | ||
| `npm run astro --help` | Get help using the Astro CLI | | ||
N'hésitez pas à consulter [la documentation officiel](https://docs.astro.build) | ||
|
||
## 👀 Want to learn more? | ||
## License | ||
|
||
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). | ||
**Le dico du geek** est sous licence MIT - voir le fichier [LICENSE](./LICENSE.md) pour plus de détails. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,94 @@ | ||
import { defineConfig } from 'astro/config'; | ||
|
||
import { defineConfig } from "astro/config"; | ||
import tailwind from "@astrojs/tailwind"; | ||
import image from "@astrojs/image"; | ||
import AstroPWA from "@vite-pwa/astro"; | ||
import svelte from "@astrojs/svelte"; | ||
import partytown from "@astrojs/partytown"; | ||
import compress from "astro-compress"; | ||
import sitemap from "@astrojs/sitemap"; | ||
|
||
import node from "@astrojs/node"; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
integrations: [tailwind({ | ||
config: { applyBaseStyles: false }, | ||
})], | ||
output: "server" | ||
}); | ||
site: "https://ledicodugeek.geekly.blog", | ||
integrations: [ | ||
tailwind({ | ||
config: { | ||
applyBaseStyles: false, | ||
}, | ||
}), | ||
image(), | ||
svelte(), | ||
AstroPWA({ | ||
mode: "development", | ||
base: "/", | ||
scope: "/", | ||
includeAssets: ["favicon.ico", "apple-touch-icon.png", "masked-icon.svg"], | ||
registerType: "autoUpdate", | ||
manifest: { | ||
name: "Le dico du geek", | ||
description: "Le dictionnaire de la culture geek", | ||
theme_color: "#121C40", | ||
icons: [ | ||
{ | ||
src: "/favicon/pwa-48x48.png", | ||
sizes: "48x48", | ||
type: "image/png", | ||
purpose: "maskable", | ||
}, | ||
{ | ||
src: "/favicon/pwa-72x72.png", | ||
sizes: "72x72", | ||
type: "image/png", | ||
purpose: "maskable", | ||
}, | ||
{ | ||
src: "/favicon/pwa-96x96.png", | ||
sizes: "96x96", | ||
type: "image/png", | ||
purpose: "maskable", | ||
}, | ||
{ | ||
src: "/favicon/pwa-128x128.png", | ||
sizes: "128x128", | ||
type: "image/png", | ||
purpose: "maskable", | ||
}, | ||
{ | ||
src: "/favicon/pwa-192x192.png", | ||
sizes: "192x192", | ||
type: "image/png", | ||
}, | ||
{ | ||
src: "/favicon/pwa-384x384.png", | ||
sizes: "384x384", | ||
type: "image/png", | ||
purpose: "maskable", | ||
}, | ||
{ | ||
src: "/favicon/pwa-512x512.png", | ||
sizes: "512x512", | ||
type: "image/png", | ||
purpose: "maskable", | ||
}, | ||
], | ||
}, | ||
workbox: { | ||
navigateFallback: "/404", | ||
globPatterns: ["**/*.{css,js,html,svg,png,ico,txt}"], | ||
}, | ||
devOptions: { | ||
enabled: true, | ||
navigateFallbackAllowlist: [/^\/404$/], | ||
}, | ||
}), | ||
partytown(), | ||
compress(), | ||
sitemap(), | ||
], | ||
output: "server", | ||
adapter: node({ | ||
mode: "standalone", | ||
}), | ||
}); |
Oops, something went wrong.