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)
git
and your boj repository with following rules :
├── assets
│ ├── origin.md
│ └── sol
│ └──{problem_number}.md
└── {extension}
└── {problem_number}.{extension}
assets/origin.md
should contain the base of your documentation's homepage.assets/sol/{probem_number}.md
should 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 ./makefile
and modify the syntex{your_path}
to your BOJ directory path.make ucompile
to compile the macro.make run
to run the macro.
make compile
to compile the macro.mv ./bojSolGen {your_path}
to move the macro to your BOJ direcrory path.cd {your_path}
and./bojSolGen
to run the macro.
make jcompile
to compile the macro../bojSolGen
to 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.