From 60a626e3ecd38c51149e2a31b8e34b0edb6f18e5 Mon Sep 17 00:00:00 2001 From: Chris Klanac Date: Fri, 26 Feb 2016 19:10:26 -0500 Subject: [PATCH] Enables backtick and monokai syntax highlighting --- _config.yml | 26 ++-- _posts/2016-02-26-welcome-to-jekyll.markdown | 26 +++- _sass/_base.scss | 4 +- _sass/_syntax-highlighting.scss | 133 ++++++++++--------- about.md | 12 +- 5 files changed, 116 insertions(+), 85 deletions(-) diff --git a/_config.yml b/_config.yml index 047cb5f..464f1e5 100644 --- a/_config.yml +++ b/_config.yml @@ -6,20 +6,26 @@ # 'jekyll serve'. If you change this file, please restart the server process. # Site settings -title: Your awesome title -email: your-email@domain.com -description: > # this means to ignore newlines until "baseurl:" - Write an awesome description for your new site here. You can edit this - line in _config.yml. It will appear in your document head meta (for - Google search results) and in your feed.xml site description. +title: Rough Draft +subtitle: Just another dev blog. +# email: your-email@domain.com +description: > # this means to ignore newlines, content must be indented + Chris Klanac's development blog and notes. +# It appears in your document head meta (for Google search results) and in your feed.xml + baseurl: "" # the subpath of your site, e.g. /blog -url: "http://yourdomain.com" # the base hostname & protocol for your site -twitter_username: jekyllrb -github_username: jekyll +permalink: none +url: "http://cklanac.github.io/" # the base hostname & protocol for your site + +twitter_username: cklanac +github_username: cklanac # Build settings markdown: kramdown +kramdown: + input: GFM # http://kramdown.gettalong.org/parser/gfm.html + # Fixes "invalid date... in the YAML front matter." in Travis build # https://github.com/jekyll/jekyll/issues/3330 -exclude: [vendor] \ No newline at end of file +exclude: [vendor] diff --git a/_posts/2016-02-26-welcome-to-jekyll.markdown b/_posts/2016-02-26-welcome-to-jekyll.markdown index 70b5e89..4195810 100644 --- a/_posts/2016-02-26-welcome-to-jekyll.markdown +++ b/_posts/2016-02-26-welcome-to-jekyll.markdown @@ -3,20 +3,32 @@ layout: post title: "Welcome to Jekyll!" date: 2016-02-26 17:55:47 -0500 categories: jekyll update + --- + You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. Jekyll also offers powerful support for code snippets: -{% highlight ruby %} -def print_hi(name) - puts "Hi, #{name}" -end -print_hi('Tom') -#=> prints 'Hi, Tom' to STDOUT. -{% endhighlight %} +``` js +/** + * Does a thing + */ +function helloWorld(param1, param2) { + var something = 0; + + // Do something + if (2.0 % 2 == something) { + console.log('Hello, world!'); + } else { + return null; + } + + // @TODO comment +} +``` Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk]. diff --git a/_sass/_base.scss b/_sass/_base.scss index 0883c3c..7aabb16 100644 --- a/_sass/_base.scss +++ b/_sass/_base.scss @@ -132,7 +132,8 @@ code { font-size: 15px; border: 1px solid $grey-color-light; border-radius: 3px; - background-color: #eef; + background-color: #eee; + } code { @@ -147,6 +148,7 @@ pre { border: 0; padding-right: 0; padding-left: 0; + background-color:transparent; } } diff --git a/_sass/_syntax-highlighting.scss b/_sass/_syntax-highlighting.scss index 8fac597..0516ebc 100644 --- a/_sass/_syntax-highlighting.scss +++ b/_sass/_syntax-highlighting.scss @@ -1,71 +1,84 @@ /** * Syntax highlighting styles + * Monokai styles from: + * http://jwarby.github.io/jekyll-pygments-themes/languages/javascript.html */ .highlight { background: #fff; @extend %vertical-rhythm; .highlighter-rouge & { - background: #eef; + background: #272822; + code { + color:#e6db74; + } } - .c { color: #998; font-style: italic } // Comment - .err { color: #a61717; background-color: #e3d2d2 } // Error - .k { font-weight: bold } // Keyword - .o { font-weight: bold } // Operator - .cm { color: #998; font-style: italic } // Comment.Multiline - .cp { color: #999; font-weight: bold } // Comment.Preproc - .c1 { color: #998; font-style: italic } // Comment.Single - .cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special - .gd { color: #000; background-color: #fdd } // Generic.Deleted - .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific - .ge { font-style: italic } // Generic.Emph - .gr { color: #a00 } // Generic.Error - .gh { color: #999 } // Generic.Heading - .gi { color: #000; background-color: #dfd } // Generic.Inserted - .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific - .go { color: #888 } // Generic.Output - .gp { color: #555 } // Generic.Prompt - .gs { font-weight: bold } // Generic.Strong - .gu { color: #aaa } // Generic.Subheading - .gt { color: #a00 } // Generic.Traceback - .kc { font-weight: bold } // Keyword.Constant - .kd { font-weight: bold } // Keyword.Declaration - .kp { font-weight: bold } // Keyword.Pseudo - .kr { font-weight: bold } // Keyword.Reserved - .kt { color: #458; font-weight: bold } // Keyword.Type - .m { color: #099 } // Literal.Number - .s { color: #d14 } // Literal.String - .na { color: #008080 } // Name.Attribute - .nb { color: #0086B3 } // Name.Builtin - .nc { color: #458; font-weight: bold } // Name.Class - .no { color: #008080 } // Name.Constant - .ni { color: #800080 } // Name.Entity - .ne { color: #900; font-weight: bold } // Name.Exception - .nf { color: #900; font-weight: bold } // Name.Function - .nn { color: #555 } // Name.Namespace - .nt { color: #000080 } // Name.Tag - .nv { color: #008080 } // Name.Variable - .ow { font-weight: bold } // Operator.Word - .w { color: #bbb } // Text.Whitespace - .mf { color: #099 } // Literal.Number.Float - .mh { color: #099 } // Literal.Number.Hex - .mi { color: #099 } // Literal.Number.Integer - .mo { color: #099 } // Literal.Number.Oct - .sb { color: #d14 } // Literal.String.Backtick - .sc { color: #d14 } // Literal.String.Char - .sd { color: #d14 } // Literal.String.Doc - .s2 { color: #d14 } // Literal.String.Double - .se { color: #d14 } // Literal.String.Escape - .sh { color: #d14 } // Literal.String.Heredoc - .si { color: #d14 } // Literal.String.Interpol - .sx { color: #d14 } // Literal.String.Other - .sr { color: #009926 } // Literal.String.Regex - .s1 { color: #d14 } // Literal.String.Single - .ss { color: #990073 } // Literal.String.Symbol - .bp { color: #999 } // Name.Builtin.Pseudo - .vc { color: #008080 } // Name.Variable.Class - .vg { color: #008080 } // Name.Variable.Global - .vi { color: #008080 } // Name.Variable.Instance - .il { color: #099 } // Literal.Number.Integer.Long + pre { + background-color: #272822; + } + .hll { background-color: #272822; } + .c { color: #75715e } /* Comment */ + .err { color: #960050; background-color: #1e0010 } /* Error */ + .k { color: #66d9ef } /* Keyword */ + .l { color: #ae81ff } /* Literal */ + .n { color: #f8f8f2 } /* Name */ + .o { color: #f92672 } /* Operator */ + .p { color: #f8f8f2 } /* Punctuation */ + .cm { color: #75715e } /* Comment.Multiline */ + .cp { color: #75715e } /* Comment.Preproc */ + .c1 { color: #75715e } /* Comment.Single */ + .cs { color: #75715e } /* Comment.Special */ + .ge { font-style: italic } /* Generic.Emph */ + .gs { font-weight: bold } /* Generic.Strong */ + .kc { color: #66d9ef } /* Keyword.Constant */ + .kd { color: #66d9ef } /* Keyword.Declaration */ + .kn { color: #f92672 } /* Keyword.Namespace */ + .kp { color: #66d9ef } /* Keyword.Pseudo */ + .kr { color: #66d9ef } /* Keyword.Reserved */ + .kt { color: #66d9ef } /* Keyword.Type */ + .ld { color: #e6db74 } /* Literal.Date */ + .m { color: #ae81ff } /* Literal.Number */ + .s { color: #e6db74 } /* Literal.String */ + .na { color: #a6e22e } /* Name.Attribute */ + .nb { color: #f8f8f2 } /* Name.Builtin */ + .nc { color: #a6e22e } /* Name.Class */ + .no { color: #66d9ef } /* Name.Constant */ + .nd { color: #a6e22e } /* Name.Decorator */ + .ni { color: #f8f8f2 } /* Name.Entity */ + .ne { color: #a6e22e } /* Name.Exception */ + .nf { color: #a6e22e } /* Name.Function */ + .nl { color: #f8f8f2 } /* Name.Label */ + .nn { color: #f8f8f2 } /* Name.Namespace */ + .nx { color: #a6e22e } /* Name.Other */ + .py { color: #f8f8f2 } /* Name.Property */ + .nt { color: #f92672 } /* Name.Tag */ + .nv { color: #f8f8f2 } /* Name.Variable */ + .ow { color: #f92672 } /* Operator.Word */ + .w { color: #f8f8f2 } /* Text.Whitespace */ + .mf { color: #ae81ff } /* Literal.Number.Float */ + .mh { color: #ae81ff } /* Literal.Number.Hex */ + .mi { color: #ae81ff } /* Literal.Number.Integer */ + .mo { color: #ae81ff } /* Literal.Number.Oct */ + .sb { color: #e6db74 } /* Literal.String.Backtick */ + .sc { color: #e6db74 } /* Literal.String.Char */ + .sd { color: #e6db74 } /* Literal.String.Doc */ + .s2 { color: #e6db74 } /* Literal.String.Double */ + .se { color: #ae81ff } /* Literal.String.Escape */ + .sh { color: #e6db74 } /* Literal.String.Heredoc */ + .si { color: #e6db74 } /* Literal.String.Interpol */ + .sx { color: #e6db74 } /* Literal.String.Other */ + .sr { color: #e6db74 } /* Literal.String.Regex */ + .s1 { color: #e6db74 } /* Literal.String.Single */ + .ss { color: #e6db74 } /* Literal.String.Symbol */ + .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ + .vc { color: #f8f8f2 } /* Name.Variable.Class */ + .vg { color: #f8f8f2 } /* Name.Variable.Global */ + .vi { color: #f8f8f2 } /* Name.Variable.Instance */ + .il { color: #ae81ff } /* Literal.Number.Integer.Long */ + + .gh { } /* Generic Heading & Diff Header */ + .gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */ + .gd { color: #f92672; } /* Generic.Deleted & Diff Deleted */ + .gi { color: #a6e22e; } /* Generic.Inserted & Diff Inserted */ } diff --git a/about.md b/about.md index d0e6de5..727348c 100644 --- a/about.md +++ b/about.md @@ -4,12 +4,10 @@ title: About permalink: /about/ --- -This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](http://jekyllrb.com/) +Hey, I'm Chris Klanac, just another web developer and wantrepreneur with a blog. -You can find the source code for the Jekyll new theme at: -{% include icon-github.html username="jglovier" %} / -[jekyll-new](https://github.com/jglovier/jekyll-new) +This blog is going to journal my experiments and learnings with "Extreme Vendoring". I heard the term somewhere and I'll post the reference if I ever find it. I think the original reference was actually a joke, but the idea resonated with me and jelled with the idea of modular, loosely coupled solutions. You can't get much more modular and loosely coupled than independent, vendored solutions. And it is in-sync with a long-standing business mantra "buy for parity; build for competitive advantage". While I'm not sure where this will lead, I expect the primary competitive advantage will be customer data and the secondary advantage is knowing how to tie together the various systems. -You can find the source code for Jekyll at -{% include icon-github.html username="jekyll" %} / -[jekyll](https://github.com/jekyll/jekyll) +I'm an advocate of the release early and iterative often apprach found in Lean Startup techniques. So this simple blog is going to to practice those ideas. I'm going to post my entries as drafts... some very rough drafts. Basically notes to myself, todo-lists, incomplete and unfinished ideas. Hopefully, I'll edit and improve them as I find the time. You'll also see old posts, some very old which I'll post for posterity's sake. + +So with that in mind. You'll see this blog uses the base [jekyllrb.com](http://jekyllrb.com/) theme, which I'd really like to update. But there are more important hurdles, besides if I'm sticking to extreme vendoring approach I should probably just grab a theme.