HTML 뷰 엔진의 간단한 아이디어
                                            
                                                
                                                
                                                
                                                
                                                
                                                 4174 단어  html
                    
HTML 뷰 엔진이란?
여러
.html 파일을 결합하여 단일.html 파일을 생성할 수 있는 일부 코드입니다.예를 들어 보겠습니다.
이것은
index.html 파일입니다.<html lang="en">
<head>
    <title>Hi hello</title>
    <link rel="stylesheet" href="./style.css">
</head>
<body>
    { navbar }
    { footer }
</body>
</html>
여기서
{ footer }는 HTML-Engine가 footer.html의 코드를 넣고 이 모든 코드{ something }를 바꾼 후 엔진이 모든 코드를 하나의 파일에 병합한다는 것을 의미합니다.이것은 간단합니다
navbar.html.<nav>
    <span class="logo" >
        Logo
    </span>
    <span >
        <span>Home</span>
        <span>Student</span>
        <span>Developer</span>
        <span>About</span>
    </span>
</nav>
이것은 간단합니다
footer.html.<footer >
    Made with Utsav Ladani
</footer>
내 코드를 실행한 후 다음을 얻습니다
main.html.<html lang="en">
<head>
    <title>Hi hello</title>
</head>
<body>
    <nav>
    <span class="logo" >
        Logo
    </span>
    <span >
        <span>Home</span>
        <span>Student</span>
        <span>Developer</span>
        <span>About</span>
    </span>
    </nav>
    <footer >
        Made with Utsav Ladani
    </footer>
</body>
</html>
나는 html 엔진이 어떻게 작동하는지 이해하려고 노력하고, 이 간단한 html 엔진을 만듭니다. 이 아이디어도 이해하시기 바랍니다.
내 github 프로젝트 링크는 다음과 같습니다.
웃사브-라다니 / HTML 엔진
HTML 엔진
여러 html 파일을 결합하여 단일 html 파일을 생성할 수 있는 간단한 엔진 아이디어입니다. 😄
 버전 v1.0.0
이 버전은 HTML engine 의 기본 아이디어입니다.
 사용하는 방법?
views 폴더를 작업 디렉토리로 사용하십시오. 거기에 예가 나와 있습니다.
명령줄에 node src/index.js를 입력하기만 하면 됩니다.build/main.html에서 결과를 확인합니다.
  
   View on GitHub
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(HTML 뷰 엔진의 간단한 아이디어), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://dev.to/utsavladani/simple-idea-of-html-view-engine-1cla
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
Reference
이 문제에 관하여(HTML 뷰 엔진의 간단한 아이디어), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/utsavladani/simple-idea-of-html-view-engine-1cla텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)