Feature/automate tags#182
Open
jmarca wants to merge 6 commits intonielsenramon:masterfrom
jmarca:feature/automate_tags
Open
Feature/automate tags#182jmarca wants to merge 6 commits intonielsenramon:masterfrom jmarca:feature/automate_tags
jmarca wants to merge 6 commits intonielsenramon:masterfrom
jmarca:feature/automate_tags
Conversation
added a new bash script to inspect posts and generate appropriate entries in _my_tags/<tag>.md should respect the settings for "_my_tags" in config.yml, but it doesn't at this time...just hard coded to _my_tags tag_scraper will not modify existing files...what if the user decides to change the "slug"...I don't want to clobber that. tag_scraper will not delete files that are no longer needed...deletion needs to be a manual thing. integrated tag_scraper into the package.json so that it runs on `npm run local` and `npm run publish`
Looking at the Jekyll Ruby, would be nice to just use the Ruby libs, but instead, keeping only files that start with "YYYY-MM-DD-" pattern, and that *do not* end with ~.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch set automates populating the _my_tags/.md files.
The work is done by a shell script. Basically, it looks at the _posts/YYYY-MM-DD-..., greps for tags, then makes a unique list of them, and creates new entries as needed in the directory _my_tags/
I also added it to the npm run scripts. On my end, I also have a javascript "watch" program that watches for changes to _posts and re-runs the script, but that seems overkill for this theme...typical usage will be write a new post, then build the site, which will automatically run my shell script before running the
bundle exec jekyll serve --draftsandbin/deployscripts.Also, I hacked up a test using another shell script, in tests/test_automatic_tags.sh. Which I'm glad I did as I had forgotten to filter for YYYY-MM-DD-post type files in _posts.
I also added the test to the .travis.yml file. The build results pass on travis: https://travis-ci.org/jmarca/chalk/builds/434295568
I have not modified the readme or the default post to change language about adding entries to the _my_tags directory.
Hope this is useful.