Clone the repo and simply run the following command:
bundle install && bower install
This should install the Ruby and Bower dependencies you need to get up and going.
To develop and preview the documentation locally, use the following Middleman command:
This will watch for changes and compile them on the fly.
To write a new blog article, use the following shortcut via Middleman:
middleman article "My Article Title"
Open the generated Markdown file and use the frontmatter template below:
--- title: Handling Sales Tax with Stripe description: Learn how to add sales tax to charges and subscriptions in Stripe along with a Rails example for calculating sales tax using the TaxJar API. author: jake_johnson date: 2015-12-14 00:11 UTC category: Stripe tags: stripe, api published: true ---
If you're a brand new author, update
data/authors.json with your name, avatar, and Twitter account.
For new categories you'll also want to update
Update Search Index
We utilize Algolia/DocSearch for full-site search on developers.taxjar.com. If you need to manually update the search index, you'll need a
.env file in the root directory with the following rows set to the appropriate values:
APPLICATION_ID=<Application ID> API_KEY=<Admin API Key for Indexing>
Then, start up Docker and run this command from the root directory:
docker run -it --env-file=.env -e "CONFIG=$(cat $(pwd)/docsearch.json | jq -r tostring)" algolia/docsearch-scraper
After a minute or two, the crawler should complete and the search index will be updated.
To deploy to S3, you'll need to have your
.env file set up with the appropriate credentials and run the following commands:
middleman build && s3_website push