Comments (5)
Hey @Sukhdeepsingh - thanks!
You should be able to get the desired format using another dictionary as a key value for your image
section like this:
"default_post_extras": {
"excerpt": "", "comments": "True", "image": {
"feature": "", "credit": "", "creditlink":"", "link":""
}
}
When you create your post, it should translate to this:
from sublime-jekyll.
Thanks, that worked great. Just on this point, why the order is not maintained. For eg. look at the excerpt
tag, we added it as the top key, but it became second last in the post file. How can I maintain the order.
from sublime-jekyll.
Curious - why does your YAML front matter key order matter? Aesthetics?
Python sets (dictionaries) are unordered by definition, so there is never a guarantee that the order you insert the values are the order they come out (more here: http://stackoverflow.com/a/15479974).
The implementation I am using is a simple dictionary walk - you can have a look here if you have suggestions on improvements: https://github.com/23maverick23/sublime-jekyll/blob/master/jekyll.py#L212-L242 . I could maybe look at using OrderedDict
in conjunction, but I haven't seen a need for that.
from sublime-jekyll.
Thanks for your time Ryan, no pressing issues just the aesthetics as you said :)
from sublime-jekyll.
Np. I'll put it on the backlog and see if I can get to it on my next major release. Thanks for the feedback!
from sublime-jekyll.
Related Issues (20)
- Templates and timestamp HOT 3
- Update documentation HOT 1
- UnicodeDecodeError when creating post/draft from template with ascii characters in frontmatter
- Update completions
- Idea: Auto-complete tags?
- Date used for post promotion
- Add support for collections
- Allow for relative paths
- Q: Could we have custom frontmatter fields such as uuid? HOT 2
- Allow for txt file extension HOT 3
- Feature request: bash-like path autocompletion (for tags requiring files such as images, include, etc.) HOT 1
- Feature Request: Option to insert clickable image
- jekyll_markdown_extension setting not working in user settings HOT 2
- Horribly slow when "jekyll_auto_find_paths" is true HOT 2
- "Insert Upload Tag" paths normalization needed HOT 5
- Fix log message typo
- Gives errors in non jekyll projects
- Suggestion: fallback to project path + standard relative paths
- Example file is needed HOT 1
- Showing Command Palette creates "untitled" document HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sublime-jekyll.