ModernWeb
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Headless CMS 的前端應用 / 楊佳安 (Anna 佳安) {%hackmd @ModernWeb/SyA2U6SmT %} > 共筆請從這開始 <iframe src="https://www.slideshare.net/slideshow/embed_code/key/GClUCjMegXJ6WG?hostedIn=slideshare&page=upload" width="680" height="432" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> ## 流程 - 什麼是 CMS 內容管理系統 - CMS 與 headless cms - 一起看code ## 什麼是內容管理系統 CMS - Content Management System CMS管理呈現在網頁上的數位資源,包括頁面架構、文字、多媒體等等。協助公司管理數位內容。(擷取自Oracle官網) 廣義來說,CMS的內容可以高度客製化,也可以只提供簡單的內容改動,從可以新增文章改動文章的部落格,到整個網站由發佈者自製的Wix Wordpress等。 CMS Market Share Report: Latest Trends and Usage Stats - [2023's CMS Market Share Report - Latest Trends and Usage Stats](https://www.wpbeginner.com/research/cms-market-share-report-latest-trends-and-usage-stats/) * 2011年,約有76%的網站是手工編碼的。到了2022年,這個數字下降到約33%。 * 目前,超過7600萬個網站使用內容管理系統(CMS) * 當我們根據流量來看前100萬個網站時,超過900,000個網站使用CMS。 傳統的開發流程 - 客戶:我們需要...內容 - 開發者: - 使用者: > 一氣呵成的開發方式,不適合常常需要新增的重複頁面、資訊 如果用 CMS 製作與討論 - 開發者 - 根據之前討論的結果,做出了可以更改內容的頁面版型等等 - 內容生產者 - 自己想加什麼就加什麼,上架新產品,緊急上架新的促銷頁面。 - 訪客 ## CMS & Headless CMS ### CMS 結構 - 版面要素 * Template - 版面 * Page - 個別頁面 * Slot - 放置圖像文字的空間 * Component - 元件 ### CMS 結構 - 基本頁面及前端(ex: 電商) - 純內容頁面 - 資源的清單頁面 - 資源的細節頁面 其他:會員管理、購物車、訂單系統... ### Headless CMS Headless - 後端有內容資訊,但沒有Styling及主題,Styling部分由前端決定 Spartacus ### CMS 結構 & Headless API ### Headless CMS 好處 好處 - 支援多個前端平台 - 再加上有前後分離的好處 ## Code Demo - https://github1s.com/sap/spartacus Adapter 適配器模式 Converter 轉換器模式 connector ## 開發的多重挑戰 ### 案例 - Megamenu - CMS: - API 資料通過重重的重組轉換 - 01 動畫與UI - 02 SEO - 階層結構可能會和UI衝突 -> 使用 noscript - 03 無障礙 - 在桌面版使用 CSS 隱藏手機版 -> DOM Tree 依然存在,造成 HTML 結構中有兩個重複的 Menu - 改成使用 JavaScript 渲染 Menu -> 一定程度拉低 Performance - 04 SSR and Hydration - 需要做裝置偵測,才能知道回傳的HTML該根據手機版或桌面版 ### 全局觀察,建立基礎架構、對 UI 做取捨 - 一開始做全局考量規劃 DOM 與 UI - 從需求面與UI開始就讓前端參與、回饋、做出需要的修正 - 當客製化CMS比例越高,使用JS處理內容資源(Content)的比就越吃重 ## CMS 下開發流程的注意事項 - 客戶溝通客製化的部分 - 提供給內容 publisher 的文件 - 一個元件所提供給Publisher改動的資料,需要包含在該元件的屬性中 ## 內容管理系統的未來 - Low code - 經由客製化的努力,讓平台趨近於 Low Code,對內容生產者的學習成本產生??? - AI - 圖像辨識、自然語言理解、自然語言處理 --- > 聊天室 右邊的圖也太搶眼XDD 藍衣男看起來很屌 隕石開發

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully