Ryozuki 6 months ago
parent
commit
fb7db358fb
6 changed files with 9 additions and 6 deletions
  1. 1 0
      blog/sdl2_cmake.info
  2. 1 4
      index.py
  3. 2 1
      new.py
  4. 3 0
      parse.py
  5. 1 0
      public/blog/sdl2_cmake.html
  6. 1 1
      public/index.html

+ 1 - 0
blog/sdl2_cmake.info

@@ -1,3 +1,4 @@
 Setting Up SDL2 with CMake
 Here I explain how to setup and use SDL2 using the CMake build tool.
 2019-04-27 12:57:28.889473
+tutorial,sdl2,cmake,setup

+ 1 - 4
index.py

@@ -21,15 +21,12 @@ base = """
     <meta property="og:description" content="All blog entries are listed here." />
     <meta name='medium' content='blog'>
 </head>
-
 <body>
-<h2><span class="green">[</span> Ryozuki Blog Index <span class="green">]</span></h2>
+<h2>Ryozuki Blog Index</h2>
 <ul>
 {body}
 </ul>
-
 </body>
-
 </html>
 """
 

+ 2 - 1
new.py

@@ -8,10 +8,11 @@ if __name__ == "__main__":
     name = input("Filename: ")
     title = input("Title: ")
     about = input("About: ")
+    tags = input("Tags (comma separated): ")
     date = datetime.datetime.now()
     
     with open(f"blog/{name}.info", 'w') as f:
-        f.write(title + "\n" + about + "\n" + str(date) + "\n")
+        f.write(title + "\n" + about + "\n" + str(date) + "\n" + tags + "\n")
 
     with open(f"blog/{name}.md", 'w') as f:
         f.write("# -{title}\n")

+ 3 - 0
parse.py

@@ -13,6 +13,7 @@ base = """
     <meta charset="UTF-8">
     <title>-{title} | Ryozuki Blog</title>
     <meta name="description" content="-{about}">
+    <meta name="keywords" content="-{tags}">
     <meta name="author" content="Ryozuki">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <link rel="stylesheet" href="/css/code.css">
@@ -55,9 +56,11 @@ if __name__ == "__main__":
             title = info.readline().replace("\n", "").strip()
             about = info.readline().replace("\n", "").strip()
             date = info.readline().replace("\n", "").strip()
+            tags = info.readline().replace("\n", "").strip()
             info.close()
             _base = base.replace("-{title}", title)
             _base = _base.replace("-{about}", about)
+            _base = _base.replace("-{tags}", tags)
             parsed = parsed.replace("-{title}", title)
             parsed = parsed.replace("-{date}", date)
             _base = _base.replace("-{body}", parsed)

+ 1 - 0
public/blog/sdl2_cmake.html

@@ -4,6 +4,7 @@
     <meta charset="UTF-8">
     <title>Setting Up SDL2 with CMake | Ryozuki Blog</title>
     <meta name="description" content="Here I explain how to setup and use SDL2 using the CMake build tool.">
+    <meta name="keywords" content="tutorial,sdl2,cmake,setup">
     <meta name="author" content="Ryozuki">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <link rel="stylesheet" href="/css/code.css">

+ 1 - 1
public/index.html

@@ -18,7 +18,7 @@
     <h2>Ryozuki.xyz</h2>
     <p>This is my personal website, here I save interesting things I may find, my own thoughts or any random thing.</p>
     <p>I am a self taught programmer, I currently know C, C++, python, javascript (and nodejs), C# and java.</p>
-    <p>You can read my blog <a href="/blog">here</a>.</p>
+    <p>You can read my <b>blog</b> <a href="/blog">here</a>.</p>
     <p>Some libraries I used:
         <a href="https://www.djangoproject.com/" target="_blank">Django</a>,
         <a href="http://flask.pocoo.org/" target="_blank">Flask</a>,