{"id":51495647,"url":"https://github.com/appotry/docker-hexo","last_synced_at":"2026-07-07T15:01:15.436Z","repository":{"id":72263307,"uuid":"416585740","full_name":"appotry/docker-hexo","owner":"appotry","description":"Hexo Docker一键部署环境/One-Click Deployment Environment。Add cjk support 附赠详细教程","archived":false,"fork":false,"pushed_at":"2026-06-18T19:50:08.000Z","size":212,"stargazers_count":132,"open_issues_count":7,"forks_count":17,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-06-18T21:25:38.807Z","etag":null,"topics":["docker","hexo"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appotry.png","metadata":{"files":{"readme":"README.ar.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2021-10-13T04:14:51.000Z","updated_at":"2026-06-11T02:21:05.000Z","dependencies_parsed_at":"2023-05-07T12:31:12.589Z","dependency_job_id":"4ce46ab6-4cee-480e-8738-60df4624f4a8","html_url":"https://github.com/appotry/docker-hexo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/appotry/docker-hexo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appotry%2Fdocker-hexo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appotry%2Fdocker-hexo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appotry%2Fdocker-hexo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appotry%2Fdocker-hexo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appotry","download_url":"https://codeload.github.com/appotry/docker-hexo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appotry%2Fdocker-hexo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35232326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","hexo"],"created_at":"2026-07-07T15:01:14.619Z","updated_at":"2026-07-07T15:01:15.385Z","avatar_url":"https://github.com/appotry.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Docker Pulls](https://img.shields.io/docker/pulls/bloodstar/hexo.svg)](https://hub.docker.com/r/bloodstar/hexo/)\n[![Docker Image Version](https://img.shields.io/docker/v/bloodstar/hexo)](https://hub.docker.com/r/bloodstar/hexo/)\n[![Build Status](https://github.com/appotry/docker-hexo/actions/workflows/Build%20Image.yml/badge.svg)](https://github.com/appotry/docker-hexo/actions/workflows/Build%20Image.yml)\n\n# docker-hexo\n\n**صورة Docker لبيئة مدونة Hexo** — لا حاجة لتثبيت Node.js / npm / Hexo محلياً.\n\nمنشورة على Docker Hub：[bloodstar/hexo](https://hub.docker.com/r/bloodstar/hexo)\n\n🇬🇧 [English](./README.en.md) · 🇨🇳 [简体中文](./README.md) · 🇭🇰 [繁體中文](./README.zh-TW.md) · 🇯🇵 [日本語](./README.ja.md) · 🇰🇷 [한국어](./README.ko.md)\n🇪🇸 [Español](./README.es.md) · 🇫🇷 [Français](./README.fr.md) · 🇩🇪 [Deutsch](./README.de.md) · 🇵🇹 [Português](./README.pt.md) · 🇷🇺 [Русский](./README.ru.md) · 🇸🇦 [العربية](./README.ar.md)\n\n\u003e لماذا نبني مدونة مستقلة خاصة بك؟\n\u003e - بطاقة تعريف شخصية!\n\u003e - حرية كاملة في التعبير، دون رقابة من الغرباء أو الشركات.\n\n---\n\n## بداية سريعة\n\n### باستخدام docker CLI\n\n```bash\ndocker create --name=hexo \\\n  -e HEXO_SERVER_PORT=4000 \\\n  -e GIT_USER=\"yourname\" \\\n  -e GIT_EMAIL=\"you@example.com\" \\\n  -v /path/to/blog:/app \\\n  -p 4000:4000 \\\n  bloodstar/hexo\n\ndocker start hexo\n```\n\nعند التشغيل الأول، إذا كان `/app` فارغاً، يقوم الحاوية تلقائياً بتشغيل `hexo init` وتثبيت الإضافات الشائعة.\n\n### باستخدام docker compose\n\n```yaml\nservices:\n  hexo:\n    container_name: hexo\n    image: bloodstar/hexo:latest\n    hostname: hexo\n    ports:\n      - \"7800:4000\"\n    volumes:\n      - /path/to/blog:/app\n    environment:\n      - HEXO_SERVER_PORT=4000\n      - GIT_USER=yourname\n      - GIT_EMAIL=you@example.com\n      - TZ=Asia/Shanghai\n    restart: always\n```\n\n## متغيرات البيئة\n\n| المتغير | القيمة الافتراضية | الوصف |\n|---------|-------------------|-------|\n| `HEXO_SERVER_PORT` | `4000` | منفذ استماع خادم Hexo |\n| `GIT_USER` | — | اسم مستخدم Git العام |\n| `GIT_EMAIL` | — | بريد إلكتروني عام لـ Git |\n\n## مفاتيح SSH\n\n**يقوم Docker بإنشاء مفاتيح SSH تلقائياً** في `/app/.ssh`. أضف المفتاح العام إلى GitHub أو منصات أخرى للنشر.\n\n```bash\n# عرض المفتاح العام\ndocker exec hexo cat /app/.ssh/id_rsa.pub\n```\n\n[شرح إضافة مفتاح SSH إلى GitHub](https://docs.github.com/ar/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)\n\n## الدخول إلى Docker\n\n```bash\ndocker exec -it hexo bash\n```\n\nادخل إلى الحاوية لتنفيذ أي أوامر hexo.\n\n## تكوين القالب\n\nلكل شخص أذواق مختلفة. إليك بعض القوالب الموصى بها：\n\n- [Matery](https://github.com/blinkfox/hexo-theme-matery)\n- [Fluid](https://github.com/fluid-dev/hexo-theme-fluid)\n- [Butterfly](https://github.com/jerryc127/hexo-theme-butterfly)\n- [Next](https://theme-next.js.org/)\n\nبعد تحميل قالب، قم بتكوينه وفقاً للتعليمات، ثم نفّذ `hexo g` للتوليد. قم بزيارة `http://[docker IP]:4000` لرؤية موقعك.\n\n```bash\ncd /app\ngit clone https://github.com/المستخدم/hexo-theme-xxx.git themes/xxx\n```\n\nقم بتحرير `/app/_config.yml`، وضبط `theme: xxx`، ثم نفّذ `hexo g` لإعادة التوليد.\n\n## السكربت المخصص للمستخدم\n\nأضف أوامر التكوين التلقائي وتثبيت الإضافات التي تعمل عند بدء تشغيل Docker.\n\nقم بتحرير `/app/userRun.sh`：\n\n```bash\n#!/bin/bash\n\necho \"add User CMD here!\"\n\necho \"=====User CMD Start!=====\"\n# اختصار سريع لتسجيل الدخول إلى GitHub\nalias github='eval \"$(/usr/bin/ssh-agent -s)\";/usr/bin/ssh-add ~/.ssh/id_rsa'\n# إعادة تشغيل خادم pm2 الداخلي\nalias repm2='pm2 restart /hexo_run.js'\n\n#### مرآة Debian الصينية (قم بتعليقها إذا كانت شبكتك سريعة)\nsed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list\n\n#### إعدادات npm\nnpm config ls -l\n\nmkdir -p /app/.cache/npm\nnpm config set cache \"/app/.cache/npm\"\nnpm config set registry https://registry.npmjs.org/\n\n#### استمرارية السجل\nrm -rfv ~/.bash_history\nln -s /app/.bash_history ~/.bash_history\n\n#### إعدادات ssh\nchmod 600 /app/.ssh/id_rsa\nchmod 644 /app/.ssh/id_rsa.pub\nchmod 700 /app/.ssh\nrm -rfv ~/.ssh\nln -s /app/.ssh ~/.ssh\n\n#### تثبيت إضافات npm\nnpm install --save \\\n    hexo-admin \\\n    hexo-include-markdown \\\n    hexo-douban-card-new \\\n    hexo-github-card \\\n    hexo-bilibili-card-new \\\n    hexo-feed\n\necho \"=====User CMD end!=====\"\n```\n\nإذا كانت الشبكة بطيئة، قم بإعداد وكيل قبل الطلبات الشبكية：\n\n```bash\nexport http_proxy=http://192.168.0.100:1089;export https_proxy=http://192.168.0.100:1089\n\n# استخدام اسم مضيف Docker للوكيل (موصى به)\nexport http_proxy=http://xray:1089;export https_proxy=http://xray:1089\n```\n\n### requirements.txt\n\nأضف ملف `requirements.txt` إلى مجلد مدونتك (حزمة npm واحدة في كل سطر). يتم تثبيت الحزم تلقائياً عند بدء التشغيل：\n\n```txt\nhexo-generator-json-content\nhexo-generator-feed\n```\n\n## الأوامر الشائعة\n\n| الإجراء | الأمر |\n|---------|-------|\n| الدخول إلى الحاوية | `docker exec -it hexo bash` |\n| عرض السجلات | `docker logs --follow hexo` |\n| إعادة تشغيل pm2 | `docker exec hexo pm2 restart /hexo_run.js` |\n| إعادة تشغيل الحاوية | `docker restart hexo` |\n| إنشاء الملفات الثابتة | `docker exec hexo hexo g` |\n| النشر إلى خادم بعيد | `docker exec hexo hexo d` |\n| مقال جديد | `docker exec hexo hexo new post \"عنوان المقال\"` |\n| صفحة جديدة | `docker exec hexo hexo new page \"music\"` |\n| مسح الذاكرة المخبأة | `docker exec hexo hexo clean` |\n\n## اختصارات سريعة\n\nأضف هذه الاختصارات إلى ملف `~/.bashrc` أو `~/.zshrc` لاستخدام أوامر hexo دون كتابة `docker exec` في كل مرة：\n\n```bash\n# اختصارات حاوية hexo\nalias hexo='docker exec -it hexo hexo'\nalias hexo-shell='docker exec -it hexo bash'\nalias hexo-logs='docker logs --follow hexo'\nalias hexo-restart='docker exec hexo pm2 restart /hexo_run.js'\nalias hexo-reboot='docker restart hexo'\n\n# hexo new post \"عنواني\"\n# hexo g\n# hexo d\n# hexo clean\n```\n\nقم بتشغيل `source ~/.bashrc` لتفعيلها، ثم استخدم مباشرة：\n\n```bash\nhexo new post \"مقالي الجديد\"\nhexo g\nhexo d\nhexo-shell\n```\n\n## المعاينة المباشرة\n\nيدعم Hexo إعادة التحميل التلقائي عند تغيير الملفات. بعد تحرير مقال أو قالب، قم بتحديث المتصفح لرؤية التغييرات.\n\nإذا لم يتم تطبيق التغييرات، فقد يكون ذاكرة التخزين المؤقت لـ node قديمة. أعد تشغيل خدمة الويب：\n\n```bash\n# إعادة تشغيل pm2\npm2 restart /hexo_run.js\n\n# إعادة تشغيل Docker hexo\ndocker restart hexo\n```\n\n## الدروس الكاملة\n\n- [Hexo Docker環境與Hexo基礎配置篇](https://blog.17lai.site/posts/40300608/)\n- [hexo博客自定義修改篇](https://blog.17lai.site/posts/4d8a0b22/)\n- [hexo博客網絡優化篇](https://blog.17lai.site/posts/9b056c86/)\n- [hexo博客增強部署篇](https://blog.17lai.site/posts/5311b619/)\n- [hexo博客個性定製篇](https://blog.17lai.site/posts/4a2050e2/)\n- [hexo博客常見問題篇](https://blog.17lai.site/posts/84b4059a/)\n- [Hexo Markdown以及各種插件功能測試](https://blog.17lai.site/posts/cf0f47fd/)\n- [hexo博客博文撰寫篇之完美筆記大攻略終極完全版](https://blog.17lai.site/posts/253706ff/)\n- [在 Hexo 博客中插入 ECharts 動態圖表](https://blog.17lai.site/posts/217ccdc1/)\n- [使用nodeppt給hexo博客嵌入PPT演示](https://blog.17lai.site/posts/546887ac/)\n- [Vercel部署高級用法教程](https://blog.17lai.site/posts/e922fac8/)\n- [وثائق Hexo](https://hexo.io/ar/docs/)\n- [API Hexo](https://hexo.io/ar/api/)\n- [إضافات Hexo](https://hexo.io/plugins/)\n\n## التوثيق\n\n| المستند | الوصف |\n|---------|-------|\n| [AGENTS.md](./AGENTS.md) | اتفاقيات AI، الأوامر، معايير الهندسة |\n| [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md) | البنية، المكونات، تدفق البيانات |\n| [docs/REQUIREMENTS.md](./docs/REQUIREMENTS.md) | المتطلبات الوظيفية وغير الوظيفية |\n| [docs/TESTING.md](./docs/TESTING.md) | استراتيجية الاختبار، التحقق من بناء Docker |\n| [docs/CHANGELOG.md](./docs/CHANGELOG.md) | تاريخ الإصدارات |\n\n## الموارد\n\n- [وثائق Hexo](https://hexo.io/ar/docs/)\n- [Docker Hub — bloodstar/hexo](https://hub.docker.com/r/bloodstar/hexo)\n- المشروع الأصلي：[spurin/docker-hexo](https://github.com/spurin/docker-hexo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappotry%2Fdocker-hexo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappotry%2Fdocker-hexo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappotry%2Fdocker-hexo/lists"}