mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-08 01:22:29 +00:00
Refactor theme (#1)
This commit is contained in:
12
themes/xmin/exampleSite/R/build.R
Normal file
12
themes/xmin/exampleSite/R/build.R
Normal file
@@ -0,0 +1,12 @@
|
||||
if (Sys.getenv('USER') != 'yihui' || Sys.which('git') == '' ||
|
||||
!grepl(
|
||||
'git@github.com:yihui/hugo-xmin.git',
|
||||
system2('git', c('remote', '-v'), stdout = TRUE)
|
||||
)) q('no')
|
||||
|
||||
file.copy('content/_index.markdown', '../README.md', overwrite = TRUE)
|
||||
if (Sys.which('sed') != '') system("sed -i '' -e '1,6d' -e '34,38d' ../README.md")
|
||||
cat(
|
||||
'[](https://xmin.yihui.name)\n',
|
||||
file = '../README.md', append = TRUE
|
||||
)
|
Reference in New Issue
Block a user