Aller directement au contenu
  • Catégories
  • Récent
  • Mots-clés
  • Populaire
  • Web
  • Utilisateurs
  • Groupes
Habillages
  • Clair
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Sombre
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Défaut (Darkly)
  • Aucun habillage
Réduire

NodeBB

  1. Accueil
  2. General Discussion
  3. Wordpress
  4. Migration Wordpress vers Hugo

Migration Wordpress vers Hugo

Planifié Épinglé Verrouillé Déplacé Wordpress
wordpresshugo
23 Messages 1 Publieurs 527 Vues 1 Abonné
  • Du plus ancien au plus récent
  • Du plus récent au plus ancien
  • Les plus votés
Répondre
  • Répondre à l'aide d'un nouveau sujet
Se connecter pour répondre
Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.
  • fariasF Hors-ligne
    fariasF Hors-ligne
    farias
    a écrit sur dernière édition par
    #1

    Les étapes sur Debian :

    # apt-get update
    # apt-get upgrade
    # apt-get install git python3-pip
    # apt-get install git python3-pygments
    # export VER="v0.150"
    # wget https://github.com/gohugoio/hugo/releases/download/v0.150.0/hugo_0.150.0_linux-amd64.deb
    # export PATH=/sbin:/usr/sbin:$PATH
    # dpkg -i ./hugo_0.150.0_linux-amd64.deb
    # mkdir hugo && cd hugo
    # hugo new site blog.cyber-neurones.org
    Congratulations! Your new Hugo site was created in /root/hugo/blog.cyber-neurones.org.
    
    Just a few more steps...
    
    1. Change the current directory to /root/hugo/blog.cyber-neurones.org.
    2. Create or install a theme:
       - Create a new theme with the command "hugo new theme <THEMENAME>"
       - Or, install a theme from https://themes.gohugo.io/
    3. Edit hugo.toml, setting the "theme" property to the theme name.
    4. Create new content with the command "hugo new content <SECTIONNAME>/<FILENAME>.<FORMAT>".
    5. Start the embedded web server with the command "hugo server --buildDrafts".
    
    See documentation at https://gohugo.io/.
    # cd blog.cyber-neurones.org/
    # hugo server
    # cd themes/
    # git submodule add https://github.com/MeiK2333/github-style
    Clonage dans '/root/hugo/blog.cyber-neurones.org/themes/github-style'...
    remote: Enumerating objects: 1176, done.
    remote: Counting objects: 100% (582/582), done.
    remote: Compressing objects: 100% (154/154), done.
    remote: Total 1176 (delta 480), reused 428 (delta 428), pack-reused 594 (from 2)
    Réception d'objets: 100% (1176/1176), 2.58 Mio | 9.59 Mio/s, fait.
    Résolution des deltas: 100% (706/706), fait.
    # cd ..
    cat > .gitignore << EOF
    themes
    resources/_gen
    assets/jsconfig.json
    public
    EOF
    # cp themes/github-style/config.template.toml  themes/github-style/config.toml
    
    
    # hugo server --bind 192.168.1.118 --baseURL http://192.168.1.118
    # 
    

    Import : ( https://github.com/ashishb/wp2hugo )

    # wget https://github.com/ashishb/wp2hugo/releases/download/1.17.0/wp2hugo_Linux_x86_64.tar.gz
    # tar zxvf wp2hugo_Linux_x86_64.tar.gz
    # chmod +x wp2hugo
    # ./wp2hugo --source cyberneurones.WordPress.2025-09-22.xml --download-media
    02:44:49PM DBG main.go:54 > Reading website export source=cyberneurones.WordPress.2025-09-22.xml
    ...
    02:45:06PM INF media_cache_setup.go:81 > media will be fetched url=![misdoubt.png](https://www.cyber-neurones.org/wp-content/plugins/ultimate-tinymce/addons/emotions/img/popobig/misdoubt.png)
    02:45:08PM FTL main.go:47 > Error: error fetching media file ![misdoubt.png](https://www.cyber-neurones.org/wp-content/plugins/ultimate-tinymce/addons/emotions/img/popobig/misdoubt.png:) error fetching media ![misdoubt.png](https://www.cyber-neurones.org/wp-content/plugins/ultimate-tinymce/addons/emotions/img/popobig/misdoubt.png:) 404 Not Found
    
    ....
    
    

    Misère.

    1 réponse Dernière réponse
    0
    • fariasF Hors-ligne
      fariasF Hors-ligne
      farias
      a écrit sur dernière édition par
      #2

      Test :

      # ./wp2hugo --source cyberneurones.WordPress.2025-09-22-3.xml --download-media  --continue-on-media-download-error
      
      1 réponse Dernière réponse
      0
      • fariasF Hors-ligne
        fariasF Hors-ligne
        farias
        a écrit sur dernière édition par
        #3

        A la fin :

        05:40:45PM INF generate_hugo_config.go:120 > Updating config file: /tmp/generated-2025-09-22-14-59-32/data/library.yaml
        05:40:45PM INF media_cache_setup.go:81 > media will be fetched url=https://www.cyber-neurones.org/favicon.ico
        05:40:46PM DBG media_downloader.go:16 > Writing favicon
        05:40:46PM DBG media_downloader.go:26 > Downloading from URL destFilePath=/tmp/generated-2025-09-22-14-59-32/static/favicon.ico
        05:40:46PM INF hugo_gen_setup.go:168 > Nginx config generated nginxConfigPath=/tmp/generated-2025-09-22-14-59-32/nginx.conf
        05:40:46PM DBG hugo_gen_setup.go:174 > Hugo site has been generated cmd="cd /tmp/generated-2025-09-22-14-59-32 && hugo serve"
        
        
        1 réponse Dernière réponse
        0
        • fariasF Hors-ligne
          fariasF Hors-ligne
          farias
          a écrit sur dernière édition par
          #4

          Je teste un autre thème car j’ai des erreurs :

          git clone --recurse-submodules https://gitlab.com/avron/gruvhugo themes/gruvhugo
          
          1 réponse Dernière réponse
          0
          • fariasF Hors-ligne
            fariasF Hors-ligne
            farias
            a écrit sur dernière édition par
            #5

            J’ai une erreur :

            Error: error building site: TOCSS: failed to transform "/sass/main.scss" (text/x-scss). Check your Hugo installation; you need the extended version to build SCSS/SASS with transpiler set to 'libsass'.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
            
            

            Je fais donc :

            # curl https://webi.sh/sass | sh
            # source ~/.config/envman/PATH.env
            
            1 réponse Dernière réponse
            0
            • fariasF Hors-ligne
              fariasF Hors-ligne
              farias
              a écrit sur dernière édition par
              #6

              Impossible de supprimer l’erreur, j’essaye donc un autre theme :

              # git clone --recurse-submodules https://github.com/nunocoracao/blowfish themes/blowfish
              

              Oups je dois remettre à la place :

              # mv content/post/ content/posts
              # mv hugo.toml hugo.toml.old
              # cp themes/blowfish/config.toml .
              # mkdir config
              # mkdir config/_default
              # cp themes/blowfish/*.toml config/_default/.
              
              1 réponse Dernière réponse
              0
              • fariasF Hors-ligne
                fariasF Hors-ligne
                farias
                a écrit sur dernière édition par
                #7

                Pas de galerie … misère.

                image.png

                1 réponse Dernière réponse
                0
                • fariasF Hors-ligne
                  fariasF Hors-ligne
                  farias
                  a écrit sur dernière édition par
                  #8

                  Le code est présent :

                  image.png

                  1 réponse Dernière réponse
                  0
                  • fariasF Hors-ligne
                    fariasF Hors-ligne
                    farias
                    a écrit sur dernière édition par
                    #9

                    Je vais refaire un test :

                    # hugo new site move.cyber-neurones.org
                    # cd move.cyber-neurones.org
                    # git submodule add --depth=1 https://github.com/MeiK2333/github-style themes/github-style
                    # echo "theme = 'github-style'" >> hugo.tomlµ
                    # hugo server --bind 192.168.1.118 --baseURL http://192.168.1.118 -t github-style
                    

                    On va dire que cela fonctionne à 50% :

                    image.png

                    image.png

                    1 réponse Dernière réponse
                    0
                    • fariasF Hors-ligne
                      fariasF Hors-ligne
                      farias
                      a écrit sur dernière édition par
                      #10

                      C’est mieux avec :

                      # hugo server --bind 192.168.1.118 --baseURL http://192.168.1.118 -t github-style --disableFastRender
                      

                      image.png

                      1 réponse Dernière réponse
                      0
                      • fariasF Hors-ligne
                        fariasF Hors-ligne
                        farias
                        a écrit sur dernière édition par
                        #11

                        Deplacement après compilation :

                        # cp -r public/ /var/www/.
                        # chown -R www-data:www-data /var/www/
                        
                        1 réponse Dernière réponse
                        0
                        • fariasF Hors-ligne
                          fariasF Hors-ligne
                          farias
                          a écrit sur dernière édition par
                          #12

                          Aie … pas la bonne commande :

                          # hugo server --bind 0.0.0.0 --baseURL http://192.168.1.118:80 -t github-style --disableFastRender --appendPort=false -D 
                          # cp -r public/ /var/www/.
                          # chown -R www-data:www-data /var/www/
                          

                          Il manque livereload.js

                          Link Preview Image
                          Live reload broken

                          Continuing the discussion from Live reload not working again, how can I fix?: Unfortunately I have the same problem and live reloading on my machine suddenly has stopped from working. I can’t figure out why. I’m on Hu…

                          favicon

                          HUGO (discourse.gohugo.io)

                          1 réponse Dernière réponse
                          0
                          • fariasF Hors-ligne
                            fariasF Hors-ligne
                            farias
                            a écrit sur dernière édition par
                            #13

                            Problème fixé avec la nouvelle commande de build :

                            # hugo server --bind 0.0.0.0 --baseURL http://192.168.1.118:80 -t github-style --disableFastRender --appendPort=false -D --disableFastRender --disableLiveReload
                            
                            1 réponse Dernière réponse
                            0
                            • fariasF Hors-ligne
                              fariasF Hors-ligne
                              farias
                              a écrit sur dernière édition par farias
                              #14

                              J’ai testé d’autres plugins :

                              • https://barnz.dev/blog/embed-iframe-in-hugo-content/

                              Sachant que j’avais déjà :

                              • https://github.com/MeiK2333/github-style
                              • https://github.com/hbstack/theme-cards (KO)
                              • https://github.com/mfg92/hugo-shortcode-gallery
                              • https://github.com/mfg92/hugo-shortcode-timeline

                              Dans themes j’ai :

                              # ls -A themes/
                              github-style  hugo-shortcode-gallery  hugo-shortcode-timeline  theme-cards
                              

                              Pour la compilation :

                              # hugo server --bind 0.0.0.0 --baseURL http://192.168.1.118:80 -t github-style,hugo-shortcode-gallery --disableFastRender --appendPort=false -D --disableFastRender --disableLiveReload
                              
                              1 réponse Dernière réponse
                              0
                              • fariasF Hors-ligne
                                fariasF Hors-ligne
                                farias
                                a écrit sur dernière édition par
                                #15

                                Je viens de pousser dans un projet privé sur Forgeo :

                                https://git.cyber-neurones.org/farias/GoHugo

                                1 réponse Dernière réponse
                                0
                                • fariasF Hors-ligne
                                  fariasF Hors-ligne
                                  farias
                                  a écrit sur dernière édition par
                                  #16

                                  On progresse :

                                  image.png

                                  1 réponse Dernière réponse
                                  0
                                  • fariasF Hors-ligne
                                    fariasF Hors-ligne
                                    farias
                                    a écrit sur dernière édition par
                                    #17

                                    Quand je vois le code fait ma moi à la main et le code fait par l’outil il y a un monde :

                                    ++
                                    author = "Fred'ô"
                                    date = "2025-09-21"
                                    title = "Trail de Barcel à Castellane"
                                    url = "/2025/09/trail-de-barcel-a-castellane/"
                                    tags = ["Trail", "Competition", "Castellane"]
                                    +++
                                    
                                    Le site de l'organisation : 
                                     - https://www.trailsdeprovence.fr/trail/rocn-trail-verdon/ 
                                     - https://rocntrailverdon.fr/ 
                                    
                                    Trail de 22 km pour 1200 D+⛰️
                                    
                                    <!--more-->
                                    
                                    Le parcours :
                                    
                                    
                                    {{< embed "https://aventures.cyber-neurones.org/trail/view/@cyberneurones@aventures.cyber-neurones.org/5bc4cfeb64c9332" "900" "600">}}
                                    
                                    Quelques photos :
                                    
                                    {{< gallery match="images/*" sortOrder="desc" rowHeight="150" margins="5" thumbnailResizeOptions="600x600 q90 Lanczos" showExif=true previewType="blur" embedPreview=true loadJQuery=true >}}
                                    
                                    

                                    Et l’autre :

                                    ---
                                    _edit_last: "1"
                                    _thumbnail_id: "25492"
                                    activitypub_status: federated
                                    author: admin
                                    categories:
                                      - trail
                                    classic-editor-remember: classic-editor
                                    cover:
                                      alt: "20250921_113215"
                                      image: /wp-content/uploads/2025/09/20250921-113215-scaled.jpg
                                    date: "2025-09-21T15:42:42+00:00"
                                    guid: https://www.cyber-neurones.org/?p=25487
                                    parent_post_id: null
                                    post_id: "25487"
                                    title: Trail de Barcel à Castellane
                                    url: /2025/09/trail-de-barcel-a-castellane/
                                    yarpp_meta:
                                      yarpp_display_for_this_post: 1
                                    
                                    ---
                                    Le parcours :
                                    
                                    \[sgpx gpx="/wp-content/uploads/gpx/castellane-2025.gpx"\]
                                    
                                    Quelques photos :
                                    
                                    
                                    {{< gallery cols="1" >}}  
                                    {{< figure src="/wp-content/uploads/2025/09/20250921-090249-scaled.jpg" title="20250921\_090249" alt="20250921\_090249" >}}
                                    
                                    {{< figure src="/wp-content/uploads/2025/09/20250921-102021-scaled.jpg" title="20250921\_102021" alt="20250921\_102021" >}}
                                    
                                    {{< figure src="/wp-content/uploads/2025/09/20250921-102515-scaled.jpg" title="20250921\_102515" alt="20250921\_102515" >}}
                                    
                                    {{< figure src="/wp-content/uploads/2025/09/20250921-112524-scaled.jpg" title="20250921\_112524" alt="20250921\_112524" >}}
                                    
                                    {{< figure src="/wp-content/uploads/2025/09/20250921-113215-scaled.jpg" title="20250921\_113215" alt="20250921\_113215" >}}
                                    
                                    {{< figure src="/wp-content/uploads/2025/09/20250921-122833-scaled.jpg" title="20250921\_122833" alt="20250921\_122833" >}}  
                                    {{< /gallery >}} 
                                    
                                    1 réponse Dernière réponse
                                    0
                                    • fariasF Hors-ligne
                                      fariasF Hors-ligne
                                      farias
                                      a écrit sur dernière édition par
                                      #18

                                      Je vais faire un test avec un nom de domaine :

                                      image.png

                                      1 réponse Dernière réponse
                                      0
                                      • fariasF Hors-ligne
                                        fariasF Hors-ligne
                                        farias
                                        a écrit sur dernière édition par
                                        #19

                                        Ajout à apache2 :

                                        # certbot certonly -d move.cyber-neurones.org
                                        Saving debug log to /var/log/letsencrypt/letsencrypt.log
                                        
                                        How would you like to authenticate with the ACME CA?
                                        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                        1: Apache Web Server plugin (apache)
                                        2: Spin up a temporary webserver (standalone)
                                        3: Place files in webroot directory (webroot)
                                        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                        Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 1
                                        Plugins selected: Authenticator apache, Installer None
                                        Requesting a certificate for move.cyber-neurones.org
                                        Performing the following challenges:
                                        http-01 challenge for move.cyber-neurones.org
                                        Waiting for verification...
                                        Cleaning up challenges
                                        
                                        IMPORTANT NOTES:
                                         - Congratulations! Your certificate and chain have been saved at:
                                           /etc/letsencrypt/live/move.cyber-neurones.org/fullchain.pem
                                           Your key file has been saved at:
                                           /etc/letsencrypt/live/move.cyber-neurones.org/privkey.pem
                                           Your certificate will expire on 2025-12-22. To obtain a new or
                                           tweaked version of this certificate in the future, simply run
                                           certbot again. To non-interactively renew *all* of your
                                           certificates, run "certbot renew"
                                         - If you like Certbot, please consider supporting our work by:
                                        
                                           Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
                                           Donating to EFF:                    https://eff.org/donate-le
                                        
                                        1 réponse Dernière réponse
                                        0
                                        • fariasF Hors-ligne
                                          fariasF Hors-ligne
                                          farias
                                          a écrit sur dernière édition par
                                          #20

                                          Pas encore dans les DNS : https://move.cyber-neurones.org

                                          # ping move.cyber-neurones.org
                                          PING move.cyber-neurones.org (195.144.11.124) 56(84) bytes of data.
                                          64 bytes from 195-144-11-124.phpnet.fr (195.144.11.124): icmp_seq=1 ttl=51 time=16.9 ms
                                          64 bytes from 195-144-11-124.phpnet.fr (195.144.11.124): icmp_seq=2 ttl=51 time=17.5 ms
                                          
                                          
                                          1 réponse Dernière réponse
                                          0

                                          Bonjour ! Vous semblez intéressé par cette conversation, mais vous n’avez pas encore de compte.

                                          Marre de refaire défiler les mêmes messages ? Créez un compte pour retrouver votre position, recevoir des notifications des nouvelles réponses, sauvegarder vos favoris et voter pour les messages que vous appréciez.

                                          Grâce à votre participation, ce message peut devenir encore meilleur 💗

                                          S'inscrire Se connecter
                                          Répondre
                                          • Répondre à l'aide d'un nouveau sujet
                                          Se connecter pour répondre
                                          • Du plus ancien au plus récent
                                          • Du plus récent au plus ancien
                                          • Les plus votés


                                          • Se connecter

                                          • Vous n'avez pas de compte ? S'inscrire

                                          • Connectez-vous ou inscrivez-vous pour faire une recherche.
                                          Powered by NodeBB Contributors
                                          • Premier message
                                            Dernier message
                                          0
                                          • Catégories
                                          • Récent
                                          • Mots-clés
                                          • Populaire
                                          • Web
                                          • Utilisateurs
                                          • Groupes