사용자 도구

사이트 도구


기술문서:오픈소스:dokuwiki

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
기술문서:오픈소스:dokuwiki [2026/02/03 12:17]
carlito76
기술문서:오픈소스:dokuwiki [2026/02/27 10:53] (현재)
carlito76
줄 7: 줄 7:
  
 <note tip> <note tip>
-본 문서는 2020-07-29a "Hogfather" ((https://download.dokuwiki.org/src/dokuwiki/dokuwiki-2020-07-29a.tgz)) 버전을 기준으로 작성되었습니다.+본 문서는 2020-07-29a "Hogfather" ((https://download.dokuwiki.org/src/dokuwiki/dokuwiki-2020-07-29a.tgz)) 버전을 기준으로 작성되었습니다.\\ 
 +- [[#사용법]]\\ 
 +- [[#플러그인]]\\ 
 +- [[#커스터마이징]]\\ 
 +- [[#관리]]
 </note> </note>
  
줄 45: 줄 49:
   * data/pages/playground   * data/pages/playground
   * data/pages/wiki   * data/pages/wiki
- 
-==== 이미지 추가 ==== 
-  * favicon.ico 
-  * favicon.svg 
-  * apple-touch-icon.png 
-  * favicon-96x96.png 
-  * logo.png 
-  * web-app-manifest-192x192.png 
-  * web-app-manifest-512x512.png 
  
 ==== 기본 템플릿 ==== ==== 기본 템플릿 ====
 === 이미지 교체 === === 이미지 교체 ===
-  * lib/tpl/dokuwiki/images/favicon.ico 
   * lib/tpl/dokuwiki/images/apple-touch-icon.png   * lib/tpl/dokuwiki/images/apple-touch-icon.png
   * lib/tpl/dokuwiki/images/logo.png   * lib/tpl/dokuwiki/images/logo.png
 +  * lib/tpl/dokuwiki/images/favicon.ico
  
 === logo 대체 텍스트 === === logo 대체 텍스트 ===
줄 100: 줄 95:
     </div>     </div>
 </div></div>--><!-- /footer --> </div></div>--><!-- /footer -->
-</sxh> 
- 
-=== 이름공간 정보 / 구조화 데이터 추가 === 
-<sxh php; gutter: true; first-line: 17; highlight: [19, 23]; title: lib/tpl/dokuwiki/main.php;> 
-<head> 
-    <meta charset="utf-8" /> 
-    <title><?php tpl_pagetitle() ?><?php echo ($ACT === 'show' && !empty($INFO['namespace'])) ? ' | ' . hsc(str_replace(':', ' > ', $INFO['namespace'])) : '' ?> [<?php echo strip_tags($conf['title']) ?>]</title> 
-    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> 
-    <?php tpl_metaheaders() ?> 
-    <meta name="viewport" content="width=device-width,initial-scale=1" /> 
-    <meta itemprop="dateModified" content="<?php echo date_iso8601($INFO['lastmod']) ?>" /> 
-    <?php echo tpl_favicon(array('favicon', 'mobile')) ?> 
-    <?php tpl_includeFile('meta.html') ?> 
-</head> 
 </sxh> </sxh>
  
 === 문서 정보 제거 === === 문서 정보 제거 ===
-<sxh php; gutter: true; first-line: 50; highlight: [64]; title: lib/tpl/dokuwiki/main.php;>+<sxh php; gutter: true; first-line: 49; highlight: [63]; title: lib/tpl/dokuwiki/main.php;>
             <div id="dokuwiki__content"><div class="pad group">             <div id="dokuwiki__content"><div class="pad group">
                 <?php html_msgarea() ?>                 <?php html_msgarea() ?>
줄 298: 줄 279:
  
 ==== favicon 설정 ==== ==== favicon 설정 ====
 +  * apple-touch-icon.png
 +  * favicon-96x96.png
 +  * favicon.ico
 +  * favicon.svg
  
-<sxh; gutter: true; highlight: [1-22]; title: site.webmanifest;> +<sxh php; gutter: true; first-line: 1789; highlight: [1793-1815]; title: inc/template.php;>
-+
- "name": "잡개발자 리토의 잡위키", +
- "short_name": "잡개발자", +
- "icons":+
-+
- "src": "/web-app-manifest-192x192.png", +
- "sizes": "192x192", +
- "type": "image/png", +
- "purpose": "maskable" +
- }, +
-+
- "src": "/web-app-manifest-512x512.png", +
- "sizes": "512x512", +
- "type": "image/png", +
- "purpose": "maskable" +
-+
- ], +
- "theme_color": "#333333", +
- "background_color": "#333333", +
- "display": "standalone", +
- "start_url": "/" +
-+
-</sxh> +
- +
-<sxh php; gutter: true; first-line: 1783; highlight: [1787-1810]; title: inc/template.php;>+
 function tpl_favicon($types = array('favicon')) { function tpl_favicon($types = array('favicon')) {
  
줄 348: 줄 308:
     }     }
     */     */
-    $return .= '<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />'.NL; +    $return .= '<link rel="icon" type="image/png" href="https://wiki.jobdeveloper.co.kr/favicon-96x96.png" sizes="96x96" />'.NL; 
-    $return .= '<link rel="icon" type="image/svg+xml" href="/favicon.svg" />'.NL; +    $return .= '<link rel="icon" type="image/svg+xml" href="https://wiki.jobdeveloper.co.kr/favicon.svg" />'.NL; 
-    $return .= '<link rel="shortcut icon" href="/favicon.ico" />'.NL; +    $return .= '<link rel="shortcut icon" href="https://wiki.jobdeveloper.co.kr/favicon.ico" />'.NL; 
-    $return .= '<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />'.NL; +    $return .= '<link rel="apple-touch-icon" sizes="180x180" href="https://wiki.jobdeveloper.co.kr/apple-touch-icon.png" />'.NL;
-    $return .= '<link rel="manifest" href="/site.webmanifest" />'.NL;+
  
     return $return;     return $return;
 } }
 +</sxh>
 +
 +==== manifest 설정 ====
 +  * web-app-manifest-192x192.png
 +  * web-app-manifest-512x512.png
 +
 +<sxh; gutter: true; highlight: [1-22]; title: site.webmanifest;>
 +{
 + "name": "잡개발자 리토의 잡위키",
 + "short_name": "잡개발자",
 + "icons": [
 + {
 + "src": "/web-app-manifest-192x192.png",
 + "sizes": "192x192",
 + "type": "image/png",
 + "purpose": "maskable"
 + },
 + {
 + "src": "/web-app-manifest-512x512.png",
 + "sizes": "512x512",
 + "type": "image/png",
 + "purpose": "maskable"
 + }
 + ],
 + "theme_color": "#333333",
 + "background_color": "#333333",
 + "display": "standalone",
 + "start_url": "/"
 +}
 +</sxh>
 +
 +<sxh php; gutter: true; first-line: 250; highlight: [251]; title: inc/template.php;>
 +    if (actionOK('manifest')) {
 +        $head['link'][] = array('rel'=> 'manifest', 'href'=> DOKU_BASE.'site.webmanifest');
 +    }
 </sxh> </sxh>
  
 ==== start 문서 index,follow 설정 ==== ==== start 문서 index,follow 설정 ====
-<sxh php; gutter: true; first-line: 301; highlight: [307-311]; title: inc/template.php;>+<sxh php; gutter: true; first-line: 305; highlight: [308]; title: inc/template.php;>
     if(($ACT == 'show' || $ACT == 'export_xhtml') && !$REV) {     if(($ACT == 'show' || $ACT == 'export_xhtml') && !$REV) {
         if($INFO['exists']) {         if($INFO['exists']) {
             //delay indexing:             //delay indexing:
-            if((time() - $INFO['lastmod']) >= $conf['indexdelay'] && !isHiddenPage($ID) ) {+            if((time() - $INFO['lastmod']) >= $conf['indexdelay'] && ($ID === $conf['start'] || !isHiddenPage($ID))) {
                 $head['meta'][] = array('name'=> 'robots', 'content'=> 'index,follow');                 $head['meta'][] = array('name'=> 'robots', 'content'=> 'index,follow');
             } else {             } else {
-                if($ID == $conf['start'] && $ACT != 'edit') { +                $head['meta'][] = array('name'=> 'robots', 'content'=> 'noindex,nofollow');
-                    $head['meta'][] = array('name'=> 'robots', 'content'=> 'index,follow'); +
-                } else { +
-                    $head['meta'][] = array('name'=> 'robots', 'content'=> 'noindex,nofollow'); +
-                }+
             }             }
             $canonicalUrl = wl($ID, '', true, '&');             $canonicalUrl = wl($ID, '', true, '&');
줄 520: 줄 510:
 </sxh> </sxh>
  
-==== Include Hooks ==== +==== SEO 개선 ==== 
-<sxh html; gutter: true; title: conf/meta.html;> +  * logo.png 
-<!-- 오픈 그래프 -->+ 
 +<sxh html; gutter: true; highlight: [1-44]; title: conf/meta.html;> 
 +<!-- Open Graph -->
 <meta property="og:type" content="website" /> <meta property="og:type" content="website" />
 <meta property="og:site_name" content="잡개발자 리토의 잡위키" /> <meta property="og:site_name" content="잡개발자 리토의 잡위키" />
 <meta property="og:url" content="https://wiki.jobdeveloper.co.kr/" /> <meta property="og:url" content="https://wiki.jobdeveloper.co.kr/" />
 <meta property="og:image" content="https://wiki.jobdeveloper.co.kr/logo.png" /> <meta property="og:image" content="https://wiki.jobdeveloper.co.kr/logo.png" />
-<!-- //오픈 그래프 -->+<!-- //Open Graph -->
  
 <!-- JSON-LD --> <!-- JSON-LD -->
줄 566: 줄 558:
 </script> </script>
 <!-- //JSON-LD --> <!-- //JSON-LD -->
 +</sxh>
  
 +<sxh; gutter: true; highlight: [1-4]; title: robots.txt;>
 +User-agent: *
 +Allow: /
 +
 +Sitemap: https://wiki.jobdeveloper.co.kr/doku.php?do=sitemap
 +</sxh>
 +
 +<sxh php; gutter: true; first-line: 229; highlight: [229-231]; title: inc/template.php;>
 +    // 수정일 메타 데이터
 +    $head['meta'][] = array('name'=> 'revised', 'content'=> date_iso8601($INFO['lastmod']));
 +    $head['meta'][] = array('property'=> 'article:modified_time', 'content'=> date_iso8601($INFO['lastmod']));
 +</sxh>
 +
 +<sxh php; gutter: true; first-line: 980; highlight: [983-987]; title: inc/template.php;>
 +        default : // SHOW and anything else not included
 +            $page_title = $name;
 +
 +            // 이름공간 정보 표기
 +            global $INFO;
 +            if (!empty($INFO['namespace'])) {
 +                $page_title .= ' | ' . str_replace(':', ' > ', $INFO['namespace']);
 +            }
 +</sxh>
 +
 +==== 카카오애드핏 ====
 +<sxh html; gutter: true; first-line: 46; highlight: [46-77]; title: conf/meta.html;>
 <!-- 카카오애드핏 --> <!-- 카카오애드핏 -->
 <style> <style>
줄 599: 줄 618:
 <script type="text/javascript" src="//t1.daumcdn.net/kas/static/ba.min.js" async></script> <script type="text/javascript" src="//t1.daumcdn.net/kas/static/ba.min.js" async></script>
 <!-- //카카오애드핏 --> <!-- //카카오애드핏 -->
- 
-<!-- Google tag (gtag.js) --> 
-<script async src="https://www.googletagmanager.com/gtag/js?id=G-CYCM0MXQLG"></script> 
-<script> 
-  window.dataLayer = window.dataLayer || []; 
-  function gtag(){dataLayer.push(arguments);} 
-  gtag('js', new Date()); 
- 
-  gtag('config', 'G-CYCM0MXQLG'); 
-</script> 
- 
-<!-- Clarity tracking code --> 
-<script type="text/javascript"> 
-    (function(c,l,a,r,i,t,y){ 
-        c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; 
-        t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; 
-        y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); 
-    })(window, document, "clarity", "script", "tfjwj8ecxc"); 
-</script> 
 </sxh> </sxh>
  
-<sxh html; gutter: true; title: conf/pageheader.html;>+<sxh html; gutter: true; highlight: [1-8]; title: conf/pageheader.html;>
 <!-- 카카오애드핏 --> <!-- 카카오애드핏 -->
 <div class="ad-adfit-mobile"> <div class="ad-adfit-mobile">
줄 631: 줄 631:
 </sxh> </sxh>
  
-<sxh html; gutter: true; title: conf/pagefooter.html;>+<sxh html; gutter: true; highlight: [1-14]; title: conf/pagefooter.html;>
 <!-- 카카오애드핏 --> <!-- 카카오애드핏 -->
-<div class="ad-adfit-pc">+<div class="ad-adfit-pc" style="margin-top:6px;">
  <ins class="kakao_ad_area" style="display:none;"  <ins class="kakao_ad_area" style="display:none;"
  data-ad-unit = "DAN-n9YTFT0FiNdcCyWi"  data-ad-unit = "DAN-n9YTFT0FiNdcCyWi"
줄 639: 줄 639:
  data-ad-height = "90"></ins>  data-ad-height = "90"></ins>
 </div> </div>
-<div class="ad-adfit-mobile">+<div class="ad-adfit-mobile" style="margin-top:8px;">
  <ins class="kakao_ad_area" style="display:none;"  <ins class="kakao_ad_area" style="display:none;"
  data-ad-unit = "DAN-zlwD249GnskVdX8E"  data-ad-unit = "DAN-zlwD249GnskVdX8E"
줄 648: 줄 648:
 </sxh> </sxh>
  
-==== robots.txt ==== +<sxh html; gutter: true; highlight: [1-8]; title: conf/sidebarfooter.html;> 
-<sxh; gutter: true; title: robots.txt;> +<!-- 카카오애드핏 --> 
-User-agent* +<div class="ad-adfit-pc" style="margin-top:5px;margin-left:5px;"> 
-Allow: /+ <ins class="kakao_ad_area" style="display:none;" 
 + data-ad-unit = "DAN-GhlkefQp1GdcfmSS" 
 + data-ad-width = "160" 
 + data-ad-height = "600"></ins> 
 +</div> 
 +<!-- //카카오애드핏 --> 
 +</sxh>
  
-Sitemap: https://wiki.jobdeveloper.co.kr/doku.php?do=sitemap+==== 추적 코드 ==== 
 +<sxh html; guttertrue; first-line: 79; highlight: [79-96]; title: conf/meta.html;> 
 +<!-- Google tag (gtag.js) --> 
 +<script async src="https://www.googletagmanager.com/gtag/js?id=G-CYCM0MXQLG"></script> 
 +<script> 
 +  window.dataLayer = window.dataLayer || []; 
 +  function gtag(){dataLayer.push(arguments);
 +  gtag('js', new Date()); 
 + 
 +  gtag('config', 'G-CYCM0MXQLG'); 
 +</script> 
 + 
 +<!-- Clarity tracking code --> 
 +<script type="text/javascript"> 
 +    (function(c,l,a,r,i,t,y){ 
 +        c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; 
 +        t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; 
 +        y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); 
 +    })(window, document, "clarity", "script", "tfjwj8ecxc"); 
 +</script>
 </sxh> </sxh>
  
줄 705: 줄 730:
  
 === Tag Plugin === === Tag Plugin ===
-<sxh css; gutter: true; first-line: 7; highlight: [8]; title: lib/plugins/tag/style.css;>+<sxh css; gutter: true; first-line: 7; highlight: [8, 10, 14-16, 19-26]; title: lib/plugins/tag/style.css;>
 .dokuwiki div.tags { .dokuwiki div.tags {
   /*border-top: 2px dotted __border__;*/   /*border-top: 2px dotted __border__;*/
   clear: both;   clear: both;
-  margin-bottom: 1.4em;+  /*margin-bottom: 1.4em;*/
 } }
 +
 +.dokuwiki div.tagstop {
 +  /*border-bottom: 2px dotted __border__;
 +  margin-top: -1.3em;
 +  margin-bottom: .4em;*/
 +}
 +
 +.dokuwiki div.tags span a,
 +.dokuwiki div.tagstop span a {
 + color: #2962ff;
 + background-color: #e3f2fd;
 + padding: 4px 4px;
 + border-radius: 4px;
 + margin-left: 1px;
 +}
 +</sxh>
 +
 +<sxh php; gutter: true; first-line: 162; highlight: [171]; title: lib/plugins/tag/helper.php;>
 +    public function tagLinks($tags) {
 +        if (empty($tags) || ($tags[0] == '')) {
 +            return '';
 +        }
 +
 +        $links = array();
 +        foreach ($tags as $tag) {
 +            $links[] = $this->tagLink($tag);
 +        }
 +        return implode(''.DOKU_LF.DOKU_TAB, $links);
 +    }
 </sxh> </sxh>
  
줄 817: 줄 871:
 </sxh> </sxh>
 ((Indexmenu Plugin: If you use the 'js'-option of the indexmenu plugin, you have to disable the 'defer_js'-setting. This setting is temporary, in the future the indexmenu plugin will be improved.)) ((Indexmenu Plugin: If you use the 'js'-option of the indexmenu plugin, you have to disable the 'defer_js'-setting. This setting is temporary, in the future the indexmenu plugin will be improved.))
 +
 +{{tag>"도쿠위키" "DokuWiki"}}