-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from joshbeard/doc-get-slug
- Loading branch information
Showing
6 changed files
with
189 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Import a ReadMe doc using its slug. | ||
terraform import readme_doc.example example-slug |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,35 @@ | ||
# Manage docs on ReadMe. | ||
|
||
# Create a category | ||
resource "readme_category" "example" { | ||
title = "Example Category" | ||
type = "guide" | ||
} | ||
|
||
# Create a doc in the category | ||
resource "readme_doc" "example" { | ||
# title can be specified as an attribute or in the body front matter. | ||
title = "My Example Doc" | ||
# title can be specified as an attribute or in the body front matter. | ||
title = "My Example Doc" | ||
|
||
# category can be specified as an attribute or in the body front matter. | ||
# Use the `readme_category` resource to manage categories. | ||
category = "633c5a54187d2c008e2e074c" | ||
# category can be specified as an attribute or in the body front matter. | ||
# Use the `readme_category` resource to manage categories. | ||
category = readme_category.example.id | ||
|
||
# category_slug can be specified as an attribute or in the body front matter. | ||
# category_slug = "foo-bar" | ||
# category_slug can be specified as an attribute or in the body front matter. | ||
# category_slug = "foo-bar" | ||
|
||
# hidden can be specified as an attribute or in the body front matter. | ||
hidden = false | ||
# hidden can be specified as an attribute or in the body front matter. | ||
hidden = false | ||
|
||
# order can be specified as an attribute or in the body front matter. | ||
order = 99 | ||
# order can be specified as an attribute or in the body front matter. | ||
order = 99 | ||
|
||
# type can be specified as an attribute or in the body front matter. | ||
type = "basic" | ||
# type can be specified as an attribute or in the body front matter. | ||
type = "basic" | ||
|
||
# body can be read from a file using Terraform's `file()` or `templatefile()` functions. | ||
body = file("mydoc.md") | ||
} | ||
# body can be read from a file using Terraform's `file()` function. | ||
# For best results, wrap the string with the `chomp()` function to remove | ||
# trailing newlines. ReadMe's API trims these implicitly. | ||
#body = chomp(file("mydoc.md")) | ||
body = "Hello! Welcome to my document!" | ||
} |
This file contains 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
This file contains 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