Skip to content

Commit

Permalink
fix template engine
Browse files Browse the repository at this point in the history
  • Loading branch information
vhnam committed Aug 11, 2018
1 parent 691c26c commit a78627f
Show file tree
Hide file tree
Showing 6 changed files with 221 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/scripts/blog.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def readConfig(title, mode):


def createContent(title, config, mode):
templateFile = "src/template/matt-falrey.html"
templateFile = "src/template/matt-falrey__blog.html"
fromFile = "src/content/%s/%s/index.html" % (mode, title)
toFile = "%s/%s/index.html" % (mode, title)

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/tutorials.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def readConfig(title, mode):


def createContent(title, config, mode):
templateFile = "src/template/matt-falrey.html"
templateFile = "src/template/matt-falrey__tutorials.html"
fromFile = "src/content/%s/%s/index.html" % (mode, title)
toFile = "%s/%s/index.html" % (mode, title)

Expand Down
File renamed without changes.
216 changes: 216 additions & 0 deletions src/template/matt-falrey__tutorials.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="noodp,index,follow">
<meta name="revisit-after" content="1 days">
<meta name="google-site-verification" content="ZFrkEu3QMFl9Kz0JyK2SfzdIZ84lDgm9gLQ6J6FmAvg">
<meta name="p:domain_verify" content="faa7b25edce176988fb8171e9457554a">

<!-- Facebook Webmasters -->
<meta property="og:url" content="https://vhnam.github.io/tutorials/{{title}}">
<meta property="og:type" content="article">
<meta property="og:title" content="{{headline}}">
<meta property="og:description" content="{{description}}">
<meta property="og:image" content="https://vhnam.github.io/tutorials/{{title}}/img/thumbnails.jpg">
<meta property="og:locale" content="vi_VN">
<meta property="fb:app_id" content="2064203853819553">

<title>{{headline}} | Nam Vo</title>

<link rel="shortcut icon" href="https://vhnam.github.io/public/favicon.ico" type="image/x-icon">
<link rel="canonical" href="http://vhnam.github.io/">
<link rel="publisher" href="https://plus.google.com/116570296349523695729">

<link rel="stylesheet" href="https://vhnam.github.io/public/css/bootstrap.css">
<link rel="stylesheet" href="https://vhnam.github.io/public/css/post.css">

<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body itemscope="itemscope" itemtype="https://schema.org/BlogPosting">
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container">
<a class="navbar-brand" href="/" itemprop="url">
<img src="https://vhnam.github.io/public/img/favicon.png" alt="Nam Vo" height="48" width="48">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<header class="navbar-collapse__header">
<button class="navbar-toggler float-right" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
&times;
</button>
<div class="clear-both"></div>
</header>
<ul class="navbar-nav ml-md-auto navbar-collapse__content" itemscope="itemscope" itemtype="https://schema.org/SiteNavigationElement">
<li class="nav-item">
<a class="nav-link" itemprop="url" href="/">Trang chủ</a>
</li>
<li class="nav-item">
<a class="nav-link" itemprop="url" href="/blog">Nhật Ký</a>
</li>
<li class="nav-item active">
<a class="nav-link" itemprop="url" href="/tutorials">Chuyện Lập Trình</a>
</li>
<li class="nav-item">
<a class="nav-link" itemprop="url" href="/about.html">Giới Thiệu</a>
</li>
<li class="nav-item">
<a class="nav-link" itemprop="url" href="/contact.html">Liên Hệ</a>
</li>
</ul>
</div>
</div>
</nav>

<section class="hero">
<div class="container">
<div class="row">
<div class="col"></div>
<div class="col-md-8">
<h1 class="hero__title" itemprop="headline">{{headline}}</h1>
<h2 class="hero__subtitle">{{time}}</h2>
<meta itemprop="author" content="Nam Vo">
<meta itemprop="datePublished" content="{{dateTime}}">
<meta itemprop="dateModified" content="{{dateTime}}">
<meta itemprop="mainEntityOfPage" content="{{description}}">
</div>
<div class="col"></div>
</div>
</div>
<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
<meta itemprop="name" content="GitHub">
<span hidden itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<img itemprop="url" src="https://vhnam.github.io/public/img/github.png" alt="GitHub">
<meta itemprop="width" content="48">
<meta itemprop="height" content="48">
</span>
</div>
</section>

<section class="content">
<div class="container">
<h2 hidden>Nội dung</h2>
<div class="row">
<div class="col"></div>
<div class="col-md-8">
<div class="content__body">
{{content}}
</div>

<div class="content__footer">
<div class="social-plugin">
<div class="like-share">
<!-- Facebook -->
<div class="fb-like" data-href="http://vhnam.github.io/blog/not-quite-my-tempo" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>

<div>
<!-- Twitter -->
<a href="https://twitter.com/share" class="twitter-share-button"{count} data-url="http://vhnam.github.io/blog/not-quite-my-tempo" data-via="vhnam2504">Tweet</a>

<!-- Google Plus -->
<div class="g-plusone" data-annotation="inline" data-width="300"></div>
</div>
</div>
<div class="comments">
<div class="fb-comments" data-href="http://vhnam.github.io/blog/not-quite-my-tempo" data-numposts="10"></div>
</div>
</div>
</div>
</div>
<div class="col"></div>
</div>
</div>
</section>

<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-6 text-left">
He who loves practice without theory is like the sailor who boards [a] ship without a rudder and compass and never knows where he may cast. — Leonardo da Vinci
</div>
<div class="col-md-6 text-right">
Copyright &copy; 2018 Nam Vo
</div>
</div>
</div>
<nav class="privacy-policy navbar navbar-dark bg-dark" itemscope="itemscope" itemtype="https://schema.org/SiteNavigationElement">
<div class="container">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" itemprop="url" href="https://vhnam.github.io/privacy-policy.html">Chính sách bảo mật</a>
</li>
</ul>
</div>
</nav>
</footer>

<script src="https://vhnam.github.io/public/js/bootstrap.js"></script>

<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

<script>
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>

<script>
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
if(!d.getElementById(id)){js=d.createElement(s);
js.id=id;js.src=p+'://platform.twitter.com/widgets.js';
fjs.parentNode.insertBefore(js,fjs);
}
}(document, 'script', 'twitter-wjs');
</script>

<!-- Facebook Analytics -->
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '2064203853819553',
xfbml : true,
version : 'v3.0'
});

FB.AppEvents.logPageView();
};

(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-66016963-1', 'auto');
ga('require', 'linkid', 'linkid.js');
ga('require', 'displayfeatures');
ga('send', 'pageview');
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<meta name="p:domain_verify" content="faa7b25edce176988fb8171e9457554a">

<!-- Facebook Webmasters -->
<meta property="og:url" content="https://vhnam.github.io/blog/distributed-system-cac-kieu-con-da-dieu">
<meta property="og:url" content="https://vhnam.github.io/tutorials/distributed-system-cac-kieu-con-da-dieu">
<meta property="og:type" content="article">
<meta property="og:title" content="Distributed System: Các kiểu con đà điểu">
<meta property="og:description" content="Bài viết này tiếp tục tóm tắt lại cách hiểu của mình về Distributed System. Phần này tập trung vào các kiểu Distributed System.">
Expand Down
4 changes: 2 additions & 2 deletions tutorials/distributed-system/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<meta name="p:domain_verify" content="faa7b25edce176988fb8171e9457554a">

<!-- Facebook Webmasters -->
<meta property="og:url" content="https://vhnam.github.io/blog/distributed-system">
<meta property="og:url" content="https://vhnam.github.io/tutorials/distributed-system">
<meta property="og:type" content="article">
<meta property="og:title" content="Distributed System">
<meta property="og:description" content="Bài viết này tóm tắt lại cách hiểu của mình về Distributed System">
<meta property="og:image" content="https://vhnam.github.io/blog/distributed-system/img/thumbnails.jpg">
<meta property="og:image" content="https://vhnam.github.io/tutorials/distributed-system/img/thumbnails.jpg">
<meta property="og:locale" content="vi_VN">
<meta property="fb:app_id" content="2064203853819553">

Expand Down

0 comments on commit a78627f

Please sign in to comment.