pages build and deployment #2
pages-build-deployment
on: dynamic
build
21s
report-build-status
3s
deploy
0s
Annotations
1 error
build
Logging at level: debug Configuration file: /github/workspace/./_config.yml GitHub Pages: github-pages v232 GitHub Pages: jekyll v3.10.0 Theme: jekyll-theme-primer Theme source: /usr/local/bundle/gems/jekyll-theme-primer-0.6.0 Requiring: jekyll-github-metadata Requiring: jekyll-seo-tag Requiring: jekyll-relative-links Requiring: jekyll-seo-tag Requiring: jekyll-coffeescript Requiring: jekyll-commonmark-ghpages Requiring: jekyll-gist Requiring: jekyll-github-metadata Requiring: jekyll-paginate Requiring: jekyll-optional-front-matter Requiring: jekyll-readme-index Requiring: jekyll-default-layout Requiring: jekyll-titles-from-headings GitHub Metadata: Initializing... Source: /github/workspace/. Destination: /github/workspace/./_site Incremental build: disabled. Enable with --incremental Generating... EntryFilter: excluded /package.json EntryFilter: excluded /Makefile EntryFilter: excluded /README.md EntryFilter: excluded /practicals/modular-todo-app EntryFilter: excluded /practicals/modular-mobile-app EntryFilter: excluded /practicals/qunit-koans EntryFilter: excluded /practicals/exercise-2 EntryFilter: excluded /practicals/jasmine-koans EntryFilter: excluded /practicals/todo-jqm-app EntryFilter: excluded /practicals/stacks EntryFilter: excluded /build/share.html EntryFilter: excluded /build/stats.html EntryFilter: excluded /build/title.txt EntryFilter: excluded /build/author.html EntryFilter: excluded /build/metadata.xml EntryFilter: excluded /build/head.html EntryFilter: excluded /build/INSTRUCTIONS-pandoc-ebooks.md Generating: JekyllOptionalFrontMatter::Generator finished in 0.002036816 seconds. Generating: JekyllReadmeIndex::Generator finished in 6.8499e-05 seconds. Generating: JekyllRelativeLinks::Generator finished in 0.104117579 seconds. Generating: Jekyll::Paginate::Pagination finished in 6.733e-06 seconds. Generating: JekyllDefaultLayout::Generator finished in 0.0016647 seconds. Requiring: kramdown-parser-gfm Generating: JekyllTitlesFromHeadings::Generator finished in 0.012388893 seconds. Rendering: assets/css/style.scss Pre-Render Hooks: assets/css/style.scss Rendering Markup: assets/css/style.scss Rendering: INSTRUCTIONS-pandoc-ebooks.md Pre-Render Hooks: INSTRUCTIONS-pandoc-ebooks.md Rendering Markup: INSTRUCTIONS-pandoc-ebooks.md Rendering Layout: INSTRUCTIONS-pandoc-ebooks.md Layout source: theme GitHub Metadata: Generating for addyosmani/backbone-fundamentals GitHub Metadata: Calling @client.repository("addyosmani/backbone-fundamentals", {:accept=>"application/vnd.github.drax-preview+json"}) Rendering: backbone-fundamentals.md Pre-Render Hooks: backbone-fundamentals.md Rendering Liquid: backbone-fundamentals.md github-pages 232 | Error: Liquid syntax error (line 4200): Tag '{%> <%= keyobj.keyword %><% } ); %></li> ``` Here I iterate over the keywords array using the Underscore `each` function and print out every single keyword. Note that I display the keyword using the <%= tag. This will display the keywords with spaces between them. Reloading the page again should look quite decent: ![](/backbone-fundamentals/img/chapter5-10.png) Now go ahead and delete a book and then reload the page: Tadaa! the deleted book is back! Not cool, why is this? This happens because when we get the BookModels from the server they have an _id attribute (notice the underscore), but Backbone expects an id attribute (no underscore). Since no id attribute is present, Backbone sees this model as new and deleting a new model doesn’t need any synchronization. To fix this, we can use the parse function of Backbone.Model. The parse function lets you edit the server response before it is passed to the Model constructor. Add a parse method to the Book model: ```javascript parse: function( response ) { response.id = response._id; return response; } ``` Simply copy the value of _id to the needed id attribute. If you reload the page, you will see that models are actually deleted on the server when you press the delete button. Another, simpler way of making Backbone recognize _id as its unique identifier is to set the idAttribute of the mode
|