a simple macro for my repository dilluti0n/baekjun which uses jekyll to run its documentation site. This macro automatically merges the assets/sol/xxxx.md file of the repository with the xxxx.(extension) file in the folder named after each source code's extension (e.g. py/, c/) and uploads it to the site.
- Your OS must be based on Unix. (e.g. Linux, macOS)
gitand your boj repository with following rules :
├── assets
│ ├── origin.md
│ └── sol
│ └──{problem_number}.md
└── {extension}
└── {problem_number}.{extension}assets/origin.mdshould contain the base of your documentation's homepage.assets/sol/{probem_number}.mdshould contain a description of the algorithm of the{problem_number}.{extension}/{problem_number}.{extension}should contain a source code of the algorithm whih a language{extension}. (e.g.c/1000.c,py/1000.py)
There are three ways to compile and use this macro.
vim ./makefileand modify the syntex{your_path}to your BOJ directory path.make ucompileto compile the macro.make runto run the macro.
make compileto compile the macro.mv ./bojSolGen {your_path}to move the macro to your BOJ direcrory path.cd {your_path}and./bojSolGento run the macro.
make jcompileto compile the macro../bojSolGento run the macro. (In this way, you need to type{your_path}while running the macro.)
Note that only the first method commits the changes made by the macro to the BOJ repository and pushes them to github automatically.