Add move script and update config
parent
373035e71d
commit
a1f0c34fbc
16
config.toml
16
config.toml
|
@ -32,7 +32,7 @@ paginate = 5
|
|||
|
||||
# set post to show the last updated
|
||||
# If you use git, you can set `enableGitInfo` to `true` and then post will automatically get the last updated
|
||||
showLastUpdated = false
|
||||
showLastUpdated = true
|
||||
|
||||
# set a custom favicon (default is a `themeColor` square)
|
||||
# favicon = "favicon.ico"
|
||||
|
@ -48,7 +48,7 @@ paginate = 5
|
|||
|
||||
# whether to show a table of contents
|
||||
# can be overridden in a page's front-matter
|
||||
# Toc = false # default
|
||||
Toc = true # default
|
||||
|
||||
# set title for the table of contents
|
||||
# can be overridden in a page's front-matter
|
||||
|
@ -59,14 +59,14 @@ paginate = 5
|
|||
# set Twitter handles for Twitter cards
|
||||
# see https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started#card-and-content-attribution
|
||||
# do not include @
|
||||
creator = ""
|
||||
creator = "Gasper212"
|
||||
site = ""
|
||||
|
||||
[languages]
|
||||
[languages.en]
|
||||
languageName = "English"
|
||||
title = "Terminal"
|
||||
subtitle = "A simple, retro theme for Hugo"
|
||||
title = "Welcome!"
|
||||
subtitle = "Hello"
|
||||
owner = ""
|
||||
keywords = ""
|
||||
copyright = ""
|
||||
|
@ -81,3 +81,9 @@ paginate = 5
|
|||
[languages.en.params.logo]
|
||||
logoText = "blog.spanskiduh.xyz"
|
||||
logoHomeLink = "/"
|
||||
|
||||
[languages.en.menu]
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "about"
|
||||
name = "About"
|
||||
url = "/about"
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
+++
|
||||
title = "About"
|
||||
date = "2022-12-24"
|
||||
author = "spanskiduh"
|
||||
+++
|
||||
|
||||
# Hi :)
|
||||
|
||||
I am a compsci student at university of Ljubljana.
|
||||
|
||||
This is a simple blog, with all the linux tools I have used throught my life
|
||||
journey. It varies from CTF tools to basic linux sysadmin explanations and usage
|
||||
of terminal commands.
|
||||
|
||||
p.s. search feature is still in the making ;)
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="Clipboard"
|
||||
description="click to read Clipboard"
|
||||
description="click to read about Clipboard"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-12-21"
|
||||
author="spanskiduh"
|
||||
title="Compression"
|
||||
description="click to read Compression"
|
||||
description="click to read about Compression"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="Curl"
|
||||
description="click to read Curl"
|
||||
description="click to read about Curl"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="Dig"
|
||||
description="click to read Dig"
|
||||
description="click to read about Dig"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="Find"
|
||||
description="click to read Find"
|
||||
description="click to read about Find"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-12-21"
|
||||
author="spanskiduh"
|
||||
title="GIT"
|
||||
description="click to read GIT"
|
||||
description="click to read about GIT"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="Locate"
|
||||
description="click to read Locate"
|
||||
description="click to read about Locate"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-12-01"
|
||||
author="spanskiduh"
|
||||
title="MPI"
|
||||
description="click to read MPI"
|
||||
description="click to read about MPI"
|
||||
+++
|
||||
# MPI
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-12-21"
|
||||
author="spanskiduh"
|
||||
title="Networking"
|
||||
description="click to read Networking"
|
||||
description="click to read about Networking"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="SSH"
|
||||
description="click to read SSH"
|
||||
description="click to read about SSH"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="Tracks"
|
||||
description="click to read Tracks"
|
||||
description="click to read about Tracks"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="VFS"
|
||||
description="click to read VFS"
|
||||
description="click to read about VFS"
|
||||
+++
|
||||
# VFS
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="VIM"
|
||||
description="click to read VIM"
|
||||
description="click to read about VIM"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="adress_space"
|
||||
description="click to read adress_space"
|
||||
description="click to read about adress_space"
|
||||
+++
|
||||
# Adress space
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="ansible"
|
||||
description="click to read ansible"
|
||||
description="click to read about ansible"
|
||||
+++
|
||||
# Ansible
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="bash"
|
||||
description="click to read bash"
|
||||
description="click to read about bash"
|
||||
+++
|
||||
# Bash
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="binary-patching"
|
||||
description="click to read binary-patching"
|
||||
description="click to read about binary-patching"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="binary_vs_text_files"
|
||||
description="click to read binary_vs_text_files"
|
||||
description="click to read about binary_vs_text_files"
|
||||
+++
|
||||
# Binary vs text files
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="burpsuite"
|
||||
description="click to read burpsuite"
|
||||
description="click to read about burpsuite"
|
||||
+++
|
||||
# BURPSUITE
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="certs"
|
||||
description="click to read certs"
|
||||
description="click to read about certs"
|
||||
+++
|
||||
# CERTS
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="disk-usage"
|
||||
description="click to read disk-usage"
|
||||
description="click to read about disk-usage"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="disk-utils"
|
||||
description="click to read disk-utils"
|
||||
description="click to read about disk-utils"
|
||||
+++
|
||||
# Disk utils
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="docker"
|
||||
description="click to read docker"
|
||||
description="click to read about docker"
|
||||
+++
|
||||
# Docker
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="document-conversion"
|
||||
description="click to read document-conversion"
|
||||
description="click to read about document-conversion"
|
||||
+++
|
||||
|
||||
### Pandoc
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-12-21"
|
||||
author="spanskiduh"
|
||||
title="emacs"
|
||||
description="click to read emacs"
|
||||
description="click to read about emacs"
|
||||
+++
|
||||
# Emacs
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="exec"
|
||||
description="click to read exec"
|
||||
description="click to read about exec"
|
||||
+++
|
||||
# EXEC
|
||||
It is a family of functions that do the same thing but actually no.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="ffmpeg"
|
||||
description="click to read ffmpeg"
|
||||
description="click to read about ffmpeg"
|
||||
+++
|
||||
# FFMPEG
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="forensics"
|
||||
description="click to read forensics"
|
||||
description="click to read about forensics"
|
||||
+++
|
||||
# FORENSICS
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="fork"
|
||||
description="click to read fork"
|
||||
description="click to read about fork"
|
||||
+++
|
||||
# Fork
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="gcc"
|
||||
description="click to read gcc"
|
||||
description="click to read about gcc"
|
||||
+++
|
||||
# GCC
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="gdb"
|
||||
description="click to read gdb"
|
||||
description="click to read about gdb"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="hydra"
|
||||
description="click to read hydra"
|
||||
description="click to read about hydra"
|
||||
+++
|
||||
# HYDRA - brute forcing tool
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="lxc"
|
||||
description="click to read lxc"
|
||||
description="click to read about lxc"
|
||||
+++
|
||||
# LXC
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="mosquitto"
|
||||
description="click to read mosquitto"
|
||||
description="click to read about mosquitto"
|
||||
+++
|
||||
# Mosquitto
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="mount"
|
||||
description="click to read mount"
|
||||
description="click to read about mount"
|
||||
+++
|
||||
# Mount
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="named_pipes"
|
||||
description="click to read named_pipes"
|
||||
description="click to read about named_pipes"
|
||||
+++
|
||||
# Named pipes
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="nmap"
|
||||
description="click to read nmap"
|
||||
description="click to read about nmap"
|
||||
+++
|
||||
# NMAP
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="pdf"
|
||||
description="click to read pdf"
|
||||
description="click to read about pdf"
|
||||
+++
|
||||
# PDF MANIPULATION
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="permissions"
|
||||
description="click to read permissions"
|
||||
description="click to read about permissions"
|
||||
+++
|
||||
# PERMS
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="pipewire"
|
||||
description="click to read pipewire"
|
||||
description="click to read about pipewire"
|
||||
+++
|
||||
# PIPEWIRE
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="powerusage"
|
||||
description="click to read powerusage"
|
||||
description="click to read about powerusage"
|
||||
+++
|
||||
# Check deatiled power usage on linux (common distros have it preinstalled)
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="proces_sorting_algorithms"
|
||||
description="click to read proces_sorting_algorithms"
|
||||
description="click to read about proces_sorting_algorithms"
|
||||
+++
|
||||
# Sorting algorithms
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="proxmox"
|
||||
description="click to read proxmox"
|
||||
description="click to read about proxmox"
|
||||
+++
|
||||
# PROXMOX
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="pwn"
|
||||
description="click to read pwn"
|
||||
description="click to read about pwn"
|
||||
+++
|
||||
# PWN
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="python_specifics"
|
||||
description="click to read python_specifics"
|
||||
description="click to read about python_specifics"
|
||||
+++
|
||||
# PYTHON SPECIFICS
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="qemu"
|
||||
description="click to read qemu"
|
||||
description="click to read about qemu"
|
||||
+++
|
||||
# Qemu
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="regex"
|
||||
description="click to read regex"
|
||||
description="click to read about regex"
|
||||
+++
|
||||
# REGEX
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="rstudio"
|
||||
description="click to read rstudio"
|
||||
description="click to read about rstudio"
|
||||
+++
|
||||
# Rstudio
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="rust"
|
||||
description="click to read rust"
|
||||
description="click to read about rust"
|
||||
+++
|
||||
# RUST
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="services-and-process-management"
|
||||
description="click to read services-and-process-management"
|
||||
description="click to read about services-and-process-management"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="shell"
|
||||
description="click to read shell"
|
||||
description="click to read about shell"
|
||||
+++
|
||||
# SHELL SHORTCUTS
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="squid"
|
||||
description="click to read squid"
|
||||
description="click to read about squid"
|
||||
+++
|
||||
# SQUID tool
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="symlinks"
|
||||
description="click to read symlinks"
|
||||
description="click to read about symlinks"
|
||||
+++
|
||||
# Difference between hardlinks and symlinks
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="system-information"
|
||||
description="click to read system-information"
|
||||
description="click to read about system-information"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-12-21"
|
||||
author="spanskiduh"
|
||||
title="tmux"
|
||||
description="click to read tmux"
|
||||
description="click to read about tmux"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="uart"
|
||||
description="click to read uart"
|
||||
description="click to read about uart"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="ufw"
|
||||
description="click to read ufw"
|
||||
description="click to read about ufw"
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="vim_tutor"
|
||||
description="click to read vim_tutor"
|
||||
description="click to read about vim_tutor"
|
||||
+++
|
||||
# Vim Tutor
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="virt-manager"
|
||||
description="click to read virt-manager"
|
||||
description="click to read about virt-manager"
|
||||
+++
|
||||
# VIRT MANAGER
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="wasm"
|
||||
description="click to read wasm"
|
||||
description="click to read about wasm"
|
||||
+++
|
||||
# Wasm
|
||||
h39df71edfbdc6cfb
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="wl-mirror"
|
||||
description="click to read wl-mirror"
|
||||
description="click to read about wl-mirror"
|
||||
+++
|
||||
# WL-mirror
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
+++
|
||||
date="2022-12-24"
|
||||
date="2022-11-30"
|
||||
author="spanskiduh"
|
||||
title="yaml"
|
||||
description="click to read yaml"
|
||||
description="click to read about yaml"
|
||||
+++
|
||||
# YAML
|
||||
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
import os
|
||||
import time
|
||||
|
||||
header = {
|
||||
"author": "spanskiduh",
|
||||
}
|
||||
|
||||
MD_NOTES_DIR = "../../md-notes/"
|
||||
POSTS_DIR = "../content/posts/"
|
||||
|
||||
def main():
|
||||
# List all files in md-notes directory
|
||||
for filename in os.listdir(MD_NOTES_DIR):
|
||||
# Check if file is md file
|
||||
if filename.endswith(".md"):
|
||||
# Opent the file and read it
|
||||
with open(MD_NOTES_DIR + filename, "r") as f:
|
||||
# Read the file
|
||||
file = f.read()
|
||||
# Find --- in the file and remove it and content inside ---
|
||||
splited_file = file.split("---")
|
||||
if(len(splited_file) > 2):
|
||||
splited_file = splited_file[2:]
|
||||
# Join the list back to a string
|
||||
file = "".join(splited_file)
|
||||
|
||||
|
||||
header["title"] = filename[:-3]
|
||||
header["description"] = f"click to read about {filename[:-3]}"
|
||||
date_modified = os.path.getmtime(MD_NOTES_DIR + filename)
|
||||
header["date"] = time.strftime("%Y-%m-%d", time.localtime(date_modified))
|
||||
|
||||
# Add the header to the file for hugo to parse
|
||||
file = f"""\r
|
||||
+++
|
||||
date="{header["date"]}"
|
||||
author="{header["author"]}"
|
||||
title="{header["title"]}"
|
||||
description="{header["description"]}"
|
||||
+++
|
||||
{file}"""
|
||||
# Write the file to proc directory
|
||||
with open(POSTS_DIR + filename, "w") as f:
|
||||
f.write(file)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Reference in New Issue