Skip to content

Commit

Permalink
add uid to file content on opf generation
Browse files Browse the repository at this point in the history
  • Loading branch information
TomWoodward committed Feb 17, 2014
1 parent 928d131 commit e595c07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/gh-book/opf-file.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ define [
if not @id
@setNew()
@id = "content/#{uuid(@get('title'))}.opf"
@$xml.find('#uid').text(uuid(@get('title')))

# For TocNode, let it know this is the root
super options
Expand Down Expand Up @@ -115,6 +116,7 @@ define [
if not skipSave
setNavModel({})
@_save()

if @_isNew
now = new Date()
@set('datePublished', "#{now.getFullYear()}-#{now.getMonth()+1}-#{now.getDate()}")
Expand Down

0 comments on commit e595c07

Please sign in to comment.