Commit d23bebbb authored by Hiren Patel's avatar Hiren Patel

Public entries supported by default

parent 649e4d52
require 'jekyll/scholar'
require 'jekyll/scholar/extras/extra_utils'
require 'jekyll/scholar/extras/bibliography_hdp'
require 'jekyll/scholar/extras/details_hdp'
......@@ -3,6 +3,7 @@ module Jekyll
class BibliographyHDPTag < Liquid::Tag
include Scholar::Utilities
include ScholarExtras::Utilities
def initialize(tag_name, arguments, tokens)
super
......@@ -15,7 +16,7 @@ module Jekyll
set_context_to context
year_section = ''
references = entries.map do |entry|
references = public_entries.map do |entry|
reference = ''
ref = ''
......
module Jekyll
class Scholar
class ScholarExtras
module ExtraUtilities
module Utilities
attr_reader :bibtex_file, :config, :site
......@@ -17,9 +17,9 @@ module Jekyll
@bibliography ||= BibTeX.open(bibtex_path, bibtex_options)
end
def entries_public
puts 'entries public only'
b = bibliography[config['query']]
def public_entries
b = bibliography['@*[public!=no]']
# b = bibliography[config['query']]
unless config['sort_by'] == 'none'
b.sort_by! { |e| e[config['sort_by']].to_s }
......
......@@ -29,4 +29,4 @@ scholar:
bibliography: test.bib
details_dir: ./publications/details
details_layout: details.html
query: "@*[public!=no]"
#query: "@*[public!=no]"
......@@ -29,6 +29,7 @@
pages = {674-681},
title = {commentary on action in perception},
volume = {76},
public = {yes},
year = {2008}}
@article{martin:2008kl,
......@@ -42,5 +43,6 @@
pages = {674-681},
title = {commentary on action in perception},
volume = {76},
public = {no},
year = {2008}}
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