-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Textile formatting on README"
This reverts commit 3410b3f.
- Loading branch information
David Sauve
committed
Dec 9, 2009
1 parent
3410b3f
commit a157150
Showing
1 changed file
with
24 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,51 @@ | ||
h1. haystack_static_pages | ||
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. | ||
|
||
|
||
h2. Usage: | ||
Usage: | ||
------ | ||
|
||
# Setup and install Haystack. | ||
# Add haystack_extensions to your INSTALLED_APPS in `settings.py` | ||
# Add HAYSTACK_STATIC_PAGES to your `settings.py`. | ||
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`. | ||
|
||
HAYSTACK_STATIC_PAGES = ( | ||
'static-about_us', # A named url | ||
'static-help', # Another named url | ||
'http://example.com/', # A full url | ||
) | ||
|
||
# ./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. | ||
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. | ||
|
||
h2. Notes: | ||
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. | ||
|
||
h2. Source | ||
Source | ||
------ | ||
|
||
http://github.com/trapeze/haystack-static-pages/ | ||
|
||
|
||
h2. Credits | ||
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>. | ||
|
||
h2. License | ||
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. |