Commit 21f3618f authored by Murukesh Mohanan's avatar Murukesh Mohanan

moved to Disqus, new style, sectioned pages FTW!

parent e175c875
......@@ -32,8 +32,8 @@ cd ~/devel/web &&
---
`_sitename.yml` is a way of tricking Jekyll into adding a `root_url` to
the generated URLs. On Github, the file isn't read and `root_url` is
`_sitename.yml` is a way of tricking Jekyll into adding a `base-url` to
the generated URLs. On Github, the file isn't read and `base-url` is
empty, leading to absolute URLs from the root of the site. On the CSE
home folder, `_sitename.yml` defines `root_url` to be `~murukesh`,
home folder, `_sitename.yml` defines `base-url` to be `~murukesh`,
making the URLs relative to my home directory.
name: Murukesh Mohanan, IIT Bombay
markdown: kramdown
root_url: ""
base-url: ""
timezone: Asia/Kolkatta
highlighter: pygments
myurl: http://murukesh.me/
section_separator: "<!-- section -->"
gems:
- jekyll-sitemap
kramdown:
input: GFM
......@@ -14,7 +18,7 @@ defaults:
scope:
path: ""
values:
layout: "default"
layout: "page"
pages_list:
Main: ''
......
......@@ -11,8 +11,9 @@
<title>
{{ page.title }} &ndash; Muru's home page.
</title>
<link rel="stylesheet" href="{{ site.root_url }}/styles/style.css" type="text/css">
<link rel="stylesheet" href="{{ site.root_url }}/styles/{{ page.pagestyle }}.css" type="text/css">
<link rel="stylesheet" href="{{ site.base-url }}/styles/style.css" type="text/css">
<link rel="stylesheet" href="{{ site.base-url }}/styles/{{ page.pagestyle }}.css" type="text/css">
<link rel="stylesheet" href="{{ site.base-url }}/public/css/gpgc_style.css">
<!-- Web Fonts FTW! -->
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu">
</head>
......@@ -21,20 +22,11 @@
<h1>
Murukesh Mohanan
</h1>
<ul>
<li>
Third year, Master of Technology in Computer Science
and Engineering
</li>
<li>
RA, System Administration, CSE
</li>
</ul>
</header>
<nav>
<ul>
{% for page in site.pages_list %}
<a href="{{ site.root_url }}/{{ page[1] }}#main">
<a href="{{ site.base-url }}/{{ page[1] }}#main">
<li>
{{ page[0] }}
</li>
......@@ -42,11 +34,13 @@
{% endfor %}
</ul>
</nav>
<!--
<div id="vim-proposal">
<a href="http://area51.stackexchange.com/proposals/80441/vi-and-vim?referrer=cSyv9sCu62iNAfGtTTKvSg2">
<img src="http://area51.stackexchange.com/ads/proposal/80441.png" alt="Stack Exchange Q&A site proposal: Vi and vim" />
</a>
</div>
-->
<article id="main">
{{ content }}
......@@ -55,7 +49,7 @@
<footer>
<section>
<!-- Copyleft FTW! -->
<img src="{{ site.root_url }}/images/Copyleft.png" style="height: 1em;" alt="copyleft"> Murukesh Mohanan.
<img src="{{ site.base-url }}/images/Copyleft.png" style="height: 1em;" alt="copyleft"> Murukesh Mohanan.
<p>Permission to use content is granted under <a href="https://creativecommons.org/licenses/by-sa/3.0/" rel="license">the CC BY-SA license</a>.</p>
<p>The font used here is the Ubuntu font, via Google Web Fonts.</p>
</section>
......
---
layout: default
---
{% assign sections = content | split: site.section_separator %}
{% for section in sections %}
<section>
{{ section }}
</section>
{% endfor %}
......@@ -2,7 +2,7 @@
layout: default
pagestyle: posts
---
<div id="fb-root"></div>
<!--<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
......@@ -10,10 +10,10 @@ pagestyle: posts
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.4";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
-->
<header class="section post-title">
<h1>
<a href="{{ site.root_url }}{{ page.url }}">
<a href="{{ site.base-url }}{{ page.url }}">
{{ page.title }}
</a>
<time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">
......@@ -22,14 +22,34 @@ pagestyle: posts
</h1>
</header>
<section id="post">
{{ content }}
{% assign sections = content | split: site.section_separator %}
{% for section in sections %}
<section class="post">
{{ section }}
</section>
{% endfor %}
<section class="comments">
<!--
<div class="fb-comments"
data-href="{{site.myurl}}{{page.url}}"
data-width="100%"
data-numposts="10"
data-colorscheme="dark"></div>
-->
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = 'muru';
var disqus_identifier = '{{ page.url }}';
var disqus_url = '{{ site.myurl }}{{ page.url }}';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
</section>
......@@ -55,6 +55,8 @@ command in `sh -c`:
**Ugly.** I also hate having to deal with quoting.
<!-- section -->
At this point, it struck me: Why should I run this via a pipe? Once Vim starts,
I can perfectly well use `%! col -b` to do the job. So:
......@@ -69,7 +71,7 @@ quit a manpage, you'd have to do `:q!`, not just `:q`. Thankfully, one of the
options set ([`nomod`][nomod]) tells Vim that the buffer hasn't been modified.
Therefore, we can just use `:q`:
nnoremap q :q
nnoremap q :q<CR>
Other considerations arise:
......@@ -104,10 +106,10 @@ I picked [`VimEnter`][vimenter] since it runs after any commands specified using
However, I realised that:
- I wanted to apply some of these settings to manpages irrespective of how they
were made; and
were opened; and
- I'd rather not specify `set ft=man` from the command line, keeping an eye on
using Vim as a general-purpose pager
- Using `VimEnter *` felt *wrong*
using Vim as a general-purpose pager;
- Using `VimEnter *` felt *wrong*.
A bit of experimentation later, I found that:
......@@ -115,6 +117,14 @@ A bit of experimentation later, I found that:
what the manpage says.
2. `man` sets `MAN_PN` to the manpage name (`man(1)`, for example)
<aside markdown="1">
Git does something similar. When opening logs via `PAGER='vim -' git log`, for
example, you'll find that an environment variable name `GIT_PREFIX` exists
(though, oddly enough, possibly empty).
</aside>
<!-- section -->
Knowing that I'm reading from `stdin` and that `MAN_PN` is set (to the manpage
name!), I came up with this version:
......@@ -156,7 +166,8 @@ Beautiful!
What does this do?
1. In the main `vimrc`, I check if I'm reading from `stdin` and if `MAN_PN` is
set. If so, set the filetype *and the filename*.
set. If so, set the filetype to `man` *and the filename to the contents of
`MAN_PN`*.
2. In the filetype-specific setting, use an `autocmd` the relies on the filename
being `$MAN_PN` to apply `col -b`.
3. Set `nomodified` to tell Vim that the buffer hasn't been modified, and
......@@ -192,11 +203,13 @@ I have no idea how to suppress the `stdin` message from Vim itself.
---
All told:
[![man in Vim]({{ site.root_url }}/images/vim-man.png)]({{ site.root_url }}/images/vim-man.png)
[![man in Vim]({{ site.base-url }}/images/vim-man.png)]({{ site.base-url }}/images/vim-man.png)
---
Footnote:
<!-- section -->
## Footnote
This is my first blog post using [Jekyll](http://jekyllrb.com/). Writing it, I
have learned quite a bit, which I will write about in another post soon.
......
root_url: "/~murukesh"
base-url: "/~murukesh"
......@@ -3,45 +3,38 @@ title: Academics
pagestyle: acad
permalink: /acad/
---
<section markdown="1">
Sem IV courses:
# Sem IV
- HS 625: Philosophy of Education
- CS 691: R & D Project
</section>
<!-- section -->
<section markdown="1">
Sem III courses:
# Sem III
- [CS 601](http://www.cse.iitb.ac.in/page134?course=CS+601): Algorithms and Complexity
- [CS 626](http://www.cse.iitb.ac.in/page134?course=CS+626): Speech, Natural Language Processing and the Web
- [CS 724](http://www.cse.iitb.ac.in/page134?course=CS+724): Network Security and Cryptography - 2
</section>
<!-- section -->
<section markdown="1">
Sem II courses:
# Sem II
- CS 534: Quantum Information and Computing
- [CS 715](http://www.cse.iitb.ac.in/page134?course=CS+715): Design and Implementation of GNU Compiler Generation Framework
- [CS 726](http://www.cse.iitb.ac.in/page134?course=CS+726): Advanced Machine Learning
</section>
<!-- section -->
<section markdown="1">
Sem I courses:
# Sem I
- [CS 613](http://www.cse.iitb.ac.in/page134?course=CS+613): Design and Implementation of Functional Programming Languages
- [CS 618](http://www.cse.iitb.ac.in/page134?course=CS+618): Program Analysis
- [CS 621](http://www.cse.iitb.ac.in/page134?course=CS+621): Artificial Intelligence
- [CS 719](http://www.cse.iitb.ac.in/page134?course=CS+719): Topics in Mathematical Foundations of Formal Verification
</section>
<!-- section -->
<section markdown="1">
Past:
# Past
- Bachelor of Technology in Mechanical Engineering from IIT Guwahati
</section>
......@@ -2,13 +2,14 @@
title: Blog
permalink: /blog/
pagestyle: posts
layout: default
---
{% for post in site.posts %}
<section markdown="1">
<section>
<header class="post-title">
<h1>
<a href="{{site.root_url}}{{ post.url }}#main">{{ post.title }}</a>
<a href="{{site.base-url}}{{ post.url }}#main">{{ post.title }}</a>
<time datetime="{{ post.date | date_to_xmlschema }}" class="post-date"> {{ post.date | date: "%B %e, %Y" }}</time>
</h1>
</header>
......
......@@ -3,25 +3,23 @@ title: Contact
permalink: /contact/
---
<section markdown="1">
Currently at:
- C-227, Hostel 13, IIT Bombay
</section>
<section markdown="1">
<!-- section -->
Email me at:
- murukesh.mohanan [AT] gmail.com
- murukesh [AT] cse.iitb.ac.in
- m.mohanan [AT] alumni.iitg.ernet.in (defunct)
</section>
<section markdown="1">
<!-- section -->
Online:
- [Facebook](https://facebook.com/murukesh)
- [Google+](https://plus.google.com/+murukeshmohanan/)
- [Main Blog](http://murukeshm.blogspot.in/)
- [Second Blog](http://linuxexperiments.blogspot.in/)
</section>
......@@ -2,22 +2,23 @@
title: Murukesh Mohanan
---
<section markdown="1">
Call me Muru.
</section>
<section markdown="1">
I am an aspiring BOFH. Often called a psycho.
</section>
<!-- section -->
I am an aspiring BOFH. Often called a psycho. Now in my third year of the Master
of Technology in Computer Science and Engineering course in IIT Bombay, and
working for the department as an RA in System Administration, I get plenty of
opportunity to hone my skills. :)
<!-- section -->
<section markdown="1">
I share the hobby of the masses - reading. :P Favourite books include *The
Green Mile*, *The Wheel of Time* series, the *Foundation* series and the *Rama*
series.
</section>
<section markdown="1">
<!-- section -->
I am a Gooner. Favourite players include "Mad Jens" Lehmann, Dennis Bergkamp
and Wojciech Szczęsny. I have been an Arsenal fan since the Champions League
final in Paris, 2006.
</section>
......@@ -3,24 +3,13 @@ title: Resources
pagestyle: cann-table
permalink: /resources/
---
<section markdown="1">
A CV template in LaTeX (modified from one obtained online, original included):
- (outdated) tarball: [CV-LaTeX.tar.gz]({{ site.root_url }}/files/CV-LaTeX.tar.gz)
- [CSE Git](https://git.cse.iitb.ac.in/murukesh/cv)
</section>
# Vim: `vimrc` and plugins {#vim}
<section markdown="1">
Some stuff that I drag around with me on my various Linux boxes:
## Vimrc and vim plugins {#vim}
- (outdated) tarball: [vim.tar.bz2]({{ site.root_url }}/files/vim.tar.bz2)
- (outdated) tarball: [vim.tar.bz2]({{ site.base-url }}/files/vim.tar.bz2)
- [CSE Git](https://git.cse.iitb.ac.in/murukesh/vimrc)
- [Github](https://github.com/murukeshm/vimrc)
<div markdown="1" class="resources-list" id="plugins-list">
<div markdown="1" id="plugins-list">
Currently contains a nifty `vimrc`, and some plugins:
......@@ -49,22 +38,28 @@ You might wanna do a `git pull` on some of the plugins inside `.vim/bundle`:
- [CSE Git](https://git.cse.iitb.ac.in/murukesh/home)
- [Github](https://github.com/murukeshm/home)
---
<!-- section -->
## Some scripts {#scripts}
# Some scripts {#scripts}
<div markdown="1" class="resources-list">
- [curlwc.sh](files/curlwc.sh):
This script uses [curl(1)](http://linux.die.net/man/1/curl) to download the target file in parts. Not very robust.
- [mtcd.sh](files/mtcd.sh):
This script mounts all arguments in directories within `~/cdrom` (as ISO9660 images), and also handles unmounting.
</div>
These and more can be found on my [Github scrips repo](https://github.com/murukeshm/scripts).
</section>
<section markdown="1">
## [A Cann Table][cann-table] {#cann}
<!-- section -->
# CV
A CV template in LaTeX (modified from one obtained online, original included):
- (outdated) tarball: [CV-LaTeX.tar.gz]({{ site.base-url }}/files/CV-LaTeX.tar.gz)
- [CSE Git](https://git.cse.iitb.ac.in/murukesh/cv)
<!-- section -->
# [A Cann Table][cann-table] {#cann}
<div id="cann-table-area">
{% include_relative cann-table.html %}
......@@ -79,4 +74,3 @@ Hopefully this will count as personal use. :)
[cann-table]: http://www.sussex.ac.uk/Users/iane/cannyclubs.php
[7amkickoff]: http://www.7amkickoff.com/2012/cann-tables-show-the-gap-between-arsenal-and-the-top-is-smaller-than-you-think/
[epl]: http://www.premierleague.com/en-gb/matchday/league-table.html
</section>
......@@ -56,7 +56,7 @@ pre span.lineno {
}
.comments {
background-color: grey;
background-color: darkslategrey;
}
@media screen and (orientation:landscape) {
.post-date {
......
#title {
border-bottom: 0.2em solid white;
padding: 0.1em 3%;
margin: 0;
font-size: x-large;
font-variant: small-caps;
text-align: center;
min-height: 5em;
background-color: lightslategrey;
color: whitesmoke;
}
/** The #main div is given a min-height so that it isn't
......@@ -48,20 +50,12 @@ footer {
display: none;
}
#title ul {
padding: 0;
font-size: larger;
}
#title li {
list-style: none;
}
nav li {
margin-bottom: 0.1em;
padding: 0.5em 0.5em;
border-radius: 0.3em;
background-color: #999999;
border-radius: 0 0.3em 0.3em 0;
background-color: #37474F;
color: white;
}
nav a {
......@@ -69,7 +63,7 @@ nav a {
}
nav a:visited {
color: black;
color: silver;
}
footer img {
......@@ -96,7 +90,7 @@ body {
margin: 0 auto;
padding: 0;
color: #121212;
background-color: silver; /*#CCCCCC;*/
background-color: #B0BEC5; /*#CCCCCC;*/
width: 100%;
/* width: 60em;*/
}
......@@ -146,7 +140,7 @@ pre code {
overflow: auto;
display: block;
padding: 1em 0.5em;
color: silver;
color: whitesmoke;
background-color: black;
}
......@@ -166,9 +160,6 @@ pre code strong {
}
@media screen and (orientation:landscape) {
header h1, header h2 {
margin: 0;
}
nav {
padding-top: 1%;
/* min-height: 42em;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment