fix: allow user not to write .md or .markdown when creating file based on archetype #288
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -8,3 +8,5 @@ yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.idea
|
||||
.vscode
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
@@ -48,6 +48,10 @@ export default {
|
||||
new (url, type) {
|
||||
url = removePrefix(url)
|
||||
|
||||
if (!url.endsWith('.md') && !url.endsWith('.markdown')) {
|
||||
url += '.markdown'
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
let request = new window.XMLHttpRequest()
|
||||
request.open('POST', `${this.$store.state.baseURL}/api/resource${url}`, true)
|
||||
|
||||
9410
package-lock.json
generated
9410
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
790
rice-box.go
790
rice-box.go
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user