Add doc/type pages to the search index

Closes #55.
pull/62/merge
Thibaut 11 years ago
parent 68b2911738
commit 32906bccc6

@ -71,7 +71,10 @@
return return
start: -> start: ->
@entries.add doc.entries.all() for doc in @docs.all() for doc in @docs.all()
@entries.add doc.toEntry()
@entries.add type.toEntry() for type in doc.types.all()
@entries.add doc.entries.all()
@trigger 'ready' @trigger 'ready'
@router.start() @router.start()
@hideLoading() @hideLoading()

@ -6,3 +6,9 @@ class app.models.Type extends app.Model
entries: -> entries: ->
@doc.entries.findAllBy 'type', @name @doc.entries.findAllBy 'type', @name
toEntry: ->
new app.models.Entry
doc: @doc
name: "#{@doc.name} / #{@name}"
path: '..' + @fullPath()

@ -24,7 +24,10 @@ newsItem = (date, news) ->
result result
app.news = [ app.news = [
[ 1390694400000, # January 26, 2013 [ 1392163200000, # February 12, 2013
""" The root/category pages are now included in the search index (e.g. <a href="/#q=CSS">CSS</a>) """,
], [
1390694400000, # January 26, 2013
""" Updated <a href="/angular/">Angular.js</a> documentation """, """ Updated <a href="/angular/">Angular.js</a> documentation """,
], [ ], [
1390089600000, # January 19, 2013 1390089600000, # January 19, 2013

Loading…
Cancel
Save