#Push my astro portfolio

1 messages · Page 1 of 1 (latest)

fierce hare
#

I find it difficult to understand and this even with the documentation of astro: How to deploy my site on Github. I need step by step explanations. I have already modified all my files locally as shown on the documentation. I tried to push my file on github but nothing happens? I need help

limpid stag
fierce hare
#

yes i did

#

but i don't understand the part about the base options in astro.config.mjs.

fierce hare
#

i managed to publish my site on github but i have no css on it ?

limpid stag
fierce hare
#

like that ?

#

it says : failed to import "<@&1055234544183287879>/tailwind"

limpid stag
#

Ah, now that I have a bit more info 😅

Pour base, tu n'as pas besoin de spécifier car ton repo git est nommé selon ton username, donc oublie cette recommandation.

Cependant, tu as identifié le problème. L'intégration tailwind n'est pas installé dans ton projet.

Tu n'as qu'à rouler la commande suivante:

npx astro add tailwind

et l'intégration devrait s'installer dans ton projet.

#

Alternativement, tu peux aussi installer l'intégration manuellement avec un npm install --save @astrojs/tailwind et en éditant ta configuration manuellement.

fierce hare
#

je vais essayer merci pour ta rapidité et ton engagement continue comme cela !

#

donc cela devrais règler les problèmes de css 🧐

limpid stag
fierce hare
#

cela fonctionne localement

#

cependant j'ai cette erreur maintenant lors du build

#

[vite:css] [postcss] Unexpected token (19:1)
file: /home/runner/work/Almorder.github.io/Almorder.github.io/node_modules/@astrojs/tailwind/base.css:undefined:undefined
error [postcss] Unexpected token (19:1)

limpid stag
#

Merde, je me suis trahi comme québécois avec "ça" 😅

limpid stag
fierce hare
#

Bien sur ce serait super ! En france il se fait tard merci pour ton aide précieuse. C'est compliqué pour un premier lancement mais ça va le faire

limpid stag
#

Tu as une erreur dans ton tailwind.config.js, et ton base est toujours présent.

Ce diff devrait corriger les dernières erreurs sur ton répo:

diff --git a/astro.config.mjs b/astro.config.mjs
index 5d71593..f4475b5 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -6,5 +6,4 @@ import tailwind from "@astrojs/tailwind";
 export default defineConfig({
  integrations: [tailwind()],
   site: "https://Almorder.github.io",
-  base: "/repo",
 });
diff --git a/tailwind.config.js b/tailwind.config.js
index c70b548..20c416e 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -15,7 +15,3 @@ module.exports = {
                }
        }
 };
-
-}
-       plugins: [],
-}
fierce hare
#

Que veux tu dire par "ton base est toujours présent" ? je dois changer /repo par le nom de mon repository sur github ?

#

ensuite je dois copier coller ce que tu as envoyer pour remplacer ce qui est dans le tailwind.config.js actuel sur le github ?

#

[vite:css] [postcss] Unexpected token, expected ";" (1:8)
file: /home/runner/work/Almorder.github.io/Almorder.github.io/node_modules/@astrojs/tailwind/base.css:undefined:undefined

#

vraiment n'hésite à me donner des instructions étapes par étapes comme si j'étais un gosse de 5ans. Je comprendrai bien plus aisément la base du problème et ce que je dois appliquer. Bonne soirée à toi .

limpid stag
#
  1. Retire de ta config Astro la clé base. Tu n'en as pas besoin pour ton cas.

  2. Tu as du code à la fin de ton fichier tailwind.config.js qui est invalide. Retire les 4 dernières lignes.

Le diff en haut te montre exactement quoi faire.

fierce hare
limpid stag
# fierce hare j'ai copié ce code dans tailwind.config.js sur github en enlevant les lignes en ...

Ce n'est pas du code, c'est un fichier diff. Un diff te montre des changements entre deux versions. Celui que j'ai mis te montrait de retirer la ligne base dans astro.config.mjs et de retirer les 4 dernières lignes dans tailwind.config.js.

Tu pouvais appliquer ce diff avec git apply. https://git-scm.com/docs/git-apply/fr

Bon, tu as fait le bon changement dans astro.config.mjs.
Ton fichier tailwind.config.js devrait être:

const path = require('path');
/** @type {import('tailwindcss').Config} */

module.exports = {
    content: [path.join(__dirname, 'src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}')],
    theme: {
        extend: {
            colors: {
                dawn: '#f3e9fa',
                dusk: '#514375',
                midnight: '#31274a',
            }
        }
    }
};
fierce hare
#

ça fonctionne

#

hourra