No description
Find a file
setthawutttty 33bf8a97b9 no message
2024-11-25 17:59:24 +07:00
.github/workflows เปลี่ยนที่ build docker 2024-02-14 14:38:58 +07:00
cypress first commit 2023-09-06 14:51:44 +07:00
public no message 2024-11-25 17:59:24 +07:00
src รับโอน 2024-11-19 18:01:06 +07:00
.env.production build image 2023-09-12 09:01:03 +07:00
.gitignore add gitignore 2023-09-08 14:30:01 +07:00
cypress.config.ts first commit 2023-09-06 14:51:44 +07:00
docker-compose.yml update: port 808 to 80 2024-07-11 14:45:40 +07:00
Dockerfile set file build image 2023-11-07 19:23:16 +07:00
entrypoint.sh fix: move debug , deploy to super admin children 2024-07-04 10:53:26 +07:00
env.d.ts first commit 2023-09-06 14:51:44 +07:00
gen.sh feat: add script 2024-09-30 18:13:48 +07:00
index.html first commit 2023-09-06 14:51:44 +07:00
nginx.conf update: port 808 to 80 2024-07-11 14:45:40 +07:00
package-lock.json feat: video on markdown 2024-07-03 17:47:34 +07:00
package.json feat: video on markdown 2024-07-03 17:47:34 +07:00
README.md Add diagram 2024-11-12 13:43:48 +07:00
tsconfig.app.json manual v2 2024-05-29 14:06:59 +07:00
tsconfig.config.json manual v2 2024-05-29 14:06:59 +07:00
tsconfig.json manual v2 2024-05-29 14:06:59 +07:00
tsconfig.vitest.json first commit 2023-09-06 14:51:44 +07:00
vite.config.ts manual v2 2024-05-29 14:06:59 +07:00

BMA-EHR Manual

คู่มือระบบ BMA-EHR ใช้ Markdown ในการเขียน และได้ผลลัพธ์ออกมาเป็น html, docx ได้

การจัดการ

ในการเพิ่ม ลบ แก้ไข คู่มือ จะทำผ่านไฟล์ .md ภายใน public/documents โดยวิธีการเขียนจะอ้างอิงตามวิธีการเขียน Markdown เป็นหลัก

เมื่อต้องการ Preview สามารถใช้ Editor อย่าง VSCode หรือ โปรแกรมใดๆก็ตาม ที่สามารถอ่านและแสดงผล Markdown ให้ออกมา ในรูปแบบที่คนทั่วไปสามารถเห็นได้อย่างเช่น Obsidian ที่สามารถเขียน Note เป็น Markdown และแสดงออกมาเหมือนหน้าเว็บ หรือ GitHub MD File ที่สามารถ Preview ผลลัพธ์ ออกมาทางหน้าเว็บได้

การ Preview มีปัญหาเรื่อง การแสดงรูปภาพ เนื่องจากเมื่อนำไปadminใช้ในการ แสดงผลบนหน้าเว็บ จะต้องมีการระบุตำแหน่งของ รูปภาพให้เป็น absolute path ไม่สามารถใช้ relative path ได้ทำให้ เมื่อต้องการจัด หรือโยกย้ายตำแหน่งของ ไฟล์ md สามารถทำได้ง่าย และไม่รวมอยู่ในตำแหน่งเดียวกันได้

หากมีการเพิ่ม หรือลบไฟล์ .md ให้ทำการแก้ไข public/toc.json เพื่อให้ไฟล์นั้นสามารถถูกเรียกใช้ได้ โดยมีโครงสร้างข้อมูลตามตัวอย่างด้านล่าง

[
  {
    "icon": "mdi-file-outline",
    "activeIcon": "mdi-file",
    "label": "คู่มือการใช้งาน (ผู้ดูแลระบบ)",
    "children": [
      {
        "label": "การใช้งานผู้ดูแลระบบ",
        "path": "/manual/chapter-1-superadmin-maintenance"
      },
      {
        "label": "การใช้งานผู้ดูแลระบบระดับสูง",
        "path": "/manual/chapter-2-superadmin-maintenance"
      },
      {
        "label": "คู่มือการตรวจสอบและแก้ไข",
        "path": "/manual/chapter-3-superadmin-debug"
      },
      {
        "label": "คู่มือการจัดการระบบ",
        "path": "/manual/chapter-4-superadmin-build-and-deploy"
      }
    ]
  }
]

โดยที่ Icon ที่ใช้จะเป็น ของ mdi เท่านั้น สามารถค้นหาได้จาก mdi-icons

การสร้างไฟล์ docx และ pdf

ในการสร้างไฟล์ docx จากไฟล์ md สามารถทำได้โดยการใช้ pandoc ภายใน public ตามตัวอย่างคือ

pandoc \
 --reference-doc ./documents/ref.docx \
 --data-dir ./images \
 -o ./documents/chapter-1-admin-login.docx \
 ./documents/chapter-1-admin-login.md

หรือใช้ script ในการ generate docx

ในส่วนของ PDF เนื่องจากการแปลงจาก md เป็น pdf ตรงๆ ให้ผลลัพธ์ที่ไม่เป็นไปตามที่ต้องการ จึงใช้วิธีเปิด ไฟล์ docx และแปลงเป็น pdf

สามารถใส่ลงในตัวไฟล์ md ได้ตามตัวอย่าง @youtube