Skip to content

Commit ae7009d

Browse files
committed
Add support for plain text (.txt) files (Close #86)
1 parent db82d69 commit ae7009d

File tree

6 files changed

+43
-3
lines changed

6 files changed

+43
-3
lines changed

CHANGELOG

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](http://keepachangelog.com/)
77
and this project adheres to [Semantic Versioning](http://semver.org/).
88

9+
## [3.1.6] - 2017-12-27
10+
### Added
11+
- Add support for plain text (.txt) files (Close #86)
12+
13+
## [3.1.5] - 2017-06-08
14+
### Changed
15+
- Merge pull request #83 (Added missing comma to completions file)
16+
917
## [3.1.4] - 2017-06-03
1018
### Changed
1119
- Updated documentation (Close #77)

Jekyll.sublime-settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"jekyll_uploads_baseurl": "{{ site.baseurl }}",
6666

6767
// This determines the file type for new drafts and posts. Can be set to one of
68-
// three accepted values: "Markdown", "Textile" or "HTML".
68+
// three accepted values: "Markdown", "Textile", "HTML" or "Plain text".
6969
"jekyll_default_markup": "Markdown",
7070

7171
// Optionally override the file extension format for Markdown files. Valid options

docs/settings.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ User Settings
7474
^^^^^^^^^^^^^^^^^^^^^^^^^
7575

7676
:Default: ``Markdown``
77-
:Description: This string value determines the file type for new drafts and posts. It can be set to one of three accepted values: ``Markdown``, ``Textile`` or ``HTML``.
77+
:Description: This string value determines the file type for new drafts and posts. It can be set to one of three accepted values: ``Markdown``, ``Textile``, ``HTML``, or ``Plain text``.
7878

7979

8080
``jekyll_markdown_extension``

jekyll.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
ST3 = sublime.version() >= '3000'
3030
DEBUG = False
31-
ALLOWED_MARKUPS = ('Markdown', 'Textile', 'HTML', )
3231
VALID_MARKDOWN_EXT = ('markdown', 'mdown', 'mkdn', 'mkd', 'md', )
3332
VALID_HTML_EXT = ('html', 'htm', )
3433
VALID_TEXTILE_EXT = ('textile', )
3534
VALID_YAML_EXT = ('yaml', 'yml', )
35+
VALID_PLAIN_TEXT_EXT = ('txt', )
3636
POST_DATE_FORMAT = '%Y-%m-%d'
3737

3838
settings = sublime.load_settings('Jekyll.sublime-settings')
@@ -415,6 +415,9 @@ def title_input(self, title, path=None):
415415
elif self.markup == 'HTML':
416416
file_ext = '.html'
417417

418+
elif self.markup == 'Plain text':
419+
file_ext = '.txt'
420+
418421
else:
419422
file_ext = self.extension
420423

@@ -479,6 +482,9 @@ def get_markup(self, file):
479482
elif file.endswith(VALID_TEXTILE_EXT):
480483
self.markup = 'Textile'
481484

485+
elif file.endswith(VALID_PLAIN_TEXT_EXT):
486+
self.markup = 'Plain text'
487+
482488
elif file.endswith(VALID_YAML_EXT):
483489
self.markup = 'YAML'
484490

messages.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@
2121
"3.1.2": "messages/3.1.2.txt",
2222
"3.1.3": "messages/3.1.3.txt",
2323
"3.1.4": "messages/3.1.4.txt",
24+
"3.1.6": "messages/3.1.6.txt"
2425
}

messages/3.1.6.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
*******************************************************************************
2+
_ _ _ _
3+
(_) ___| | ___ _| | |
4+
| |/ _ \ |/ / | | | | |
5+
| | __/ <| |_| | | |
6+
_/ |\___|_|\_\\__, |_|_|
7+
|__/ |___/
8+
9+
http://23maverick23.github.io/sublime-jekyll/
10+
http://sublime-jekyll.rtfd.org/
11+
sublime-jekyll is licensed under the MIT license
12+
13+
*******************************************************************************
14+
15+
This update adds plain text file support for posts (thanks to @dylan-k for submitting this enhancement request).
16+
17+
Thanks for using sublime-jekyll!
18+
19+
20+
Change Log
21+
----------
22+
23+
## [3.1.6] - 2017-12-27
24+
### Added
25+
- Add support for plain text (.txt) files (Close #86)

0 commit comments

Comments
 (0)