اذهب إلى المحتوى
  • 0

عملية النشر لموقع Hugo الثابت باستخدام Github و Digitalocean.

Mehdi Lafdali

السؤال

لقد انتهيت من البرنامج التعليمي لبناء مواقع الويب باستخدام Hugo، وأريد الآن نشر الموقع باستخدام GitHub وDigital Ocean. حدث خطأ أثناء عملية النشر في Digital Ocean. 

أحاول معرفة ما هي المشكلة، هل هي نسخة Hugo التي بنينا بها المواقع؟ أو ربما أشياء أخرى لا أعرف عنها ما يكفي؟
أطلب منكم المساعدة والاقتراحات لحل هذه المشكلة.
سأضع رسالة الخطأ الكاملة أثناء عملية النشر، شكرًا لكم جميعًا.

[2023-10-11 15:05:24] ╭──────────── git repo clone ───────────╼
[2023-10-11 15:05:24] │  › fetching app source code
[2023-10-11 15:05:24] │ => Selecting branch "main"
[2023-10-11 15:05:44] │ => Checking out commit "41279a4877aea2beac3f179443316f781c21f9ed"
[2023-10-11 15:05:45] │ 
[2023-10-11 15:05:45] │  ✔ cloned repo to /workspace
[2023-10-11 15:05:45] ╰────────────────────────────────────────╼
[2023-10-11 15:05:45] 
[2023-10-11 15:05:46]  › configuring custom build command to be run at the end of the build:
[2023-10-11 15:05:46]    │ hugo -d public
[2023-10-11 15:05:46] 
[2023-10-11 15:05:46] ╭──────────── buildpack detection ───────────╼
[2023-10-11 15:05:46] │  › using Ubuntu 22.04 stack
[2023-10-11 15:05:46] │ Detected the following buildpacks suitable to build your app:
[2023-10-11 15:05:46] │ 
[2023-10-11 15:05:46] │    digitalocean/hugo      v1.6.0  (Hugo)
[2023-10-11 15:05:46] │    digitalocean/procfile  v0.0.4  (Procfile)
[2023-10-11 15:05:46] │    digitalocean/custom    v0.1.2  (Custom Build Command)
[2023-10-11 15:05:46] │ 
[2023-10-11 15:05:46] │ For documentation on the buildpacks used to build your app, please see:
[2023-10-11 15:05:46] │ 
[2023-10-11 15:05:46] │    Hugo  v1.6.0  https://do.co/apps-buildpack-hugo
[2023-10-11 15:05:46] ╰─────────────────────────────────────────────╼
[2023-10-11 15:05:46] 
[2023-10-11 15:05:46] ╭──────────── app build ───────────╼
[2023-10-11 15:05:46] │ Using default Hugo version 0.118.2. To configure, set the HUGO_VERSION environment variable to the desired version.
[2023-10-11 15:05:46] │ See https://do.co/apps-buildpack-hugo for further instructions.
[2023-10-11 15:05:46] │ Ensuring Hugo is installed
[2023-10-11 15:05:46] │ Hugo v0.118.2 requested
[2023-10-11 15:05:46] │ Installing Hugo v0.118.2
[2023-10-11 15:05:47] │   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
[2023-10-11 15:05:47] │                                  Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0hugo
100 19.0M  100 19.0M    0     0  16.0M      0  0:00:01  0:00:01 --:--:-- 26.8M
[2023-10-11 15:05:48] │ README.md
[2023-10-11 15:05:48] │ LICENSE
[2023-10-11 15:05:48] │ Running custom build command: hugo -d public
[2023-10-11 15:05:48] │ Start building sites … 
[2023-10-11 15:05:48] │ hugo v0.118.2-da7983ac4b94d97d776d7c2405040de97e95c03d linux/amd64 BuildDate=2023-08-31T11:23:51Z VendorInfo=gohugoio
[2023-10-11 15:05:48] │ 
[2023-10-11 15:05:48] │ WARN  found no layout file for "html" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
[2023-10-11 15:05:48] │ WARN  found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
[2023-10-11 15:05:48] │ Total in 166 ms
[2023-10-11 15:05:48] │ Error: error building site: render: failed to render pages: render of "home" failed: "/workspace/layouts/index.html:5:7": execute of template failed: template: index.html:5:7: executing "main" at <partial "projects" .>: error calling partial: "/workspace/layouts/partials/projects.html:11:39": execute of template failed: template: partials/projects.html:11:39: executing "partials/projects.html" at <.URL>: can't evaluate field URL in type page.Page
[2023-10-11 15:05:48] │ building: exit status 1
[2023-10-11 15:05:48] │ ERROR: failed to build: exit status 1
[2023-10-11 15:05:48] │ 
[2023-10-11 15:05:48] │ 
[2023-10-11 15:05:48] │ For documentation on the buildpacks used to build your app, please see:
[2023-10-11 15:05:48] │ 
[2023-10-11 15:05:48] │    Hugo  v1.6.0  https://do.co/apps-buildpack-hugo
[2023-10-11 15:05:48] │ 
[2023-10-11 15:05:48] │  ✘ build failed

 

رابط هذا التعليق
شارك على الشبكات الإجتماعية

Recommended Posts

  • 0

يبدو أن الخطأ الذي تواجهه أثناء عملية النشر في Digital Ocean يتعلق بقالب الموقع الخاص بك. تشير رسالة الخطأ إلى عدم وجود ملف القالب المناسب للصفحة الرئيسية والمشكلة محددة في السطر 5 والعمود 7 من ملف index.html.

الخطأ الذي يظهر هو
 

اقتباس

"WARN found no layout file for "html" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination." و "WARN found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination." و "Error: error building site: render: failed to render pages: render of "home" failed: "/workspace/layouts/index.html:5:7": execute of template failed: template: index.html:5:7: executing "main" at <partial "projects" .>: error calling partial: "/workspace/layouts/partials/projects.html:11:39": execute of template failed: template: partials/projects.html:11:39: executing "partials/projects.html" at <.URL>: can't evaluate field URL in type page.Page"

  • لحل هذه المشكلة، يُنصح بالتحقق من وجود الملفات اللازمة للقوالب في مشروعك. تأكد من وجود ملفات القوالب الضرورية للصفحة الرئيسية والأقسام والتصنيفات في المسارات الصحيحة داخل مشروعك. قد يتطلب الأمر إنشاء ملفات قوالب جديدة أو تعديل الملفات الحالية لتلبية متطلبات المشروع الخاص بك.
  • قد تحتاج أيضًا إلى التحقق من إصدار Hugo المستخدم في Digital Ocean. يتم استخدام إصدار Hugo 0.118.2 بشكل افتراضي ويمكنك تعيين إصدار مختلف باستخدام متغير البيئة "HUGO_VERSION". تحقق من توافق إصدار Hugo الذي تستخدمه في مشروعك مع الإصدار المستخدم في Digital Ocean.
  • أخيرًا، يُنصح بالاطلاع على الوثائق والمقالات التي يوفرها Digital Ocean حول استخدام Hugo في منصتهم. يمكنك زيارة الرابط التالي للحصول على مزيد من المعلومات والتوجيه: https://do.co/apps-buildpack-hugo.
  • من المهم أن تتحقق من جميع هذه العوامل وتقوم بإصلاح أي مشكلة محتملة في قوالب مشروعك أو إصدار Hugo لحل مشكلة النشر في Digital Ocean.
رابط هذا التعليق
شارك على الشبكات الإجتماعية

انضم إلى النقاش

يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.

زائر
أجب على هذا السؤال...

×   لقد أضفت محتوى بخط أو تنسيق مختلف.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   جرى استعادة المحتوى السابق..   امسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

  • إعلانات

  • تابعنا على



×
×
  • أضف...