[{"data":1,"prerenderedAt":162},["ShallowReactive",2],{"footer-links":3,"content-\u002Ffeatures\u002Fsource-edit":12},[4,9],{"path":5,"title":6,"type":7,"isExternal":8},"https:\u002F\u002Fgithub.com\u002Flife-and-dev\u002Fmdsite","GitHub Repo","link",true,{"path":10,"title":11,"type":7,"isExternal":8},"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@life-and-dev\u002Fmdsite","NPM Registry",{"id":13,"title":14,"body":15,"description":25,"extension":156,"meta":157,"navigation":8,"path":158,"seo":159,"stem":160,"__hash__":161},"content\u002Ffeatures\u002Fsource-edit.md","Source Edit",{"type":16,"value":17,"toc":149},"minimark",[18,22,26,31,47,51,65,100,107,112,115,138,145],[19,20,14],"h1",{"id":21},"source-edit",[23,24,25],"p",{},"The Source Edit feature provides a direct link for users to edit the current page's source content on the hosted repository (currently supporting GitHub).",[27,28,30],"h2",{"id":29},"how-it-works","How it Works",[23,32,33,37,38,42,43,46],{},[34,35,36],"code",{},"features.source-edit"," is a ",[39,40,41],"strong",{},"URL prefix",". When it is a non-empty string, an \"Edit\" button appears in the application bar (as a pencil icon) and in the footer. Clicking the button opens ",[34,44,45],{},"\u003Csource-edit>\u003Cpage>.md"," in a new tab, so the reader lands directly on the source file in your repository.",[27,48,50],{"id":49},"configuration","Configuration",[23,52,53,56,57,60,61,64],{},[34,54,55],{},"mdsite init"," auto-detects this prefix from your ",[34,58,59],{},"origin"," git remote and current branch (",[34,62,63],{},"https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Fblob\u002F\u003Cbranch>\u002F","). You can also set it by hand to the URL prefix that points at the directory holding your Markdown files:",[66,67,72],"pre",{"className":68,"code":69,"language":70,"meta":71,"style":71},"language-yaml shiki shiki-themes github-light github-dark","features:\n  source-edit: https:\u002F\u002Fgithub.com\u002Flife-and-dev\u002Fmdsite\u002Fblob\u002Fmain\u002F\n","yaml","",[34,73,74,87],{"__ignoreMap":71},[75,76,79,83],"span",{"class":77,"line":78},"line",1,[75,80,82],{"class":81},"s9eBZ","features",[75,84,86],{"class":85},"sVt8B",":\n",[75,88,90,93,96],{"class":77,"line":89},2,[75,91,92],{"class":81},"  source-edit",[75,94,95],{"class":85},": ",[75,97,99],{"class":98},"sZZnC","https:\u002F\u002Fgithub.com\u002Flife-and-dev\u002Fmdsite\u002Fblob\u002Fmain\u002F\n",[23,101,102,103,106],{},"The renderer appends ",[34,104,105],{},"\u003Cpage>.md"," to this prefix to build the Edit link, so the prefix must include the trailing path segment that leads to the file.",[108,109,111],"h3",{"id":110},"requirements","Requirements",[23,113,114],{},"For the \"Edit\" link to be generated and rendered:",[116,117,118,124,131],"ol",{},[119,120,121,123],"li",{},[34,122,21],{}," must be a non-empty string.",[119,125,126,127,130],{},"The URL prefix must include the trailing path segment to the file (e.g. ",[34,128,129],{},"...\u002Fblob\u002Fmain\u002F"," for GitHub).",[119,132,133,134,137],{},"For Markdown that lives in a subdirectory of the repository, include that subdir in the prefix (e.g. ",[34,135,136],{},"...\u002Fblob\u002Fmain\u002Fdocs\u002F",").",[23,139,140,141,144],{},"Setting ",[34,142,143],{},"source-edit: ''"," or omitting it entirely (also the outcome when init finds no GitHub remote) disables the Edit button.",[146,147,148],"style",{},"html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":71,"searchDepth":89,"depth":89,"links":150},[151,152],{"id":29,"depth":89,"text":30},{"id":49,"depth":89,"text":50,"children":153},[154],{"id":110,"depth":155,"text":111},3,"md",{},"\u002Ffeatures\u002Fsource-edit",{"title":14,"description":25},"features\u002Fsource-edit","UDbD6jZhh1Yr7SeAsAQiNW6FB9fOlcTSgBQHgtpcYMM",1784017753430]