vvysotskyi commented on a change in pull request #1942: Update README.md with information on how to configure env for building site and update .gitignore to ignore files left after checkout from developing branches URL: https://github.com/apache/drill/pull/1942#discussion_r362863906
########## File path: README.md ########## @@ -13,60 +27,60 @@ Note that you can skip the first two commands (and only run `jekyll serve`) if y ## One Time Setup for Last-Modified-Date -To automatically add the last-modified-on date, a one-time local setup is required: - -1. In your cloned directory of Drill, in drill/.git/hooks, create a file named pre-commit (no extension) that contains this script: - - #!/bin/sh - # Contents of .git/hooks/pre-commit - - git diff --cached --name-status | grep "^M" | while read a b; do - cat $b | sed "/---.*/,/---.*/s/^date:.*$/date: $(date -u "+%Y-%m-%d")/" > tmp - mv tmp $b - git add $b - done +To automatically add the `last-modified-on date`, a one-time local setup is required: +1. In your cloned directory of Drill, in `drill/.git/hooks`, create a file named `pre-commit` (no extension) that contains this script: +``` +#!/bin/sh +# Contents of .git/hooks/pre-commit + +git diff --cached --name-status | grep "^M" | while read a b; do + cat $b | sed "/---.*/,/---.*/s/^date:.*$/date: $(date -u "+%Y-%m-%d")/" > tmp + mv tmp $b + git add $b +done +``` 2. Make the file executable. - - chmod +x pre-commit - -On any page you create, in addition to the title: and parent:, you now need to add date: to the front matter of any file you create. For example: - - --- - title: "Configuring Multitenant Resources" - parent: "Configuring a Multitenant Cluster" - date: - --- - +``` +chmod +x pre-commit +``` +On any page you create, in addition to the title, and `parent:`, you now need to add `date:` to the front matter of any file you create. For example: Review comment: Thanks, removed redundant any. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services