Skip to content

Commit

Permalink
Textile formatting on README
Browse files Browse the repository at this point in the history
  • Loading branch information
David Sauve committed Dec 9, 2009
1 parent 1ab5278 commit 3410b3f
Showing 1 changed file with 17 additions and 24 deletions.
41 changes: 17 additions & 24 deletions README
Original file line number Diff line number Diff line change
@@ -1,51 +1,44 @@
haystack_static_pages
=====================
h1. haystack_static_pages

"Haystack Static Pages" is an extension library for Haystack. Currently, it adds the ability to index static pages through the use of a `settings.py` variable and command extension.


Usage:
------
h2. Usage:

1. Setup and install Haystack.
1. Add haystack_extensions to your INSTALLED_APPS in `settings.py`
1. Add HAYSTACK_STATIC_PAGES to your `settings.py`.
# Setup and install Haystack.
# Add haystack_extensions to your INSTALLED_APPS in `settings.py`
# Add HAYSTACK_STATIC_PAGES to your `settings.py`.

HAYSTACK_STATIC_PAGES = (
'static-about_us', # A named url
'static-help', # Another named url
'http://example.com/', # A full url
)

1. ./manage.py syncdb to create the necessary tables.
1. ./manage.py crawl_static_pages to populate the database with the static page content. This is needed for Haystack to properly map the urls to the content. Output should indicate which pages were crawled and where, as well as the total number of pages found.
1. ./manage.py reindex to create the search indexes used by Haystack. You should see a note about how many static pages were indexed. The number of static pages indexed should match the number of static pages created in the step above.
# ./manage.py syncdb to create the necessary tables.
# ./manage.py crawl_static_pages to populate the database with the static page content. This is needed for Haystack to properly map the urls to the content. Output should indicate which pages were crawled and where, as well as the total number of pages found.
# ./manage.py reindex to create the search indexes used by Haystack. You should see a note about how many static pages were indexed. The number of static pages indexed should match the number of static pages created in the step above.

Notes:
------
h2. Notes:

* Each page indexed will have the following attributes available:

* title -- The title as defined in a <title> tag
* url -- The url of the page
* description -- A short escription as taken from any existing <meta name="description"> tag
* content -- The page content.
** title -- The title as defined in a <title> tag
** url -- The url of the page
** description -- A short escription as taken from any existing <meta name="description"> tag
** content -- The page content.

* Because the `crawl_static_pages` command can only index content as rendered, it must be able to access the pages when run. This means, that when using named urls, the site must be accessible at the location specified in `Site.get_current().domain`.
* The `-p` option can be used to specify the port number when executing the `crawl_static_pages` command.

Source
------
h2. Source

http://github.com/trapeze/haystack-static-pages/


Credits
-------
h2. Credits

haystack-static-pages is maintained by David Sauve<mailto:[email protected]>, and is funded by Trapeze<http://www.trapeze.com>.
haystack-static-pages is maintained by {David Sauve}[<mailto:[email protected]], and is funded by Trapeze[http://www.trapeze.com].

License
-------
h2. License

haystack-static-pages is Copyright © 2009 David Sauve, Trapeze. It is free software, and may be redistributed under the terms specified in the LICENSE file.

0 comments on commit 3410b3f

Please sign in to comment.