Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search #34

Merged
merged 10 commits into from
Sep 26, 2017
Merged

Search #34

merged 10 commits into from
Sep 26, 2017

Commits on Sep 19, 2017

  1. Update search index generator template

    The Go template that produces the search index has been overhauled in order to
    handle the special case of "absract-only" pages. These are still classified as
    "Essay" type but they have no content, only `abstract` frontmatter data.
    
    The desired behavior for search is that on these pages, the user should be taken
    to the section-head page that this abstract appears in if they choose a result
    of this type.
    
    In Go, the different cases (normal vs abstract-only pages) are handled via
    conditional assignment of block-scoped variables in the local .Scratch (as
    opposed to the page-level $.Scratch).
    
    The additional logic comes into play if the length of a given page's .Content is
    0 (i.e. empty). In that case, the abstract content is used instead, and instead
    of using the normal .RelPermalink for the page, the URL data is set as the
    relref of the page's parent section (figured out with a crude hack for now -
    taking the name of the $page.Section value and adding "/index.md" on the end).
    egardner committed Sep 19, 2017
    Configuration menu
    Copy the full SHA
    dd904e1 View commit details
    Browse the repository at this point in the history
  2. Use .Site.RegularPages instead of .Site.Pages for index

    This removes some of Hugo's auto-generated pages for things like "Categories",
    "Tags", etc. which are not being used in this project.
    egardner committed Sep 19, 2017
    Configuration menu
    Copy the full SHA
    e387426 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2017

  1. Basic Search page now working

    This needs a pass for QA as well as UI, but the basic functionality is now
    working. Previous projects set this feature as something available on all pages;
    in this book the user needs to navigate to the /search page to access this
    screen. This simplifies things both in terms of CSS layout, but also performance
    issues (the search index is 1MB, and now it doesn't need to be made available on
    all pages, just the search-specific page).
    
    A "search.md" page has been added to the contents folder. Any content here
    will not show up, but we need to tell Hugo to build a page using the search
    layout at this URL.
    
    The global `baseof.html` template has been modified so that the search link now
    appears in all of them (not the search button and results partial from before).
    A new search/single.html layout has been added to the base theme which handles
    this content instead.
    
    Finally, the main UI.js file has been re-worked a bit to accommodate the new
    behavior.
    egardner committed Sep 20, 2017
    Configuration menu
    Copy the full SHA
    bdbe007 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    87b7b23 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    af940a7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1d15e6d View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2017

  1. Build out search page as Vue.js component

    Rebuilds the search feature as a stand-alone Vue.js component for improved UX.
    The new version of this feature supports the following:
    
    * "Loading..." message until the search data is loaded
    * Debounced input for the search query
    * Getting user input, displaying results, etc. is much clearer in the code
      thanks to Vue's api (as opposed to doing everything manually with jQuery).
    egardner committed Sep 21, 2017
    Configuration menu
    Copy the full SHA
    77649a6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ed8cd2b View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2017

  1. Take page out of linear reading order

    Adding the `online: false` parameter removes the page from the linear
    reading order of the publication. This commit also hides the previous
    and next arrows in the upper navigation bar, to make the search page
    more of a standalone.
    geealbers committed Sep 25, 2017
    Configuration menu
    Copy the full SHA
    56a32c2 View commit details
    Browse the repository at this point in the history
  2. Add arial search role

    geealbers committed Sep 25, 2017
    Configuration menu
    Copy the full SHA
    6195c5e View commit details
    Browse the repository at this point in the history