-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeed.xml
1922 lines (1328 loc) · 103 KB
/
feed.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Arka Roy</title>
<description>Provides professional services on web design, development, web application, digital marketing, social marketing.</description>
<link>http://www.arkaroy.net/</link>
<atom:link href="http://www.arkaroy.net/feed.xml" rel="self" type="application/rss+xml" />
<pubDate>Wed, 20 May 2015 15:35:56 +0530</pubDate>
<lastBuildDate>Wed, 20 May 2015 15:35:56 +0530</lastBuildDate>
<item>
<title>Social Popularity Analyzer</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>A simple tool to analyze social popularity of any given url or link in different social media.</p>
<p><br /></p>
<p><a href="/social-popularity-analyzer/"><img src="/assets/image/social-popularity-analyzer-01.jpg" alt="Social Popularity Analyzer" /></a></p>
</description>
<pubDate>Sun, 12 Apr 2015 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/portfolio/social-popularity-analyzer/</link>
<guid isPermaLink="true">http://www.arkaroy.net/portfolio/social-popularity-analyzer/</guid>
<category>portfolio</category>
</item>
<item>
<title>How to use Zaq: Codeigniter Template Parser Engine</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>Zaq is a PHP based template parser engine developed to work with Codeigniter. This library has been developed for developers to integrate php codes in views easily. Using this library will also allow the view file to be more readable. View files in Codeigniter (or in any other framework following MVC) always contains both html and php codes which make them a bit harder to read. This problem can be eradicated by using a parser engine which makes the view files a lot more easier to work with.</p>
<p>Codeigniter, by default, comes with an optional template parser. But, unfortunately, that one does not provide sufficient pseudo markup to work with. Zaq, without doubt, is able to provide much more flexibility while building view files with pseudo markup to replace php codes.</p>
<p>Let’s take a look at Zaq’s insight and usage.</p>
<p><br /></p>
<h2 id="installation">Installation</h2>
<ol>
<li>
<p><a href="https://github.com/iarkaroy/Zaq-Codeigniter-Template-Parser/archive/master.zip"><strong>Download Zaq</strong></a></p>
</li>
<li>
<p>Copy <code>libraries/Zaq.php</code> to your <code>application/libraries/</code> folder</p>
</li>
<li>
<p>Copy <code>config/zaq.php</code> to your <code>application/config/</code> folder.</p>
</li>
<li>
<p>Create the folder if not exists: <code>application/cache</code></p>
</li>
<li>
<p>Set <code>application/cache</code> writable.</p>
</li>
</ol>
<p><br /></p>
<h2 id="initialization">Initialization</h2>
<p>Like other libraries in CodeIgniter, the Zaq library class is initialized in your controller using the <code>$this-&gt;load-&gt;library()</code> method:</p>
<pre><code>$this-&gt;load-&gt;library('zaq');
</code></pre>
<p>Or you can autoload the library in <code>autoload.php</code></p>
<p>Once loaded, the Zaq library object will be available using: <code>$this-&gt;zaq</code></p>
<p><br /></p>
<h2 id="parsing-viewstemplates">Parsing Views/Templates</h2>
<p>You can use the <code>parse()</code> method to parse (or render) your views or templates. The syntax is:</p>
<pre><code>$this-&gt;zaq-&gt;parse( $view, $data = array(), $return = FALSE );
</code></pre>
<p>The first parameter contains the name of the view file, the second parameter contains an associative array of data to be made available in the template, and the third parameter specify whether to return the parsed string.</p>
<p>Example:</p>
<pre><code>$data = array(
'products' =&gt; array(
array( 'title' =&gt; 'Shirts', 'link' =&gt; '/shirts' ),
array( 'title' =&gt; 'Trousers', 'link' =&gt; '/trousers' ),
array( 'title' =&gt; 'Shoes', 'link' =&gt; '/shoes' ),
array( 'title' =&gt; 'Belts', 'link' =&gt; '/belts' ),
),
);
$this-&gt;zaq-&gt;parse( 'products/list', $data );
</code></pre>
<p>There is no need to “echo” or do something with the data returned by <code>$this-&gt;zaq-&gt;parse()</code>. It is automatically passed to the output class to be sent to the browser. However, if you do want the data returned instead of sent to the output class you can pass TRUE (boolean) as the third parameter:</p>
<pre><code>$string = $this-&gt;zaq-&gt;parse('products/list', $data, TRUE);
</code></pre>
<p><br /></p>
<h2 id="pseudo-markup">Pseudo Markup</h2>
<p>The pseudo markup of Zaq is much more cleaner than its equivalent php code. It enhance the readability and maintainability of the code. Designer will also be cheerful to work with a cleaner file.</p>
<p><br /></p>
<h4 id="foreach"><strong>foreach:</strong></h4>
<p>From the above example, we are creating a template file at <code>products/list.php</code>:</p>
<pre><code>&lt;ul&gt;
{foreach products as product}
&lt;li&gt;&lt;a href="{product[link]}"&gt;{product[title]}&lt;/a&gt;&lt;/li&gt;
{/foreach}
&lt;/ul&gt;
</code></pre>
<p>The html output will be:</p>
<pre><code>&lt;ul&gt;
&lt;li&gt;&lt;a href="/shirts"&gt;Shirts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/trousers"&gt;Trousers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/shoes"&gt;Shoes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/belts"&gt;Belts&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<p>To achieve the same output by php code:</p>
<pre><code>&lt;ul&gt;
&lt;?php foreach ( $products as $product ) : ?&gt;
&lt;li&gt;&lt;a href="&lt;?php echo $product['link'] ; ?&gt;"&gt;&lt;?php echo $product['title'] ; ?&gt;&lt;/a&gt;&lt;/li&gt;
&lt;?php endforeach ; ?&gt;
&lt;/ul&gt;
</code></pre>
<p>Use foreach for associative array</p>
<pre><code>&lt;ul&gt;
{foreach options as item = value}
&lt;li&gt;{item} =&gt; {value}&lt;/li&gt;
{/foreach}
&lt;/ul&gt;
</code></pre>
<p><br /></p>
<h4 id="ifelseifelse"><strong>if/elseif/else:</strong></h4>
<pre><code>{if product[active]}
... do something ...
{elif product[published]}
... some other thing ...
{/if}
</code></pre>
<p><br /></p>
<h4 id="echo"><strong>echo:</strong></h4>
<p>All variables and methods will be automatically preceded by <code>echo</code>:</p>
<pre><code>{somevar}
&lt;?php echo $somevar ; ?&gt;
{some_array[assoc_key]}
&lt;?php echo $some_array['assoc_key'] ; ?&gt;
{another_array[$key]}
&lt;?php echo $another_array[$key] ; ?&gt;
{date('Y-m-d H:i:s', now)}
&lt;?php echo date ( 'Y-m-d H:i:s' , $now ) ; ?&gt;
{time()}
&lt;?php echo time ( ) ; ?&gt;
{fname . lname}
&lt;?php echo $fname . $lname ; ?&gt;
{books-&gt;get_by_author(author)-&gt;first()-&gt;title}
&lt;?php echo $books -&gt; get_by_author( $author ) -&gt; first() -&gt; title ; ?&gt;
</code></pre>
<p><br /></p>
<h4 id="constants"><strong>constants:</strong></h4>
<p>To use constants, precede the constant with <code>#</code>:</p>
<pre><code>{if defined('APP_VERSION') &amp;&amp; #APP_VERSION &gt; 2.0}
... do something ...
{/if}
</code></pre>
<p><br /></p>
<h2 id="how-zaq-works">How Zaq Works</h2>
<ol>
<li>
<p>Parse template and convert pseudo-markup to valid php code.</p>
</li>
<li>
<p>Store the code in a temporary file in its cache folder (configurable).</p>
</li>
<li>
<p>Load view from the temporary folder.</p>
</li>
<li>
<p>Delete the temporary file (configurable).</p>
</li>
</ol>
<p><br /></p>
<h2 id="configuration">Configuration</h2>
<p>The configuration file, <code>zaq.php</code>, should be located in <code>application/config/</code>.</p>
<p>There are two configuration settings.</p>
<pre><code>$config['cache_dir'] = APPPATH . 'cache/zaq';
$config['enable_cache'] = TRUE;
</code></pre>
<p>The <code>cache_dir</code> setting tells Zaq where to store the temporary files.</p>
<p>If <code>enable_cache</code> setting is set to <code>TRUE</code>, Zaq will keep the temporary files and will skip the parsing process next time if the parsed file is newer than the view file.</p>
<p><br /></p>
<h2 id="helper-methods">Helper Methods</h2>
<p>There are several helper methods to ease the application development a bit more.</p>
<p><br /></p>
<p><code>set_delimiter ( [ $left_delimiter = '{' [ , $right_delimiter = '}' ] ] )</code>:</p>
<p>Sets the delimiters (opening and closing) for a pseudo-markup “tag” in a template.</p>
<p>Parameters:</p>
<ul>
<li><code>$left_delimiter</code> (String) - Left delimiter</li>
<li><code>$right_delimiter</code> (String) - Right delimiter</li>
</ul>
<p>Return: void</p>
<p><br /></p>
<p><code>add_exception ( $val )</code>:</p>
<p>Add exception to list of pseudo-markups.</p>
<p>Parameters:</p>
<ul>
<li><code>$val</code> (String) - The string to skip parsing (without delimiters)</li>
</ul>
<p>Return: void</p>
<p>By default, <code>elapsed_time</code> and <code>memory_usage</code> have been added to the list of exceptions as these are Codeigniter’s default pseudo-markup tag.</p>
</description>
<pubDate>Wed, 08 Apr 2015 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/blog/how-to-use-zaq-codeigniter-template-parser/</link>
<guid isPermaLink="true">http://www.arkaroy.net/blog/how-to-use-zaq-codeigniter-template-parser/</guid>
<category>php</category>
<category>template-parser</category>
<category>codeigniter</category>
<category>library</category>
<category>blog</category>
</item>
<item>
<title>Zaq: Codeigniter Template Parser Engine</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>Zaq is a PHP based template parser engine developed to work with Codeigniter. This library has been developed for developers to integrate php codes in views easily. Using this library will also allow the view file to be more readable. View files in Codeigniter (or in any other framework following MVC) always contains both html and php codes which make them a bit harder to read. This problem can be eradicated by using a parser engine which makes the view files a lot more easier to work with.</p>
<p>Codeigniter, by default, comes with an optional template parser. But, unfortunately, that one does not provide sufficient pseudo markup to work with. Zaq, without doubt, is able to provide much more flexibility while building view files with pseudo markup to replace php codes.</p>
<p>Let’s take a look at Zaq’s insight and usage.</p>
<p><br /></p>
<h2 id="installation">Installation</h2>
<ol>
<li>
<p><a href="https://github.com/iarkaroy/Zaq-Codeigniter-Template-Parser/archive/master.zip"><strong>Download Zaq</strong></a></p>
</li>
<li>
<p>Copy <code>libraries/Zaq.php</code> to your <code>application/libraries/</code> folder</p>
</li>
<li>
<p>Copy <code>config/zaq.php</code> to your <code>application/config/</code> folder.</p>
</li>
<li>
<p>Create the folder if not exists: <code>application/cache</code></p>
</li>
<li>
<p>Set <code>application/cache</code> writable.</p>
</li>
</ol>
<p><br /></p>
<h2 id="initialization">Initialization</h2>
<p>Like other libraries in CodeIgniter, the Zaq library class is initialized in your controller using the <code>$this-&gt;load-&gt;library()</code> method:</p>
<pre><code>$this-&gt;load-&gt;library('zaq');
</code></pre>
<p>Or you can autoload the library in <code>autoload.php</code></p>
<p>Once loaded, the Zaq library object will be available using: <code>$this-&gt;zaq</code></p>
<p><br /></p>
<p>For usage instructions and more, visit <a href="http://www.arkaroy.net/blog/how-to-use-zaq-codeigniter-template-parser/">How to use Zaq: Codeigniter Template Parser Engine</a></p>
</description>
<pubDate>Sun, 05 Apr 2015 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/portfolio/zaq-codeigniter-template-parser/</link>
<guid isPermaLink="true">http://www.arkaroy.net/portfolio/zaq-codeigniter-template-parser/</guid>
<category>portfolio</category>
</item>
<item>
<title>Category Pagination in Jekyll</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>This site is built on Jekyll - a blog aware static site generator. When I was building this, I wanted to separate my blog from my portfolio. Of course I would be using custom post type for my portfolio if I was developing on Wordpress. Here I thought to stay straight and simple and I just created two site categories: portfolio and blog and I am using custom permalink which makes it difficult to use the default pagination setup. And I also want to paginate only the blog category.</p>
<p>Here, in this tutorial, we will discuss on how to paginate a specific category in Jekyll with custom plugin built from scratch.</p>
<p>Let’s get started.</p>
<h2 id="site-structure">Site Structure</h2>
<p>In order for the plugin to work, I have removed the <code>index.html</code> from <code>blog</code> category (i.e. directory). Now my site structure looks like this:</p>
<pre><code>+ index.html
+ about.html
+ blog &lt;- no index page for blog
+ _posts
+ 2012-01-02-blog-post-01.markdown
+ 2012-01-03-blog-post-02.markdown
+ portfolio
+ index.html &lt;- index page for portfolio
+ _posts
+ 2012-02-01-project-01.markdown
+ 2012-02-02-project-02.markdown
</code></pre>
<p>I want the <code>index.html</code> in the <code>blog</code> category to be generated by the plugin. Here is the site structure I wish to have:</p>
<pre><code>+ index.html
+ about.html
+ blog
+ index.html
+ pages
+ 2
+ index.html
+ 3
+ index.html
...
...
+ blog-post-01
+ index.html
+ blog-post-02
+ index.html
+ portfolio
+ project-01
+ index.html
+ project-02
+ index.html
</code></pre>
<p>As you can see, <code>index.html</code> in the <code>blog</code> category will be generated by the plugin as the very first page of the pagination. And from second page onward, it will live in respective directories under <code>pages</code> directory.</p>
<h2 id="liquid-template">Liquid Template</h2>
<p>The template for iterating over the current set of posts and showing them look like this:</p>
<pre><code>&lt;h1&gt;Blog&lt;/h1&gt;
{% for post in page.current_posts %}
&lt;article class="entry"&gt;
&lt;h3 class="entry-title"&gt;
&lt;a href="{{ post.url | prepend: site.baseurl | prepend: site.url }}" title="Read more on {{ post.title }}" rel="bookmark"&gt;{{ post.title }}&lt;/a&gt;
&lt;/h3&gt;
&lt;div class="entry-excerpt"&gt;
{{ post.excerpt }}
&lt;/div&gt;
&lt;div class="entry-meta"&gt;
&lt;em&gt;{{ post.date | date: "%b %-d, %Y" }} by {{ site.author.name }}&lt;/em&gt;
&lt;/div&gt;
&lt;/article&gt;
{% endfor %}
</code></pre>
<p>There should also be navigation links for previous and next pages. Here goes the template for that:</p>
<pre><code>{% if page.total_pages &gt; 1 %}
&lt;div class="posts-nav-links clearfix"&gt;
{% if page.prev_page %}
{% if page.prev_page == 1 %}
&lt;a class="pull-left" href="/blog/"&gt;&amp;lt;&lt;/a&gt;
{% else %}
&lt;a class="pull-left" href="/blog/pages/{{ page.prev_page }}"&gt;&amp;lt;&lt;/a&gt;
{% endif %}
{% endif %}
{% if page.next_page %}
&lt;a class="pull-right" href="/blog/pages/{{ page.next_page }}"&gt;&amp;gt;&lt;/a&gt;
{% endif %}
&lt;/div&gt;
{% endif %}
</code></pre>
<p>I include these templates in a heredoc inside my plugin.</p>
<h2 id="the-configuration">The Configuration</h2>
<p>Before diving into writing the plugin, we need to set some config options in the <code>_config.yml</code> file to make the plugin a bit more maintainable.</p>
<p>We need to provide an option to later modify number of posts in a page without touching the plugin. For this reason, we are going to include <code>posts_per_page</code> in our <code>_config.yml</code>.</p>
<pre><code>paginated_category: "blog"
posts_per_page: 20
</code></pre>
<p>The setting <code>paginated_category</code> will tell the plugin which category to use for pagination. We may hardcode this in our plugin, but it is a bit more professional to provide an option to change the setting later without looking at the plugin.</p>
<h2 id="the-code">The Code</h2>
<p>First, create a file <code>CategoryPostPaginator.rb</code> inside your <code>_plugins</code> directory.</p>
<p>The first class to create is the “Generator.” All generators are called by Jekyll at site build, so if you want code that’s going to create new pages or content, you want to sub-class this class.</p>
<p>When Jekyll calls a generator, it calls the <code>generate</code> method, so that’s the first method to implement. In our class, it loops through all the posts in the site and group the posts according to their position (or index). Then it crates a page for each group.</p>
<pre><code>class CategoryPostPaginator &lt; Generator
def generate(site)
all_posts = site.categories[site.config['paginated_category']]
site.data['all_posts'] = all_posts
posts_per_page = Float(site.config['posts_per_page'])
total_posts = Float(all_posts.size)
total_pages = Float(total_posts / posts_per_page)
total_pages = total_pages.ceil
site.data['paginated_pages'] = Hash.new
(1..total_pages).each do |page_num|
site.pages &lt;&lt; PostListingPage.new(site, total_pages, page_num, all_posts.slice!(0, posts_per_page.to_i))
end
end
end
</code></pre>
<p>Next, we need to subclass the <code>Page</code> class for our specific needs. This code is very specific to my site, you may want to change the logic here to meet your needs. Basically, I am creating a series of pages to show category indexes. This code customizes the layout that’s used and adds some information to the generated page. I have included my liquid template in heredoc statement.</p>
<pre><code>class PostListingPage &lt; Page
def initialize(site, total_pages, current_page, current_posts)
@site = site
@total_pages = total_pages
@current_page = current_page
self.ext = '.html'
self.basename = 'index'
prev_page = nil
next_page = current_page + 1
if current_page &gt; 1
prev_page = current_page - 1
end
if next_page &gt; total_pages
next_page = nil
end
self.data = {
'layout' =&gt; 'default',
'title' =&gt; "Blog",
'current_posts' =&gt; current_posts,
'total_pages' =&gt; total_pages,
'current_page' =&gt; current_page,
'prev_page' =&gt; prev_page,
'next_page' =&gt; next_page
}
self.content = &lt;&lt;-EOS
&lt;h1&gt;Blog&lt;/h1&gt;
{% for post in page.current_posts %}
&lt;article class="entry"&gt;
&lt;h3 class="entry-title"&gt;
&lt;a href="{{ post.url | prepend: site.baseurl | prepend: site.url }}" title="Read more on {{ post.title }}" rel="bookmark"&gt;{{ post.title }}&lt;/a&gt;
&lt;/h3&gt;
&lt;div class="entry-excerpt"&gt;
{{ post.excerpt }}
&lt;/div&gt;
&lt;div class="entry-meta"&gt;
&lt;em&gt;{{ post.date | date: "%b %-d, %Y" }} by {{ site.author.name }}&lt;/em&gt;
&lt;/div&gt;
&lt;/article&gt;
{% endfor %}
{% if page.total_pages &gt; 1 %}
&lt;div class="posts-nav-links clearfix"&gt;
{% if page.prev_page %}
{% if page.prev_page == 1 %}
&lt;a class="pull-left" href="/blog/"&gt;&amp;lt;&lt;/a&gt;
{% else %}
&lt;a class="pull-left" href="/blog/pages/{{ page.prev_page }}"&gt;&amp;lt;&lt;/a&gt;
{% endif %}
{% endif %}
{% if page.next_page %}
&lt;a class="pull-right" href="/blog/pages/{{ page.next_page }}"&gt;&amp;gt;&lt;/a&gt;
{% endif %}
&lt;/div&gt;
{% endif %}
EOS
end
def url
if @current_page == 1
File.join("/", "blog", 'index.html')
else
File.join("/", "blog", "pages", "#{@current_page}", 'index.html')
end
end
def to_liquid
Utils.deep_merge_hashes(self.data, {
"url" =&gt; self.url,
"content" =&gt; self.content
})
end
def html?
true
end
end
</code></pre>
<p>That is the end of our discussion. Hope you enjoyed it. Just give it a try.</p>
</description>
<pubDate>Sat, 28 Mar 2015 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/blog/category-pagination-in-jekyll/</link>
<guid isPermaLink="true">http://www.arkaroy.net/blog/category-pagination-in-jekyll/</guid>
<category>jekyll</category>
<category>ruby</category>
<category>pagination</category>
<category>blog</category>
</item>
<item>
<title>DesignStudio: Flat Website Layout</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>This is a personal project of creating a simple flat layout which can be presented with grid system for responsive design.
<br /><br />
<img src="/assets/image/designstudio-flat-website-layout-01.jpg" alt="Project Screenshot" /></p>
</description>
<pubDate>Fri, 23 Jan 2015 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/portfolio/design-studio-flat-website-layout/</link>
<guid isPermaLink="true">http://www.arkaroy.net/portfolio/design-studio-flat-website-layout/</guid>
<category>portfolio</category>
</item>
<item>
<title>Pixi: Website Layout</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>This is a personal project of creating a simple flat layout which can be presented with grid system for responsive design.
<br /><br />
<img src="/assets/image/pixi-website-layout-01.jpg" alt="Project Screenshot" /></p>
</description>
<pubDate>Mon, 05 Jan 2015 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/portfolio/pixi-website-layout-design/</link>
<guid isPermaLink="true">http://www.arkaroy.net/portfolio/pixi-website-layout-design/</guid>
<category>portfolio</category>
</item>
<item>
<title>15 Best Bootstrap Alternatives for Web Developers</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>You have probably heard a lot about Bootstrap (aka Twiter Bootstrap). With this framework you can build a well structured, maintainable and up-gradable website. It also helps you save much on your time because there are plenty of readily available elements that you can use.</p>
<p>Choosing the right framework that is the perfect fit for your projects could be a little bit overwhelming - there are a lot to choose from. Perhaps, you want to go with popular choices like <a href="http://getbootstrap.com/">Bootstrap</a> or <a href="http://foundation.zurb.com/">Foundation</a>, but if your website is going to be a fairly simple one, you won’t be needing most of the building blocks and materials included in the default package.</p>
<p>The good news is that there are a handful of alternatives that are much leaner than Bootstrap or Foundation. Most of these frameworks ship with just the right amount of styles and components to help you get started, while allowing you to be able to extend them in the direction you want for your project.</p>
<p><br /></p>
<h2 id="skeletonhttpgetskeletoncom"><a href="http://getskeleton.com/">Skeleton</a></h2>
<p><img src="/assets/image/20141221-skeleton.jpg" alt="Skeleton" /></p>
<p>Skeleton provides eventually obtained a face lift. It’s an overall renovation from the ground up, and yet it is still as light as it used to be. The new Skeleton grid system now adopts mobile-first philosophy, which ensures that the layout takes center stage regardless of how small the device screen is.</p>
<p><br /></p>
<h2 id="zimithttpfirezenkgithubiozimit"><a href="http://firezenk.github.io/zimit/">Zimit</a></h2>
<p><img src="/assets/image/20141221-zimit.jpg" alt="Zimit" /></p>
<p>Zimit is a very lightweight HTML5 framework for prototyping responsive web site designs for web developers. It’s based on the LESS CSS pre-processor and provides a framework designed for scalability and code that’s easy to read and understand. It supports all modern web browsers and compiled it’s only 88kb in total file size.</p>
<p><br /></p>
<h2 id="inkhttpinksapopt"><a href="http://ink.sapo.pt/">Ink</a></h2>
<p><img src="/assets/image/20141221-ink.jpg" alt="Ink" /></p>
<p>Ink is an interface kit for the rapid development of web interfaces that aims to be easy to use and expand upon. It’s also based on LESS and offers a fluid grid and other responsive development features for creating both large and small website projects. InK’s primary differentiator is how it handles layout, allowing flexibility in how blocks fall within the grid.</p>
<p><br /></p>
<h2 id="cardinalcsshttpcardinalcsscom"><a href="http://cardinalcss.com/">CardinalCSS</a></h2>
<p><img src="/assets/image/20141221-cardinalcss.jpg" alt="CardinalCSS" /></p>
<p>CardinalCSS is often a CSS composition designed with the target effectiveness, readability and many significantly maintainability. CardinalCSS explores some current approaches including mobile-first pertaining to framing up the grid; along with CSS Field Product of which lets you very easily establish element wider along with top.</p>
<p><br /></p>
<h2 id="concisecsshttpconcisecsscom"><a href="http://concisecss.com/">ConciseCSS</a></h2>
<p><img src="/assets/image/20141221-concisecss.jpg" alt="ConciseCSS" /></p>
<p>ConciseCSS is usually a CSS platform – devoid of the bloat. This can be a slender platform built together with Sass, MUCH LESS, and Stylus which often paves the golden path to CSS maintainability. But, if you desire simple straightforward vanilla CSS, you can have that will likewise.</p>
<p><br /></p>
<h2 id="purehttppurecssio"><a href="http://purecss.io/">Pure</a></h2>
<p><img src="/assets/image/20141221-purecss.jpg" alt="Pure" /></p>
<p>If you are planning to build a web app that works both on desktop and mobile, then you should consider of using Pure from Yahoo. Pure has much better performance when it comes to mobile devices than Bootstrap. As its name suggests, Pure comes as a pure CSS framework only. Build on top of Normalize.css, Pure has an extremely small file size with just 4.5KB (minified and gzip).</p>
<p><br /></p>
<h2 id="powertocsshttppowertowebcompowertocss"><a href="http://powertoweb.com/powertocss/">PowertoCSS</a></h2>
<p><img src="/assets/image/20141221-powertocss.jpg" alt="PowertoCSS" /></p>
<p>PowertoCSS is usually light in weight as well as a reliable frontend framework. Course bands which can be utilized to construct the particular grid along with use styles are usually quick and easy to not forget button. It’s also possible to create your personal design. Brain to the site their StarterKit to get going.</p>
<p><br /></p>
<h2 id="furtivehttpfurtiveco"><a href="http://furtive.co/">Furtive</a></h2>
<p><img src="/assets/image/20141221-furtive.jpg" alt="Furtive" /></p>
<p>Furtive can be a mobile-first CSS structure built throughout the cutting-edge web specifications including the employment of Flexbox to the grid and also rem model intended for dimensions factors (including font size). Furtive holds a little CSS footprint by means of not supporting elderly browsers (World Wide Web Explorer) simply because they involve a few CSS hacking. For this reason Furtive can be a great structure should you be creating an internet site in the future.</p>
<p><br /></p>
<h2 id="uikithttpgetuikitcom"><a href="http://getuikit.com/">UiKit</a></h2>
<p><img src="/assets/image/20141221-uikit.jpg" alt="UiKit" /></p>
<p>UIkit is a free, lightweight and modular front-end framework. Developed with LESS, UIkit has a well-structured, expandable and maintainable code. It also offers a grid system which is responsive, fluid and nestable. With UIkit you can build navigation, buttons, modals, dropdown and more responsively. Its comprehensive documentation will make you easier to get started with UIkit.</p>
<p><br /></p>
<h2 id="basscsshttpwwwbasscsscom"><a href="http://www.basscss.com/">BassCSS</a></h2>
<p><img src="/assets/image/20141221-basscss.jpg" alt="BassCSS" /></p>
<p>BassCSS provides a lightweight group of starting factor designs, utilities, along with design along with shade designs, inside modular variety for developing a responsive world-wide-web request. Your SCSS files are generally integrated to be able to customize the type simply. You possibly can play together with typography, whitened space, breakpoints.</p>
<p><br /></p>
<h2 id="muellerhttpmuellergridsystemcom"><a href="http://muellergridsystem.com/">Mueller</a></h2>
<p><img src="/assets/image/20141221-mueller.jpg" alt="Mueller" /></p>
<p>Mueller is a modular sensitive grid technique built over Sass and also Compass. Using Mueller, you are able to assemble the actual grid sometimes by building courses right to the actual HTML aspects, or perhaps in case you like your current HTML aspects for being well put together and also clean, when using the grid() perform. Mueller grid may be used in tandem using the Masonry JavaScript selection to manufacture a Pinterest-like design.</p>
<p><br /></p>
<h2 id="html5-boilerplatehttphtml5boilerplatecom"><a href="http://html5boilerplate.com/">HTML5 Boilerplate</a></h2>
<p><img src="/assets/image/20141221-html5boilerplate.jpg" alt="HTML5 Boilerplate" /></p>
<p>HTML5 Boilerplate isn’t really a framework but rather it is a professional front-end template to give you a head start building a robust and adaptable web app. Boilerplate comes baked with Modernizr, Normalize.css and jQuery to help you create pages that work across browsers and can adapt to browsers that don’t offer support for certain features.</p>
<p><br /></p>
<h2 id="tuktukhttptuktuktapquocom"><a href="http://tuktuk.tapquo.com/">Tuktuk</a></h2>
<p><img src="/assets/image/20141221-tuktuk.jpg" alt="Tuktuk" /></p>
<p>Tuktuk is usually a really exclusive identify for a platform. When compared with Bootstrap or Groundwork, Tuktuk is significantly light since it only comes with simply the correct amount of elements to construct a presentable web site as well as to the grid system, fundamental design pertaining to typography, dining tables, and also some USER INTERFACE such as navbar and also modals.</p>
<p><br /></p>
<h2 id="basehttpmatthewhartmangithubiobase"><a href="http://matthewhartman.github.io/base/">Base</a></h2>
<p><img src="/assets/image/20141221-base.jpg" alt="Base" /></p>
<p>Base was made together with MUCH LESS and Sass, and it also includes merely essentially the most important associated with factors to construct websites: the particular grid and also the standard doing your hair associated with HTML factors. Base doesn’t include JavaScript factors, however an excellent great internet browser compatibility much in order that it works in spite of IE7.</p>
<p><br /></p>
<h2 id="toasthttpdanedengithubiotoast"><a href="http://daneden.github.io/Toast/">Toast</a></h2>
<p><img src="/assets/image/20141221-toast.jpg" alt="Toast" /></p>
<p>Through the SCSS stylesheet is included in the package, Toast allows you to easily configure the grid class names, the gutter, and even the column-base. For example, if you want the grid to be a 9-base column instead of 12, you can do that. Toast is a minimal CSS framework with very flexible configurations catered to meet your requirements.</p>
</description>
<pubDate>Sun, 21 Dec 2014 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/blog/15-best-bootstrap-alternatives-web-developers/</link>
<guid isPermaLink="true">http://www.arkaroy.net/blog/15-best-bootstrap-alternatives-web-developers/</guid>
<category>bootstrap</category>
<category>foundation</category>
<category>css-framework</category>
<category>blog</category>
</item>
<item>
<title>Simpi: Website Layout</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>This is a personal project of creating a simple flat layout which can be presented with grid system for responsive design.
<br /><br />
<a href="http://bit.ly/1DZKREH" class="button js-force-center" target="_blank">Download PSD</a>
<br /><br />
<img src="/assets/image/simpi-minimal-flat-website-layout-01.jpg" alt="Project Screenshot" /></p>
</description>
<pubDate>Tue, 09 Dec 2014 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/portfolio/simpi-website-layout/</link>
<guid isPermaLink="true">http://www.arkaroy.net/portfolio/simpi-website-layout/</guid>
<category>portfolio</category>
</item>
<item>
<title>8 Icon Fonts to speed up Website Design Process</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>Icon Fonts are nothing but fonts. But, instead of containing letters or numbers, they contain symbols and shapes. You can style them with CSS in the same way you style regular text which has made them a popular choice on the web in the process designing and developing websites and web applications.</p>
<p>They’re ideal for small, frequently used shapes such as email, envelopes, telephones, widget controls and social media logos. They also work in all modern browser.</p>
<p>Here is a list of most popular and easy-to-use icon font sets.</p>
<h2 id="font-awesomehttpfortawesomegithubiofont-awesome"><a href="http://fortawesome.github.io/Font-Awesome/">Font Awesome</a></h2>
<p><img src="/assets/image/20141012-fontawesome.jpg" alt="Font Awesome" /></p>
<h2 id="icomoonhttpsicomoonio"><a href="https://icomoon.io/">IcoMoon</a></h2>
<p><img src="/assets/image/20141012-icomoon.jpg" alt="IcoMoon" /></p>
<h2 id="foundation-icon-fonts-3httpzurbcomplaygroundfoundation-icon-fonts-3"><a href="http://zurb.com/playground/foundation-icon-fonts-3">Foundation Icon Fonts 3</a></h2>
<p><img src="/assets/image/20141012-foundation3.jpg" alt="Foundation Icon Fonts 3" /></p>
<h2 id="typiconshttptypiconscom"><a href="http://typicons.com/">Typicons</a></h2>
<p><img src="/assets/image/20141012-typicons.jpg" alt="Typicons" /></p>
<h2 id="iconichttpsuseiconiccom"><a href="https://useiconic.com/">Iconic</a></h2>
<p><img src="/assets/image/20141012-iconic.jpg" alt="Iconic" /></p>
<h2 id="we-love-icon-fontshttpweloveiconfontscom"><a href="http://weloveiconfonts.com/">We Love Icon Fonts</a></h2>
<p><img src="/assets/image/20141012-weloveiconfonts.jpg" alt="We Love Icon Fonts" /></p>
<h2 id="foundation-icon-fonts-2httpzurbcomplaygroundfoundation-icons"><a href="http://zurb.com/playground/foundation-icons">Foundation Icon Fonts 2</a></h2>
<p><img src="/assets/image/20141012-foundation2.jpg" alt="Foundation Icon Fonts 2" /></p>
<h2 id="fontellohttpfontellocom"><a href="http://fontello.com/">Fontello</a></h2>
<p><img src="/assets/image/20141012-fontello.jpg" alt="Fontello" /></p>
<p>If you want to create your own set of custom icon fonts, you can use online tools such as <a href="http://fontello.com/">Fontello</a> or <a href="https://icomoon.io/">IcoMoon</a>.</p>
</description>
<pubDate>Sun, 12 Oct 2014 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/blog/8-icon-fonts-to-speed-up-website-design-process/</link>
<guid isPermaLink="true">http://www.arkaroy.net/blog/8-icon-fonts-to-speed-up-website-design-process/</guid>
<category>icon</category>
<category>font</category>
<category>css</category>
<category>blog</category>
</item>
<item>
<title>Media Manager</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>Build a web application for Creocraft Ventures – a leading event-management company having multiple offices around India. Creocraft needed a simple but efficient web application for managing and showcasing their project albums. The application, Media Manager, is able to create and manage various type of album according to the need of Creocraft. Media Manager is also able to help users to crop and re-size the images before uploading. Youtube link can also be embedded. The main website of Creocraft communicate with the application through a special channel, technically API, to showcase the albums on the website.</p>
<p><br /></p>
<p><img src="/assets/image/media-manager-web-app-01.jpg" alt="Project Screenshot" /></p>
<p><br /></p>
<p><img src="/assets/image/media-manager-web-app-02.jpg" alt="Project Screenshot" /></p>
<p><br /></p>
<p><img src="/assets/image/media-manager-web-app-03.jpg" alt="Project Screenshot" /></p>
<p><br /></p>
<p><img src="/assets/image/media-manager-web-app-04.jpg" alt="Project Screenshot" /></p>
<p><br /></p>
<p><img src="/assets/image/media-manager-web-app-05.jpg" alt="Project Screenshot" /></p>
<p><br /></p>
<p><img src="/assets/image/media-manager-web-app-06.jpg" alt="Project Screenshot" /></p>
<p><br /></p>
<p><img src="/assets/image/media-manager-web-app-07.jpg" alt="Project Screenshot" /></p>
</description>
<pubDate>Sat, 13 Sep 2014 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/portfolio/media-manager-web-application/</link>
<guid isPermaLink="true">http://www.arkaroy.net/portfolio/media-manager-web-application/</guid>
<category>portfolio</category>
</item>
<item>
<title>Arka Roy</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>Build the website of Arka Roy (yes, that’s me).</p>
<p><br /></p>
<p><img src="/assets/image/arka-roy-website-01.jpg" alt="Project Screenshot" /></p>
<p><br /></p>
<p><img src="/assets/image/arka-roy-website-02.jpg" alt="Project Screenshot" /></p>
</description>
<pubDate>Sat, 23 Aug 2014 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/portfolio/arka-roy-website/</link>
<guid isPermaLink="true">http://www.arkaroy.net/portfolio/arka-roy-website/</guid>
<category>portfolio</category>
</item>
<item>
<title>Creocraft Ventures Website</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>Build the website for Creocraft Ventures – a leading event-management company having multiple offices around India. Creocraft needed a easy-to-use but innovative online presence to stand with dignity before their clients. The website is built with HTML5 and styled with the latest CSS3 technology. The website is made fully responsive keeping in mind the ease of use and readability.</p>
<p><br /></p>
<p><img src="/assets/image/creocraft-ventures-website-01.jpg" alt="Project Screenshot" /></p>
<p><br /></p>
<p><img src="/assets/image/creocraft-ventures-website-02.jpg" alt="Project Screenshot" /></p>
<p><br /></p>
<p><img src="/assets/image/creocraft-ventures-website-03.jpg" alt="Project Screenshot" /></p>
<p><br /></p>
<p><img src="/assets/image/creocraft-ventures-website-04.jpg" alt="Project Screenshot" /></p>
<p><br /></p>
<p><img src="/assets/image/creocraft-ventures-website-05.jpg" alt="Project Screenshot" /></p>
</description>
<pubDate>Wed, 06 Aug 2014 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/portfolio/creocraft-ventures-website/</link>
<guid isPermaLink="true">http://www.arkaroy.net/portfolio/creocraft-ventures-website/</guid>
<category>portfolio</category>
</item>
<item>
<title>Download ZIP File Dynamically with PHP</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>ZIP is a very popular archive file format that supports lossless data compression. A .ZIP file may contain one or more files or folders that may have been compressed. ZIP files are used in almost every downloadable content as it is widely supported by almost all operating systems.</p>
<p>ZIP files generally use the file extensions “.zip” or “.ZIP” and the MIME media type <code>application/zip</code>. ZIP is used as a base file format by many applications and tools. Most popular among them is WordPress. They use zip file format for themes, plugins and the application itself. And everything is done dynamically.</p>
<p>Here we will see how we can make a webpage act as an initializer to download a zip file. We will just provide the location of the file and PHP will download it to the user. In the back-end, the HTTP headers are responsible for the download. We will set the headers with PHP.</p>
<pre><code>$filename = "My Awesome Zip File.zip";
$filepath = "/var/www/downloads/file.zip";
</code></pre>
<p>The <code>$filename</code> contains the name that will appear to the user and <code>$filepath</code> contains the full absolute path where the file is physically located.</p>
<p>Now we will set the headers with PHP <a href="http://php.net/manual/en/function.header.php">header()</a>. And whenever any request comes to this page, browser will read the header response and start the download immediately.</p>
<pre><code>header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-type: application/octet-stream");
header('Content-Disposition: attachment; filename="' . $filename . '"');
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . filesize($filepath));
ob_end_flush();
@readfile($filepath);
</code></pre>
<p>Of course, the name of the downloaded file will be <em>My Awesome Zip File.zip</em>.</p>
</description>
<pubDate>Wed, 23 Oct 2013 00:00:00 +0530</pubDate>
<link>http://www.arkaroy.net/blog/download-zip-file-dynamically-with-php/</link>
<guid isPermaLink="true">http://www.arkaroy.net/blog/download-zip-file-dynamically-with-php/</guid>
<category>blog</category>
</item>
<item>
<title>How to Add Scalable Vector Graphics (SVG) to Web Page</title>
<dc:creator>Arka Roy</dc:creator>
<description><p>Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999. SVG images and their behaviors are defined in XML text files.</p>
<p>If you want to embed your hand-crafted SVG in your web page, you can use any of the methods discussed below.</p>
<p><br /></p>
<h2 id="using-object-tag">Using <code>&lt;object&gt;</code> Tag</h2>
<p>If you intend using any advanced SVG features such as CSS and scripting, the HTML5 <object> tag is your best option:</object></p>
<pre><code>&lt;object type="image/svg+xml" data="the-image.svg"&gt;Your browser does not support SVG.&lt;/object&gt;
</code></pre>
<p>You can provide fallback text or images within the <code>object</code> block.</p>
<p><br /></p>
<h2 id="using-embed-tag">Using <code>&lt;embed&gt;</code> Tag</h2>
<p>Although it’s similar to <code>&lt;object&gt;</code>, <code>&lt;embed&gt;</code> never has been and probably never will be part of any HTML or XHTML specification. However, it’s supported by most browsers and is often used to implement Flash plugins.</p>
<pre><code>&lt;embed type="image/svg+xml" src="the-image.svg" /&gt;
</code></pre>
<p><br /></p>