Compare commits

...

1333 Commits

Author SHA1 Message Date
Dawa Ometto 0870655455 Release 4.1.1 2017-04-17 11:20:06 +02:00
Dawa Ometto ba24a7bb8c Update gemijione dependency. Closes #1227 2017-04-17 11:01:50 +02:00
Dawa Ometto f32d7465a2 Set bar_side for versioned pages. Closes #1226 2017-04-14 00:31:09 +02:00
Dawa Ometto e202698bf1 Merge pull request #1189 from nimag42/patch-1
Solve bug when folder contains non-ascii character
2017-04-09 11:49:54 +02:00
Dawa Ometto 11c2bf7dae Fix date. Closes #1211 2017-04-05 23:05:24 +02:00
Dawa Ometto 53cf0e1148 Merge pull request #1201 from adamniedzielski/skip-transliteration-tests-rugged
Skip tests for transliteration for adapters different than grit
2017-03-11 20:35:53 +01:00
Adam Niedzielski 2d1e49e3f2 Skip tests for transliteration for adapters different than grit 2017-03-11 19:28:31 +01:00
Dawa Ometto 199161f611 Merge pull request #1188 from adamniedzielski/pass-non-empty-author-details
Pass non-empty commit author details in transliteration test
2017-03-10 12:00:57 +01:00
Dawa Ometto ece5c775f1 Release 4.1.0 2017-03-09 17:34:37 +01:00
Dawa Ometto 3121c43b71 Merge pull request #1180 from bogado/issue#1179
Fix page list for files that have regexp special chars.
2017-03-09 16:22:40 +01:00
Bart Kamphorst 51e8caf369 Merge pull request #1191 from polyzen/patch-1
readme: Use --document in place of deprecated options
2017-02-16 16:05:35 +01:00
Daniel M. Capella e7e7937678 readme: Use --document in place of deprecated options 2017-02-02 14:26:32 -05:00
Jacquin Théo a0f5a60ea0 Solve bug when folder contain non-ascii character
When you create a file in a folder with non-ascii character, for exemple "Réseau", after creating the page, it throwed an "URI::InvalidURIError", given the fact that the url returned was "/Réseau/H%C3%A9y", only the part with the name of the file was correctly encoded.

So I propose to encode every part of the url to solve this issue
So I just
2017-01-29 00:39:39 +01:00
Adam Niedzielski af29c6e441 Pass non-empty commit author details in transliteration test
Empty name or email are not allowed by libgit2 and cause a test failure
when the test suite is run against rugged_adapter.
2017-01-27 15:15:50 +01:00
Dawa Ometto 00dfecb1c7 Merge pull request #1185 from connorshea/ruby-24
Test on Ruby 2.4
2017-01-20 23:30:24 +01:00
Dawa Ometto cc249bef15 Merge pull request #1182 from bjoernalbers/master
Add another video to README.
2017-01-19 15:14:11 +01:00
Connor Shea 9a2231804d Test on Ruby 2.4 2017-01-14 19:10:17 -05:00
Björn Albers 1edcf15bcd Add another video to README. 2017-01-10 18:26:56 +01:00
Victor Bogado 0190e08763 Fix page list for files that have regexp special chars.
The page list collection logic was using the filename without any
scaping to create a regexp. This not only breaks for some names it might
even be a security problem by introducing bad regular expression as
filenames.
2017-01-01 19:55:18 -08:00
Dawa Ometto d3cc5a69c4 Merge branch 'rc' 2016-08-07 21:36:51 +02:00
Dawa Ometto 07ca53a778 Merge branch 'rc' into master
Conflicts:
	bin/gollum
2016-08-07 21:36:13 +02:00
Dawa Ometto 6910b6d024 Merge pull request #1143 from astorije/patch-1
Fix compare page not accessible in no-edit mode. Resolves #1140.
2016-08-07 20:17:34 +02:00
Bart Kamphorst f02c934ad7 Merge pull request #1154 from maarten/#855-delete-files
Fixes #855 Adds file deletion fuctionality.
2016-08-07 19:46:55 +02:00
Maarten Engelen 236680aab9 Add file deletion functionality
Adds route for file deletion
Add styles and images for this
2016-08-07 17:18:36 +02:00
Dawa Ometto 6316f97c06 Update CONTRIBUTING.md 2016-08-07 12:50:48 +02:00
Dawa Ometto 14830af306 Update CONTRIBUTING.md 2016-08-07 12:50:18 +02:00
Dawa Ometto b620decde7 Add contributing guidelines 2016-08-07 12:48:07 +02:00
Bart Kamphorst b08ca620a0 Merge pull request #1148 from astorije/patch-2
Remove deprecated github-markdown markup
2016-07-11 21:44:02 +02:00
Jérémie Astori 66a2bb0393 Remove deprecated github-markdown markup
From [RubyGems](https://rubygems.org/gems/github-markdown/versions/0.6.9):

> THIS GEM IS NOT MAINTAINED AND NOT SUPPORTED.

Also, the GitHub repository, maintained by GitHub, was removed.

The link is now a redirect, it doesn't point to the GFM page anymore.
2016-07-11 12:19:43 -04:00
Jérémie Astori 0675844d97 Fix compare page not accessible in no-edit mode
Permission checking was spread across `post` action handlers instead of inside the `before` to normalize between `get` and `post` action handlers and be more explicit.
2016-06-27 13:50:47 -04:00
Dawa Ometto 148eda2990 Merge pull request #1136 from gollum/503-safari-live
Add Safari to livepreview-enabled browsers. Fixes #503
2016-06-16 13:28:46 +02:00
Dawa Ometto 330f7b4002 Add Safari to livepreview-enabled browsers. Fixes #503 2016-06-16 12:58:22 +02:00
Dawa Ometto def0fc8866 Merge pull request #1126 from svoop/emoji
Support for emoji
2016-06-09 16:43:52 +02:00
Sven Schwyn fa1bcf9608 Add support for emojione 2016-05-19 20:33:25 +02:00
Bart Kamphorst 5a5e56a47b Merge pull request #1111 from jhominal/master
Unconditionally add 'test-unit' dependency.
2016-02-24 02:28:24 +01:00
Jean Hominal e64f40eaa3 Unconditionally add 'test-unit' dependency.
Fixes #1110
2016-02-23 22:52:07 +01:00
Dawa Ometto 3f3d86ad4c Merge pull request #1091 from jhominal/master
Use `last_version` instead of `versions` when possible. Fixes #1087.
2016-02-21 22:51:40 +01:00
Jean Hominal 91833dd72e Use last_version instead of versions when possible. Fixes #1087.
Use Gollum::Page#last_version instead of Gollum::Page#versions in the
cases identified in #1087:
 * In Precious::App#show_page_or_file
 * In Precious::Views::Page#author
 * In Precious::Views::Page#date
2016-02-14 23:15:38 +01:00
Bart Kamphorst c049f7c11f Merge pull request #1106 from gollum/youtube_demo_vids
Adds links to youtube videos in README.
2016-01-14 17:01:28 +01:00
Bart Kamphorst 6bd2f3bff5 Drop 1.9.3 testing on Travis, add 2.3.0. 2016-01-10 15:28:23 +01:00
Bart Kamphorst 8c3c519679 Adds links to youtube videos in README. 2016-01-10 11:49:34 +01:00
Dawa Ometto 4e5002a31e Merge pull request #1098 from andrehjr/gh-1066-sanitize-basepath
Sanitize basepath options when adding with more than one / at the start Fixes #1066.
2015-12-30 18:39:30 +01:00
André Luis Leal Cardoso Junior 5a53c58b04 Sanitize basepath options when adding with more than one / at the start. Fixes #1066 2015-12-05 23:23:22 -02:00
Bart Kamphorst a61d1e3d10 Merge pull request #1094 from repotag/master
Update kramdown and useragent dependencies.
2015-11-30 11:26:51 +01:00
Bart Kamphorst 1a50f99189 Merge branch 'master' of https://github.com/gollum/gollum 2015-11-30 00:28:30 +01:00
Bart Kamphorst 6caacbf388 Update kramdown and useragent dependencies. 2015-11-30 00:28:01 +01:00
Dawa Ometto f876aa7d0f Merge pull request #1077 from mpnowacki/renaming
fixed file renaming issues with page_file_dir
2015-11-02 11:42:50 +01:00
Dawa Ometto 31e1281600 Merge pull request #1086 from ngyuki/fix-preview-sidebar
Fix position of sidebar in preview
2015-11-02 11:42:25 +01:00
ngyuki 90072a9332 Fix position of sidebar in preview 2015-11-02 12:45:30 +09:00
Dawa Ometto bacd2893b9 Merge pull request #1084 from SkyCrawl/master
Fixing the vague "running from source" description in README
2015-10-25 13:20:17 +01:00
SkyCrawl 7362fd859b Fixing the "running" section 2015-10-25 13:12:36 +01:00
mpnowacki 3811fb46b3 fixed file renaming issues with page_file_dir. This will only work with appropriate changes in gollum-lib 2015-10-04 11:34:25 +02:00
Dawa Ometto ab42c0c0df Release 4.0.1 2015-09-20 14:48:32 +02:00
Bart Kamphorst de5aed2f6a Merge pull request #1069 from repotag/master
Added security check.
2015-09-20 14:31:14 +02:00
Bart Kamphorst ce68a88293 Added security check. 2015-09-20 13:53:02 +02:00
Dawa Ometto 288f75929d Merge pull request #1065 from n-st/sysv-init-script
Added init script for Debian's SysV-style init system
2015-09-16 12:52:38 +02:00
Dawa Ometto 8528dd0c7f Merge pull request #1067 from SkyCrawl/master
Fixing the link to Windows support meta issue
2015-09-14 17:55:18 +02:00
SkyCrawl e0f35eceab Fixing the link to Windows support meta issue 2015-09-14 17:31:25 +02:00
Dawa Ometto 7e36517a79 Merge pull request #1054 from SkyCrawl/master
Config files restored + BIN enhancements + BIN/README sync
2015-09-14 12:40:22 +02:00
Dawa Ometto 69327766bb Merge pull request #1061 from rgroux/gollum-with-cas-sso
README add link to wiki about CAS SSO
2015-09-14 12:38:35 +02:00
Nils Steinger 9ecf8a61ba Added init script for Debian's SysV-style init system
Adapted from the OpenRC init script in contrib/openrc/init.d/gollum.
2015-09-14 05:03:06 +02:00
Richard Groux 2323506c82 Update README.md 2015-09-10 18:14:59 +02:00
Bart Kamphorst caa1a55e7a Merge pull request #1062 from mortonfox/patch-1
Fix github-markup link in readme.
2015-08-26 09:49:56 +02:00
Morton Fox 2ce44c157a Fix github-markup link 2015-08-25 23:48:53 -04:00
rgroux e17778190d README add link to wiki about CAS SSO 2015-08-25 17:06:36 +02:00
SkyCrawl d1d81a0043 Syncing BIN with README + fixes & enhancements 2015-08-23 14:44:18 +02:00
SkyCrawl ddb5ced3d5 Updating gemspec to reflect recent changes 2015-08-23 14:43:46 +02:00
Bart Kamphorst 9cebe655fd Merge pull request #1060 from mchill/custom-template
Fix custom.x path when page-file-dir is not set
2015-08-21 14:11:02 +02:00
Matt Hill 51b5a11a54 Fix custom.x path when page-file-dir is not set 2015-08-20 23:19:25 -04:00
Bart Kamphorst f3405851a7 Merge pull request #1055 from repotag/webrick_fix
Add webrick as development dependency. Fixes #1053.
2015-08-14 11:42:17 +02:00
Bart Kamphorst 5b6870d610 Add webrick as development dependency. Fixes #1053. 2015-08-14 11:06:17 +02:00
SkyCrawl c3dceaff5c Adding reference to the "Troubleshoot" wiki page 2015-08-12 22:26:59 +02:00
SkyCrawl 0a9b35c039 Restoring config files to repo root 2015-08-12 22:26:20 +02:00
Dawa Ometto dc32997f45 Merge pull request #1051 from SkyCrawl/master
Docs update
2015-08-09 20:30:21 +02:00
SkyCrawl 67c64c17d5 README makeover 2015-08-09 19:22:16 +02:00
Dawa Ometto 9cc02982be Merge pull request #973 from hsanson/add-plantuml-opt
Add option to configure PlantUML endpoint
2015-08-09 19:15:02 +02:00
SkyCrawl b4c70a62a9 Removing Home.md due to being a mere lorem ipsum 2015-08-08 15:21:30 +02:00
SkyCrawl c9d5921f4e Moving docs/sanitization.md to the wiki 2015-08-08 15:21:00 +02:00
SkyCrawl 0f47a4de5d Removing config.rb due to being pointless 2015-08-08 15:20:35 +02:00
Dawa Ometto 0ba5e4d3c7 Merge pull request #1047 from benubird/custom-template
Changed layout template, to handle custom.x with page-file-dir
2015-08-05 14:51:51 +02:00
Joshua Swanson 73e61dbcff Changed layout template, to correctly handle custom.js when --page-file-dir is set 2015-08-05 13:26:19 +01:00
Bart Kamphorst ba142e3b19 Merge pull request #1038 from rgroux/development
upgrade/update a number of dependencies.
2015-07-27 22:14:55 +02:00
GROUX Richard f651a401e8 deps(update): test with ruby 2.2.2
need to add `test-unit` gem when using ruby >= 2.2.0
2015-07-27 13:49:03 +02:00
GROUX Richard 3301252fb2 deps(update): twitter_cldr update to > 3.2
Changelog is
[there](https://github.com/twitter/twitter-cldr-rb/blob/master/History.txt)
2015-07-27 13:20:50 +02:00
GROUX Richard fe77e2b0d3 deps(update): upgrade the mocha version to 1.1
Changelog is
[there](https://github.com/freerange/mocha/blob/master/RELEASE.md)
2015-07-27 13:16:29 +02:00
GROUX Richard d586567c3b deps(update): upgrade the useragent version to 0.14 2015-07-27 13:15:50 +02:00
GROUX Richard 211178d39e deps(update): upgrade the kramdown version to 1.8
Changelog of kramdown is [there](http://kramdown.gettalong.org/news.html)
2015-07-27 13:12:48 +02:00
Dawa Ometto d8354faa49 Merge pull request #1035 from rgroux/search
Search default query to ''
2015-07-26 20:23:09 +02:00
GROUX Richard f9e5c05046 Fix search without querry
App crash when we try to get /search

Add an empty querry '' as default
2015-07-21 19:35:45 +02:00
Dawa Ometto 596afe9451 Merge pull request #1034 from mehulkar/patch-1
Fix a typo in the readme
2015-07-16 23:35:51 +02:00
Mehul Kar f7b5de986a Fix a typo in the readme 2015-07-16 13:57:11 -07:00
Bart Kamphorst ee9262472b Merge pull request #1032 from techwiz24/iss1030-ie-cache
Fix #1030: Disable AJAX Cach in Live Editor
2015-07-12 19:09:04 +02:00
Nathan Lowe 8a6a8db730 Fix #1030: Disable AJAX Cach in Live Editor
Internet Explorer caches all AJAX get requests and decides when to expire
them in the cache. This commit disables caching on the GET request to
/data/<PAGE NAME>, which fixes IE displaying old page data when using the
live editor.

See http://www.dashbay.com/2011/05/internet-explorer-caches-ajax/ and
https://stackoverflow.com/questions/4303829/how-to-prevent-a-jquery-ajax-request-from-caching-in-internet-explorer
2015-07-03 17:28:43 -04:00
Bart Kamphorst 3642370f11 Merge pull request #1014 from techwiz24/iss/1012-pages-view
Fix #1012: /Pages View should list folders first, then files, all alphabetically.
2015-05-21 02:15:57 +02:00
Nathan Lowe 2db2cfb81c Update test coverage to account for #1012
The existing 'files_folders' test only covered the /Mordor subdirectory,
which does not include a diverse enough set of pages and folders to account
for the new rendering logic.

This test uses the results from the root of the lotr.git example repository
as it exists at this point in time. The mock '@results' are not passed as a
sorted array in order to test the sorting logic.

The existing 'files_folders' test has been renamed to 'files_folders from subdir'
because the 'files_folders' function should be tested in a situation when
viewing /pages from a subdirectory to ensure proper functionality.
2015-05-20 18:58:24 -04:00
Nathan Lowe 279b028c5e Fix #1012: /Pages should render Folders First, then files, alphabetically 2015-05-20 18:58:10 -04:00
Dawa Ometto f268827a2e Merge pull request #995 from tfogo/html-cleanup
Remove extraneous li tags
2015-04-26 19:05:00 +02:00
Dawa Ometto d8bc065057 Merge pull request #1003 from akston/readme_typo
Fix typo in README
2015-04-26 19:04:26 +02:00
Conor Schaub 6301bbbb66 Fix typo in README 2015-04-25 15:32:30 -07:00
Dawa Ometto 3ad65eaef8 Update README.md 2015-04-11 11:53:59 +02:00
Dawa Ometto 3d1bc7949d Update README.md 2015-04-11 11:43:40 +02:00
Dawa Ometto 26e092fd20 Update HISTORY.md 2015-04-11 11:42:21 +02:00
Dawa Ometto be7ddec1b0 Update README.md 2015-04-11 11:40:43 +02:00
Dawa Ometto 5781ac6bbd Release 4.0.0 2015-04-11 11:32:03 +02:00
Dawa Ometto a51bc4427a Merge pull request #994 from repotag/kramdown
Move to Kramdown and support JRuby
2015-04-11 11:07:34 +02:00
Dawa Ometto 80854584bb Make test regex more lenient 2015-04-11 01:29:08 +02:00
Tim Fogarty 93af289d3b Remove extraneous li tags 2015-04-06 02:40:02 -04:00
Dawa Ometto a27b882493 Test on jruby 2015-04-06 00:57:18 +02:00
Dawa Ometto ba6f957692 Move to Kramdown 2015-04-06 00:28:31 +02:00
Dawa Ometto ec0e1bf26f Merge pull request #992 from kirat-singh/fix-upload-file-url
prepend baseUrl to /uploadFile
2015-04-05 23:34:07 +02:00
Kirat Singh e4df298bb4 prepend baseUrl to /uploadFile 2015-04-05 14:22:41 -04:00
Dawa Ometto 804d21e31d Release 3.1.3 2015-04-04 11:45:17 +02:00
Dawa Ometto 6d33687866 Merge pull request #990 from repotag/issue940
Block on no-edit without using middleware
2015-04-03 17:32:20 +02:00
Dawa Ometto 21bb1efb46 Block on no-edit without using middleware 2015-04-03 17:22:51 +02:00
Dawa Ometto 9d0986f1ca Merge pull request #964 from simonzack/mathjax_livepreview
Enable mathjax in live preview
2015-04-02 13:13:25 +02:00
Bart Kamphorst fd483f397f Merge pull request #988 from andrewarrow/fix_template_dir
adding template dir logic to app.rb vs. just the bin
2015-03-30 13:27:54 +02:00
Andrew Arrow 09364850ee adding template dir logic to app.rb vs. just the bin 2015-03-27 15:13:55 -07:00
Dawa Ometto 4d3a8bad4c Merge pull request #985 from uraimo/patch-1
Fixed two broken links in README.md
2015-03-13 14:40:19 +01:00
Umberto Raimondi cc39b0aa41 Fixed two broken links in README.md
The textile site was shut down a few years ago, better refer to wiki for format details.
2015-03-13 14:28:04 +01:00
Horacio Sanson 1cceb7d4b4 Add option to configure PlantUML endpoint 2015-02-05 01:10:12 +09:00
Dawa Ometto 6fc3b4be75 Merge pull request #970 from repotag/issue969
Add root slash to drag-and-drop upload path. Resolves #969.
2015-01-30 22:13:01 +01:00
Dawa Ometto af6d690fc8 Add root slash to drag-and-drop upload path. Resolves #969. 2015-01-30 22:06:31 +01:00
Dawa Ometto eea5152444 Update README.md 2015-01-30 18:34:18 +01:00
Dawa Ometto 1ca38b625b Update README.md 2015-01-30 18:33:52 +01:00
Sunny Ripert f964407c47 Merge pull request #965 from simonzack/ace_hook
added an initAce hook to allow configuration of the live editor
2015-01-28 17:00:43 +01:00
simonzack 3be2e76ec0 enable $ inline expressions so the example markdown doc works, $ can be escaped using \$ so shouldn't be much of an issue 2015-01-28 19:06:24 +11:00
simonzack f9a9b90ed7 enable mathjax in live preview 2015-01-28 18:00:35 +11:00
Dawa Ometto 1f2917ac22 Merge pull request #959 from simonzack/ace_update
Updated ace so markdown highlights better.
2015-01-27 17:51:47 +01:00
simonzack fe1a8569f6 updated ace 2015-01-27 22:46:30 +11:00
simonzack 33e8d4f328 added an initAce hook to allow configuration of the live editor 2015-01-27 21:16:05 +11:00
Dawa Ometto e183260d0a Merge pull request #956 from repotag/issue_955
Resolves #955.
2015-01-26 23:16:50 +01:00
Dawa Ometto b4023942b4 Remove page file dir from upload path 2015-01-26 23:10:28 +01:00
Dawa Ometto c10c24d90d Merge pull request #953 from simonzack/master
Resolves #952.
2015-01-25 18:45:17 +01:00
simonzack 915f63cac4 pixel tweaks so the left scrollbar is selectable and the viewport takes the whole page 2015-01-26 04:15:14 +11:00
Dawa Ometto 5c30ff4d3e Release 3.1.2 2015-01-23 00:27:04 +01:00
Dawa Ometto 3269f02ba7 Merge pull request #950 from repotag/fix_allow_editing
Set the allow_editing wiki option to true by default.
2015-01-23 00:26:22 +01:00
Dawa Ometto e5c2e3b3eb Set the allow_editing wiki option to true by default. 2015-01-23 00:14:13 +01:00
Dawa Ometto 77f4aee0af Fix test related to gollum-lib TOC update 2015-01-23 00:00:01 +01:00
Dawa Ometto 868cbdfc7b Merge pull request #936 from techwiz24/iss922-sort-pages
Sort `/pages` alphabetically. Resolves #922.
2015-01-13 10:18:51 +01:00
Nathan Lowe a650c0eab8 Sort /pages alphabetically
Previously, the 'All Pages' view was not sorted alphabetically. We need
to sort on the lowercase version of the page names so that lowercase
names do not end up at the bottom of the list and are instead mixed in
alphabetically, as they should be.

Patches test/test_latest_changes_view.rb to include changes needed to
test alphabetical sorting.
2015-01-12 19:04:07 -05:00
Dawa Ometto a7dc8d8c6f Merge pull request #929 from repotag/830_pagename_encodings
Allow utf-8 page names when not using grit. Resolves #830 (when using rugged adapter).
2015-01-04 13:07:27 +01:00
Dawa Ometto 355db16d2c Allow utf-8 page names when not using grit. 2015-01-04 12:20:25 +01:00
Dawa Ometto c54ce41eb7 Merge pull request #928 from LEW21/compare-escape-redirect
Encode the page title in the URL of a diff page
2015-01-03 19:58:56 +01:00
Janusz Lewandowski afb7d4c9d1 Encode the page title in the URL of a diff page. 2015-01-03 17:56:51 +01:00
Dawa Ometto b55cdde9da Merge pull request #924 from rtrvrtg/patch-1
Fix wiki_options errors for hosted Gollum instances.
2014-12-29 12:31:39 +01:00
Geoffrey Roberts 93cbc6c770 Fix intermittent wiki_options errors
Changed to resolve intermittent errors where I'd see the following in my logs:

```text
ERROR -- : app error: undefined method `wiki_options' for Precious::App:Class (NoMethodError)
ERROR -- : /home/gollum/production/releases/20141229-172128/vendor/bundle/ruby/2.0.0/gems/gollum-3.1.1.1anchor4/lib/gollum/editing_auth.rb:10:in `call'
ERROR -- : /home/gollum/production/releases/20141229-172128/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
...
```

I suspect this is the case for Sinatra applications that host instances of Gollum using its `map` feature, as this reflects the production setup we're using it in. Calling @app.settings.wiki_options uses the app instance that gets passed into Precious::EditingAuth, thereby ensuring that we're getting a Gollum instance all the time.
2014-12-29 17:28:47 +11:00
Dawa Ometto 3b1b4a0a96 Update README.md 2014-12-22 20:28:50 +01:00
Dawa Ometto 10b45cb54d Add --bare command line option (see #811). 2014-12-22 20:20:57 +01:00
Dawa Ometto 9d289e571b Describe important security update. 2014-12-18 16:44:23 +01:00
Dawa Ometto cce871c30e Allow running tests with alternative adapter 2014-12-08 01:44:01 +01:00
Dawa Ometto c2b605a90f Release 3.1.1 2014-12-04 14:06:57 +01:00
Dawa Ometto 09149592b5 Set allow_editing in Precious::App to true by default. Closes #911 2014-12-04 13:53:58 +01:00
Dawa Ometto e7410e551b Bring rake dependency up to date. 2014-11-28 14:13:40 +01:00
Dawa Ometto 9d77bc4192 Release 3.1.0 2014-11-28 14:06:36 +01:00
Dawa Ometto 537fa0c423 Merge branch 'rc' 2014-11-28 13:38:33 +01:00
Dawa Ometto c78dbc8bc1 Merge branch 'master' into rc
Conflicts:
	README.md
	lib/gollum/app.rb
2014-11-28 13:36:21 +01:00
Dawa Ometto 249eed5c2c Update HISTORY.md 2014-11-28 13:26:47 +01:00
Dawa Ometto 55eb3b24f7 Merge pull request #904 from ut7/latest_changes_test_fix_dependency
Update test to avoide being dependent on git configuration
2014-11-28 12:39:12 +01:00
Étienne Charignon 508c255d0f Update test to avoide being dependent on git configuration
The previous test implementation was dependent on the git configuration:
	renames = copies

It could then pass on a computer with that config but not passe on
a different developpeur computer who could have a different git configuration.

That new implementation is testing the same behaviour but at a lower
level and is not dependent on the git configuration anymore.
2014-11-28 12:12:23 +01:00
Dawa Ometto 9f8a90c0ac Merge pull request #875 from ut7/latest-changes
Add a "latest changes" button and page
2014-11-27 19:22:42 +01:00
Dawa Ometto 861dc935cb Configure git on Travis 2014-11-27 19:12:54 +01:00
Dawa Ometto 96ef8cacea Merge pull request #899 from repotag/gollum-lib-112
Fix tests, see https://github.com/gollum/gollum-lib/issues/112
2014-11-27 14:11:01 +01:00
Dawa Ometto 5f3ecc8713 Merge pull request #901 from repotag/prepare-release
Prepare new release.
2014-11-27 13:58:24 +01:00
Dawa Ometto 8b8ef0eb46 Prepare new release. 2014-11-27 13:51:02 +01:00
Dawa Ometto 2dbea54c84 Merge pull request #900 from repotag/adapter-flag
Implement git adapter CLI flag.
2014-11-26 00:47:39 +01:00
Dawa Ometto a776d9fb6f Implement git adapter CLI flag. 2014-11-26 00:33:03 +01:00
Dawa Ometto 57b7bbff5a Update README.md
Updated command line options.
2014-11-25 23:43:42 +01:00
Dawa Ometto a832b0ed54 Fix tests, see https://github.com/gollum/gollum-lib/issues/112 2014-11-25 19:54:31 +01:00
Dawa Ometto 3ec75b84ae Merge pull request #898 from bambycha/editable
Disable editing from UI
2014-11-22 12:15:24 +01:00
Roman Bambycha b932763080 add function to disable editing, resolves #879 2014-11-17 19:46:46 +02:00
Étienne Charignon 374f8f2f69 First attempt at a global latest changes overview.
- uses a wiki_options entry named :latest_changes_count instead of a
  constant
- lists modified pages with links
2014-11-11 22:43:34 +01:00
Dawa Ometto 226c253d5a Merge pull request #895 from repotag/rc_fix_sidebar
Fix sidebar, header, and footer, and add regression test.
2014-11-10 22:54:05 +01:00
Dawa Ometto c78a9f7950 Fix sidebar, header, and footer, and add regression test. 2014-11-10 22:39:42 +01:00
Bart Kamphorst 7264510ab2 Merge pull request #893 from tuftedocelot/add-systemd
Add systemd service file to contrib and move openrc files to contrib directory as well.
2014-11-06 22:03:18 +01:00
Dawa Ometto 3458ec6511 Merge pull request #894 from repotag/892-view-file-revisions
Route /filename/[commit-sha] will display specific revision of a file. Resolves #892.
2014-11-06 21:57:25 +01:00
Dawa Ometto 2c80db6678 Route /filename/[commit-sha] will display specific revision of a file. Resolves #892. 2014-11-06 21:31:23 +01:00
tuftedocelot 439aa6e4f5 Prepare contrib directory
Move openrc files to contrib/ in conjunction with systemd service.
Update gemspec to bundle contrib/ into the gem.
2014-11-06 14:20:33 -06:00
tuftedocelot adf544dca9 Add systemd service file to contrib
Supersedes #887 to add a systemd unit file which will run as a user and
whose gollum path and options can be changed as needed.
2014-11-06 10:33:18 -06:00
Bart Kamphorst 0965269ee9 Merge pull request #890 from repotag/ignore_footer_header_sidebar_if_empty
Do not render footers, headers and sidebars if (after formatting) they are empty. Resolves #398 .
2014-11-05 09:10:28 +01:00
Dawa Ometto 19d370c4e9 Merge pull request #891 from repotag/704-showall-files
Resolves #704. Implements the fix proposed by @bdillahu in https://github.com/gollum/gollum/pull/767 and modifies tests accordingly.
2014-11-05 02:48:03 +01:00
Dawa Ometto cee0f8b652 Change pages display to handle non-wiki file types with --show_all enabled 2014-11-05 02:30:07 +01:00
Bart Kamphorst 37664d3487 Do not render footers, headers and sidebars if (after formatting) they are empty. Resolves #398 . 2014-11-05 02:15:35 +01:00
Dawa Ometto 5a78015d81 Merge pull request #889 from repotag/888-h1-logic
Page header now uses h1-title logic. Resolves #888.
2014-11-04 23:34:42 +01:00
Dawa Ometto 7250962ba3 Page header now uses h1-title logic. 2014-11-04 23:23:46 +01:00
Bart Kamphorst 442120bfdb Merge pull request #884 from tuftedocelot/issue600-docs
add detail to inline help
2014-10-28 20:25:52 +01:00
tuftedocelot de624d1e54 add detail to inline help 2014-10-27 07:12:43 -05:00
Dawa Ometto 523029cc45 Merge pull request #876 from LEW21/delete-commit-rc
Fix the commit information for page deletion. Solves #807.
2014-10-11 14:21:50 +02:00
Janusz Lewandowski 934affe419 Fix the commit information for page deletion.
Now they will be authored by the gollum.author.
2014-10-11 13:15:23 +02:00
Bart Kamphorst 55b9af1589 Merge pull request #869 from lucas-clemente/rc
allow uploading files by drag and drop (if uploading files is enabled).
2014-10-05 08:22:40 -04:00
Lucas Clemente 16dd7e46ef allow uploading files by drag and drop 2014-10-05 14:15:48 +02:00
Dawa Ometto 851c77d8f2 Merge pull request #847 from hardywu/master
add --mathjax-config to inject root-repo/mathjax.config.js. Closes #842.
2014-10-05 12:41:03 +02:00
Hardy ee55b74898 add --mathjax [CONFIG] to inject root-repo/[CONFIG] file,
which is similar to the behavior of --css and --js.
CONFIG is "mathjax.config.js" by default.
2014-10-04 23:09:10 -04:00
Dawa Ometto 13fc1e5c66 Merge pull request #872 from Mogztter/issue-870
Resolves #870.
2014-10-04 13:53:03 +02:00
Dawa Ometto 87112c2942 Merge pull request #873 from Mogztter/issue-871
Fix css selector for Asciidoctor h1 html ouptput
2014-10-04 13:47:26 +02:00
Guillaume Grossetie 2664fdca30 Fix css selector for Asciidoctor h1 html ouptput 2014-10-04 12:45:35 +02:00
Guillaume Grossetie e05f523145 Horizontal scroll when table is too wide 2014-10-04 12:37:21 +02:00
Geoffrey Roberts 1148d29439 Made the Gollum theme responsive.
Not a particularly comprehensive change in style, just one that removes all the fixed sizing for browsers below 940px in width.

Closes #831.
2014-10-02 00:50:29 +02:00
Sunny Ripert 7ba52978d1 Merge pull request #864 from Mogztter/asciidoc-headers
Adds headers to the AsciiDoc editor
2014-09-26 15:48:47 +02:00
Sunny Ripert 138a9fee43 Merge branch 'master' into rc 2014-09-24 10:58:10 +02:00
Sunny Ripert 1d522eaf0d Merge pull request #862 from Mogztter/asciidoctor-1.5.0-syntax
Use Asciidoctor 1.5.0 new syntax backtick
2014-09-22 13:51:40 +02:00
Sunny Ripert b5c5da64c9 Merge pull request #859 from Mogztter/patch-1
Update installation procedure for AsciiDoc
2014-09-22 13:49:05 +02:00
Guillaume Grossetie 8466425836 Adds headers to the AsciiDoc editor 2014-09-18 20:03:35 +02:00
Guillaume Grossetie b774ee5cd0 Use Asciidoctor 1.5.0 new syntax backtick
Asciidoctor 1.5.0 is now using backtick for inline code.
Replaces ASCIIDoc by AsciiDoc to respect the case.
2014-09-18 19:50:54 +02:00
Guillaume Grossetie 7e2e0e926b Update README.md
GitHub Markup is now using asciidoctor
2014-09-17 19:09:28 +02:00
Dawa Ometto 30f673c63c Update README.md with installation instructions 2014-09-13 12:29:39 +02:00
Bart Kamphorst bb5be728e3 Merge pull request #853 from joscarsson/patch-1
Update --allow-uploads help text in README
2014-09-09 17:19:12 +02:00
Jonas Oscarsson 0be5d1c657 Update --allow-uploads help text in README 2014-09-09 16:57:33 +02:00
Sunny Ripert d143e6be06 Merge pull request #841 from marcusps/mathjax-cdn-fix
Fix MathJax CDN URL
2014-07-24 13:52:33 +02:00
Marcus P S e65a78a5f5 Fix MathJax CDN URL
According to the [MathJax Blog](http://www.mathjax.org/changes-to-the-mathjax-cdn/), MathJax will retire the `rackcdn` CDN address at the end of this month. Updated the script to used the new CDN URL, and also made it so that the URL is HTTP/HTTPS agnostic, following the [MathJax docs](http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn).
2014-07-23 11:46:22 -04:00
Dawa Ometto 4f443a3c62 Merge pull request #805 from MrJaeger/respect-dollar-signs
Allow for $ characters on front-end editor
2014-06-01 17:54:52 +02:00
bootstraponline ff82ddea97 Add font awesome link 2014-04-05 14:38:34 -04:00
bootstraponline 2e2d3f5e87 Release 3.0.0 2014-04-05 14:25:55 -04:00
bootstraponline 491b1041f8 Add publish alias. Fix rake release 2014-04-05 14:25:39 -04:00
bootstraponline ce192d33f7 Add mocha development dependency 2014-04-05 14:12:55 -04:00
bootstraponline ca1cb64026 Use SVG badges 2014-04-05 13:55:52 -04:00
bootstraponline 71b5f5e469 Update gemspec dependencies 2014-04-05 13:35:11 -04:00
bootstraponline 946567f903 Merge pull request #817 from bootstraponline/test_fixes
Use FontAwesome for anchor links. Fix tests
2014-04-05 13:30:58 -04:00
bootstraponline 036e739511 Fix CSS to match github 2014-04-05 13:30:23 -04:00
bootstraponline 87a95b85c5 Use FontAwesome 4.0.3 for anchor links 2014-04-05 13:30:03 -04:00
bootstraponline 4f49859bf7 Format css 2014-04-05 13:30:03 -04:00
bootstraponline 2c53e55533 Update css 2014-04-05 13:30:03 -04:00
bootstraponline 2ae75978dd Format code 2014-04-05 13:30:02 -04:00
bootstraponline 452d825e66 Clean up tests. Remove templates 2014-04-05 13:30:02 -04:00
bootstraponline a7a1c4f81e Fix utf8 test 2014-04-05 13:30:02 -04:00
bootstraponline 00740eb9e8 Fix locale warning 2014-04-05 13:30:02 -04:00
bootstraponline d76264c255 Update version to 3.0.0 2014-04-05 13:28:04 -04:00
bootstraponline 2297ce418d Test on Ruby 2.1.1
The current stable version of Ruby is 2.1.1 so gollum should be tested there.
2014-04-02 23:30:20 -04:00
Sunny Ripert fec85e6c59 Merge pull request #815 from nyjt/patch-1
Travis-CI SVG badge [ci skip]
2014-03-28 14:49:01 +01:00
Jozsef Nyitrai 54efa35fb3 Fix broken travis-ci badge 2014-03-28 14:08:21 +01:00
bootstraponline 988aebf630 Merge pull request #813 from bootstraponline/update_template_css
Update template.css to match github
2014-03-14 22:20:08 -04:00
bootstraponline d2f7766aea Update template.css to match github 2014-03-14 22:19:33 -04:00
Daniel Kimsey 25d30aee64 Release 2.7.0 2014-02-20 11:10:00 -05:00
Daniel Kimsey 8af92da23c Update version of gollum-lib to 2.0.0 2014-02-20 11:07:59 -05:00
Andrew Jaeger 08dd36e1b0 In the javascript editor, '$' characters were getting stomped on when
trying to remove backreferences after doing transformations on text
(Bolding, Italicizing, etc.).  This can be fixed by first escaping the
string to be transformed and then unescaping it afterwards.
2014-02-08 14:18:36 -08:00
Sunny Ripert 324ff0a17c Merge pull request #802 from ExocTBlid/master
Printing CSS
2014-02-04 14:05:15 -08:00
Blomquist, Ethan cfb372e5e2 Another minor update... 2014-02-03 10:53:37 -07:00
Blomquist, Ethan 6513c732ba Minor update to the delete link for printing. 2014-02-03 10:50:13 -07:00
Blomquist, Ethan c4ea869223 Added print.css to remove action buttons and delete link for better print format. 2014-02-03 10:45:06 -07:00
Dawa Ometto 5387267675 Merge pull request #800 from budziq/delete_crash
Fixes crash if "delete page" was selected in preview of page that being created
2014-02-01 10:01:57 -08:00
Dawa Ometto 8e4c3cc562 Merge pull request #801 from budziq/history_crash_clean
fixes crash when selected "history" in preview of page being created
2014-02-01 09:58:42 -08:00
Michał Budzyński 8b6b0699e5 fixes crash when selected "history" in preview of page being created
- history button is hidden in newly created page preview as it makes no sense
- redirect to '/' if page does not exist yet
2014-01-31 02:43:03 +01:00
Michał Budzyński 229bff1658 Fixes crash if "delete page" was selected in preview of page that being created 2014-01-31 02:10:15 +01:00
Jamie Oliver 7a59d37350 Merge pull request #794 from github/ungithub-upstream
Status of GitHub Wikis
2014-01-28 11:12:20 -08:00
Dawa Ometto d06b1e7883 Merge pull request #787 from akretion/fix-upload-path
fixes bug #786 per_page_uploads: incorrect file path if page is inside some directory
2014-01-25 02:12:55 -08:00
Akretion BOT c8a284db9d fixes bug #786 per_page_uploads: incorrect file path if page is inside some directory 2014-01-25 04:53:19 +01:00
Dawa Ometto c7d6aceff4 Update sanitization.md 2014-01-23 19:33:25 +01:00
Dawa Ometto 7ea45d5e89 Update sanitization.md
Document customization of sanitation settings; see https://github.com/gollum/gollum/issues/759
2014-01-23 19:29:20 +01:00
Brandon Keepers 48c4aafb15 Remove reference to GitHub in readme
:(
2014-01-21 09:40:41 -08:00
Bart Kamphorst ff302ed842 Fixes alignment of tables (issue #700).
Fixes https://github.com/gollum/gollum/issues/700 .
2014-01-21 16:55:05 +01:00
Dawa Ometto 20a2424b83 Merge pull request #793 from repotag/flag_for_per_page_uploads
Add optional 'mode' argument to --allow-uploads flag, allowing user to toggle per_page_uploads.
2014-01-21 03:34:43 -08:00
Dawa Ometto de0f34a27a Add optional 'mode' argument to --allow-uploads flag, allowing user to toggle per_page_uploads. 2014-01-21 12:14:47 +01:00
Sunny Ripert d0992cce3f Merge pull request #790 from akretion/better-redirect-after-upload
fixes #788 better redirect after file upload
2014-01-20 03:13:13 -08:00
Akretion BOT 15feeb3614 fixes #788 better redirect after file upload 2014-01-19 23:24:01 +01:00
Jamie Oliver fc0a879e52 Support Ruby 2.1.0. Closes #784 2014-01-11 14:42:35 +00:00
Daniel Kimsey 9b675146a2 Merge pull request #782 from Joe8Bit/master
Update README.md to show options
2014-01-10 07:26:25 -08:00
Joe Pettersson 4d0bdcc8c0 Update README.md to show options 2014-01-10 13:47:15 +00:00
bootstraponline 0abdb67687 Merge pull request #781 from anchor/per-page-uploads
Implement the ability to store uploads on a per-page basis
2014-01-04 19:11:07 -08:00
Matt Palmer d1fb98cf1b Merge remote-tracking branch 'upstream/master' into per-page-uploads
Conflicts:
	lib/gollum/public/gollum/javascript/gollum.js
2014-01-03 17:49:53 +11:00
Matt Palmer 5eac24eacb Implement the ability to store uploads on a per-page basis
Storing all uploaded files in a single directory kinda sucks when you've got
a largish wiki, or the possibility of filename collisions.  With this patch,
though, you can set `:per_page_uploads => true` in your wiki settings and
have the file uploaded to a directory named for the page you were on when
you clicked 'Upload'.
2014-01-03 15:34:24 +11:00
bootstraponline 3fd16daeca Release 2.6.0 2014-01-02 23:32:41 -05:00
bootstraponline d9b38c3b73 Use baseUrl for /uploadFile
Thanks @mpalmer
https://github.com/gollum/gollum/pull/780
2014-01-02 23:03:33 -05:00
bootstraponline 0a5176c1ee Merge pull request #780 from peterkeen/upload-base-path
Base upload button action on home page url
2014-01-02 19:50:35 -08:00
Pete Keen b836b0e273 Base upload button action on home page url 2014-01-01 17:05:32 -05:00
bootstraponline 9a41e2a65d Merge pull request #772 from zorun/master
Prevent indexing of old versions of a page (fixes #768)
2014-01-01 09:05:07 -08:00
bootstraponline cb1b74ed7b Merge pull request #776 from eucher/first_slash_in_create
First slash in create
2014-01-01 09:02:58 -08:00
bootstraponline e25e5d9768 Merge pull request #779 from anchor/semantic-versioning
Fix version specifiers
2014-01-01 09:02:14 -08:00
Matt Palmer 9f3766952f Fix version specifiers
Adjusted the version specs on the two gems that explicitly state they are
SemVer compliant, and fixed up the one dependency that correctly *could* have
used ~> but didn't.
2013-12-31 15:18:15 +11:00
bootstraponline cb4471b07f Merge pull request #778 from jhogendorn/baddialog
Fixes dialog hiding so it doesnt block the UI
2013-12-08 08:55:28 -08:00
Joshua Hogendorn 9fa7eac41f Fixes dialog hiding so it doesnt block the UI 2013-12-08 20:15:59 +10:00
zorun 94fa985550 Add a test for issue #772 2013-12-06 02:46:15 +01:00
Evgeni Cherdancev 1c498ead35 gsub before begin 2013-11-28 12:32:08 +07:00
Evgeni Cherdancev 5abc983172 write_page first slash fix 2013-11-28 12:26:06 +07:00
zorun 7a0d4919b0 Prevent indexing of old versions of a page (fixes #768) 2013-11-22 12:49:42 +01:00
bootstraponline d5e9183877 Merge pull request #762 from pdenes/add_template_dir_option
add option to specify custom template directory
2013-11-11 14:25:27 -08:00
bootstraponline 9b39a51e9f Merge pull request #758 from samer/master
Fix revert for pages in directories
2013-11-11 14:25:10 -08:00
pdenes bec7eabd1c add option to specify custom template directory 2013-11-06 21:46:54 +00:00
Samer N cd3791087f Fix revert for pages in directories, as seen in issue #736 2013-11-04 13:03:31 +02:00
Jamie Oliver 714985e377 Release 2.5.2 2013-11-02 11:31:21 +00:00
Jamie Oliver 76c37dce96 Upgrade gollum-lib 2013-11-02 11:21:39 +00:00
bootstraponline 5a9af40058 Release 2.5.1 2013-10-15 07:20:13 -04:00
bootstraponline e871ff35b7 Merge pull request #753 from bootstraponline/master
Update gemspec
2013-10-15 04:19:41 -07:00
bootstraponline ecc6c32933 Update gemspec 2013-10-15 07:11:36 -04:00
bootstraponline 831cf61a08 Merge pull request #747 from invenia/master
Created OpenRC init script.
2013-10-12 12:18:22 -07:00
Curtis Vogt cc1231dece Added MIT license to init script header. 2013-09-30 13:52:34 +00:00
bootstraponline bb3d1a165b Merge pull request #751 from 1gor/patch-1
Added dependency 'github-markdown'
2013-09-29 09:29:23 -07:00
1gor 3da0426c54 Added dependency 'github-markdown' 2013-09-29 10:49:11 +06:00
Curtis Vogt e01aa25be3 Added basic logging to OpenRC script. 2013-09-27 17:02:16 +00:00
Abhijit Menon-Sen ee2f9d8dcb Merge pull request #748 from singlebrook/upload_instructions
Add some instructions to upload dialog
2013-09-27 07:30:40 -07:00
Leon Miller-Out 4d8677965c Add instructions for how to access file post-upload 2013-09-27 10:16:35 -04:00
Leon Miller-Out 72729d5510 Whitespace 2013-09-27 10:16:35 -04:00
Curtis Vogt 0b57e70c87 Removed explictly set license in OpenRC init script. 2013-09-27 14:09:00 +00:00
Curtis Vogt 033d6489f8 Created OpenRC init script. 2013-09-26 16:28:19 +00:00
Abhijit Menon-Sen 8608007337 Merge pull request #743 from singlebrook/upload_action_path
Use correct path for uploadFile action even when current page is in a folder.
2013-09-17 21:32:33 -07:00
Leon Miller-Out 665e493570 Use correct path for uploadFile action even when looking at a page in a folder 2013-09-17 12:36:53 -04:00
bootstraponline eb1e2f60f3 Fix #740 2013-09-12 08:49:27 -04:00
bootstraponline dc637f0a9b Merge pull request #734 from repotag/no_grit
No grit
2013-08-11 08:07:33 -07:00
Dawa Ometto f81634728d Replaced grit calls to new calls in gollum-lib 1.06 (set_git_timeout and set_git_max_filsize). Removed grit dependency from tests, using cp of empty.git instead. Replaced Grit exceptions with equivalents in the Gollum module. 2013-08-11 13:19:43 +02:00
bootstraponline 440cd5ebc0 Merge pull request #735 from ngyuki/fix-edit-for-multibyte
Fix `Encoding::CompatibilityError` of edit view.
2013-08-10 11:27:14 -07:00
Jamie Oliver 1cd7d0f205 Use display path in rename dialog. Fixes #703 2013-08-10 11:41:15 +01:00
ngyuki a69d62911c Fix editing of the sidebar with multi-byte characters. 2013-08-09 14:45:19 +09:00
ngyuki 395e9bd006 Add test for editing the sidebar, including multi-byte characters. 2013-08-09 14:41:52 +09:00
Jamie Oliver 90e20810d5 Do not force downcase on URLs. Fixes #621 2013-08-04 18:27:32 +01:00
bootstraponline 9c714e7687 Release 2.5.0 2013-07-21 07:22:46 -04:00
bootstraponline 6c3523d61c Merge pull request #725 from amenonsen/upload
Add a file Upload button
2013-07-21 04:19:58 -07:00
Abhijit Menon-Sen 183840b793 Add file upload functionality
Adds an :allow_uploads wiki option, an --allow-uploads flag to
bin/gollum, an "Upload" button with a file upload dialog, and a
handler to commit uploaded files into the repository.

:allow_uploads defaults to false, to prevent unauthenticated users
from uploading arbitrary files into the repository (albeit only in
the uploads directory).

This code is based on the patch from @l3iggs at
https://github.com/gollum/gollum/issues/694, but the handling on the
backend is completely rewritten to use the Committer infrastructure.
2013-07-21 16:28:15 +05:30
bootstraponline 4e2856aa64 Update gollum-lib to 1.0.4 2013-07-20 19:24:26 -04:00
Abhijit Menon-Sen 4627a39165 Merge pull request #727 from amenonsen/no-live-preview
Disable live preview by default, because it's broken (closes #718)
2013-07-18 05:39:48 -07:00
bootstraponline c87cbe83d2 Fix #709
Require Ruby >= 1.9
2013-07-18 08:17:17 -04:00
bootstraponline f05282badf Drop 1.8.7 support on Travis (It's broken)
Don't email me on fail
2013-07-18 08:16:01 -04:00
Abhijit Menon-Sen 957879346e Merge pull request #726 from amenonsen/fixes
Trivial fix: set label.for to the input's id
2013-07-17 18:53:37 -07:00
Abhijit Menon-Sen 87e64f67f3 A tiny patch to disable live preview (#718) 2013-07-17 14:24:36 +05:30
Abhijit Menon-Sen 43840d246d Trivial fix: set label.for to the input's id 2013-07-17 13:31:46 +05:30
bootstraponline 4aeb9af8a7 Release 2.4.15 2013-06-18 22:19:34 -04:00
dekimsey b37acb8bc6 Merge pull request #711 from cpence/master
Add support for file streaming
2013-06-18 19:15:57 -07:00
Charles Pence 433865e927 Require newer gollum-lib. 2013-06-18 22:10:02 -04:00
Charles Pence 5428161e0f Add support for on-disk file streaming. 2013-06-18 21:49:38 -04:00
Jamie Oliver db0b536b5b Release 2.4.14 2013-06-15 17:20:48 +01:00
Jamie Oliver a4e50908fb Upgrade gollum-lib 2013-06-15 17:12:46 +01:00
bootstraponline 96b89fe83d Add version badge 2013-05-31 22:05:23 -03:00
Jamie Oliver adb131f131 Upgrade gollum-lib 2013-05-31 10:04:01 +01:00
bootstraponline 757ab87e8a Fix shoulda version
Gem::InstallError: shoulda-matchers requires Ruby version >= 1.9.2

Gollum is stuck on 1.8 so use the old version of shoulda.
2013-05-27 16:16:17 -03:00
bootstraponline f1d1db1159 Update useragent and shoulda 2013-05-27 16:07:24 -03:00
bootstraponline 3942bf60a6 Merge pull request #698 from ddeyoung/improve-page-create
Leaving off the leading slash in a page name with a subdirectory will corrupt the repository
2013-05-27 10:47:31 -07:00
Dustin DeYoung e2c0dcc0da Ruby 1.8.7 compatible double slash gsub 2013-05-26 16:14:56 -04:00
Dustin DeYoung f63180d8d8 Correct 1.8.7 negative match assertion. 2013-05-26 11:16:43 -04:00
Dustin DeYoung 999bbf3d50 Regex is 1.8.7 compatible for subpage create tests 2013-05-26 11:10:50 -04:00
Dustin DeYoung eab612bdd0 Remove temporary change in app test. 2013-05-26 11:03:40 -04:00
Dustin DeYoung 1147186b4c Page create with a relative path forces an absolute path. 2013-05-26 10:03:23 -04:00
Sunny Ripert a88314e061 Merge pull request #697 from bitmorse/master
Typo in page.mustache
2013-05-17 10:48:56 -07:00
Sam Sulaimanov 9221f5528d Fix form tag typo in page template. 2013-05-17 18:23:50 +02:00
bootstraponline 520f60cd65 Merge pull request #693 from alecperkins/patch-1
Add bottom margin to hr elements
2013-05-08 15:00:55 -07:00
Alec Perkins 84c85774e8 Add bottom margin to hr elements
This gives some more consistent spacing.
2013-05-08 18:09:39 -03:00
bootstraponline 1f118deed9 Merge pull request #687 from DirtYiCE/gravatar-fix
Fix gravatar url generation
2013-04-13 14:04:20 -07:00
Kővágó, Zoltán 55ce07ae73 Fix gravatar url generation 2013-04-13 22:18:04 +02:00
Sunny Ripert 85677d5e91 README trimming to point to the wiki
-> gollum/gollum#1
2013-04-08 20:32:11 +03:00
Jamie Oliver 04f9be15b8 Upgrade minitest-reporters. Fixes #684 2013-04-08 07:24:05 +01:00
Jamie Oliver 09cd72a829 Add license to gemspec. Fixes #681 2013-04-05 17:57:17 +01:00
Jamie Oliver f5f5ad70e3 Downgrade minitest-reporters. Temporary fix for #684 2013-04-05 16:03:20 +01:00
Jamie Oliver a0774b320a Update useragent 2013-04-05 15:00:41 +01:00
bootstraponline 4feea6051a Release 2.4.13 2013-04-03 19:28:29 -04:00
dekimsey f548ea757b Merge pull request #682 from dekimsey/missing-buttons
Fix missing new/rename buttons
2013-04-03 08:21:12 -07:00
Daniel Kimsey abc8ea5280 Fix missing new/rename buttons 2013-04-03 10:41:36 -04:00
bootstraponline bacd2313fb Release 2.4.12 2013-04-02 19:56:01 -04:00
bootstraponline 63295d3f9b Update gollum lib 2013-04-02 20:55:12 -03:00
Daniel Kimsey 9c25eb20cf Add a title attr to show full date on history log 2013-04-01 15:53:08 -04:00
bootstraponline 7f533f33ae Merge pull request #677 from uk-ar/fix-dependancy
Fix library dependancy issue when running with config.ru
2013-03-29 15:39:35 -07:00
uk-ar 352b4e1ed8 Fix NoMethodError when running with sample config.ru 2013-03-30 05:59:36 +09:00
Sunny Ripert 9a4252b579 Merge pull request #676 from crisman/master
Class duplication issues in frontend
2013-03-28 01:37:10 -07:00
Daniel Crisman ed7011c229 Deduplicate button action-* class names 2013-03-27 14:23:28 -04:00
Daniel Crisman 4ddd6a5207 Merge duplicate class attributes (class="jaws") 2013-03-26 13:47:21 -04:00
bootstraponline 0a74c7cfd2 Merge pull request #675 from uk-ar/fix-error-in-irb
Fix error when running with --irb option
2013-03-25 18:18:21 -07:00
uk-ar d84fdc7599 Fix error when running with --irb option
uninitialized constant Gollum::Wiki (NameError)
2013-03-26 04:49:29 +09:00
uk-ar dac1268266 Update the example of config.ru in the README 2013-03-26 04:25:53 +09:00
bootstraponline b42db1c7c1 Fix #668 2013-03-22 22:07:57 -03:00
bootstraponline 7a7a27c5c7 Merge pull request #672 from bootstraponline/master
Try removing dependencies
2013-03-22 18:06:25 -07:00
bootstraponline af83186b10 Try removing deps 2013-03-22 21:03:05 -04:00
bootstraponline a8646f8fe7 Update shoulda 2013-03-22 20:59:40 -03:00
bootstraponline 01c1e30284 Use latest sinatra 2013-03-22 20:49:40 -03:00
bootstraponline b3980f9e39 Merge pull request #669 from gollum/sinatra1.4
Upgrade to sinatra 1.4
2013-03-22 15:26:27 -07:00
Sunny Ripert c9fd50d23e Upgrade to sinatra 1.4 2013-03-22 13:45:08 +01:00
Sunny Ripert ea3544f46d Syntax highlighting in README 2013-03-22 13:18:30 +01:00
Sunny Ripert 4e04f5f540 README mention of gollum-lib and whitespace fixes 2013-03-22 12:27:20 +01:00
bootstraponline b1021cf233 Update MathJax docs 2013-03-21 23:23:42 -03:00
bootstraponline 8fa3529123 Merge pull request #667 from cpence/master
Tweak TeX math delimiters
2013-03-21 19:13:34 -07:00
Charles Pence 3b494c235a Tweak TeX math delimiters. 2013-03-21 22:09:01 -04:00
bootstraponline 1641c3e3e8 Update gemspec 2013-03-21 21:53:48 -04:00
bootstraponline ccd5d850ac Merge pull request #664 from jamieoliver/feature/gollum-lib
Move gollum back end to gollum-lib #647
2013-03-20 16:54:57 -07:00
Jamie Oliver b989f160cf Merge branch 'master' into feature/gollum-lib
Conflicts:
	lib/gollum/markup.rb
	test/test_gitcode.rb
2013-03-20 07:46:11 +00:00
bootstraponline 54e144564c Merge pull request #660 from simonista/fix-github-links
Fix for embedding code from github
2013-03-19 17:25:36 -07:00
bootstraponline ab8599da6d Update README.md 2013-03-19 21:11:41 -03:00
bootstraponline 0885702873 Update README.md 2013-03-19 21:10:22 -03:00
bootstraponline 0083bc9302 Merge pull request #661 from simonista/custom-js
Add option for custom js (like custom css)
2013-03-19 17:06:38 -07:00
Jamie Oliver cbc0821928 Merge branch 'master' into feature/gollum-lib
Conflicts:
	lib/gollum/markup.rb
2013-03-19 23:54:27 +00:00
bootstraponline 7a70169d06 Fix style 2013-03-19 19:35:54 -03:00
bootstraponline bf2377ac11 Merge pull request #662 from lemonsqueeze/clearfloats
[[_]] float clearing tag experiment
2013-03-19 15:35:18 -07:00
Jamie Oliver 1f79126b27 Move gollum back end to gollum-lib #647 2013-03-19 22:11:09 +00:00
lemonsqueeze 624e324383 [[_]] float clearing tag experiment 2013-03-19 18:15:01 +01:00
Simon Williams 846ebb285e Add option for custom js (like custom css)
* Add a new 'js' flag to indicate you want to embed a file named 'custom.js'
  which should exist at the root of the wiki
2013-03-17 18:42:01 -06:00
Simon Williams e567759935 Fix for embedding code from github 2013-03-17 18:27:40 -06:00
bootstraponline fe706c184e Merge pull request #659 from cpence/master
Fix symlink base path, don't allow in bare repos
2013-03-16 20:39:00 -07:00
Charles Pence 90bbb8e348 Fix symlink base path, don't allow symlinks in bare repos. 2013-03-16 22:00:19 -04:00
bootstraponline e21ec540c2 Merge pull request #658 from cpence/master
Basic support for symbolic links
2013-03-16 18:08:40 -07:00
Charles Pence 2a4517ced4 Add basic support for symbolic links. 2013-03-16 21:07:05 -04:00
bootstraponline 8c8d151b3e Update README.md 2013-03-16 20:39:31 -03:00
bootstraponline 44a3cf1934 Merge pull request #652 from simonista/update-references
Update references to new project location
2013-03-15 15:04:33 -07:00
Jamie Oliver 5dcd3c8c8f Merge pull request #651 from simonista/fix-specs
Fix tests that depended on old github location
2013-03-15 01:52:46 -07:00
Simon Williams 251bd7cd3d Update references to new project location
* Change 'github/gollum' references to 'gollum/gollum'
2013-03-14 23:22:51 -06:00
Simon Williams 02dfb0a8c1 Fix tests that depended on old github location
* Two tests depended on the following file existing:
  github/gollum/master/test/file_view/1_file.txt
2013-03-14 23:14:39 -06:00
bootstraponline 544d499ab1 Merge pull request #646 from bootstraponline/master
Fix #645
2013-03-04 19:39:07 -08:00
bootstraponline 8ebc2f7079 Fix #645 2013-03-04 19:32:55 -05:00
bootstraponline a31ba16070 Merge pull request #644 from dekimsey/empty-commit-612
Fix empty commits and non-descript revert messages (For #612)
2013-03-04 15:31:46 -08:00
Daniel Kimsey 60e3baad8a Fix empty commits and non-descript revert messages
* Empty commits via editor now have the message: "[no message]"
  * Reverts now have the slightly more useful message: "Revert commit #1234567"
2013-03-04 12:37:16 -05:00
bootstraponline f720a84831 Merge pull request #643 from mattr-/master
Update the GFM link in the README
2013-02-28 05:05:33 -08:00
Matt Rogers b74b2c4399 Update the GFM link in the README
github.github.com/github-flavored-markdown shows a different version of
the page for a split second, and then redirects to
https://help.github.com/articles/github-flavored-markdown so let's just
point there directly.
2013-02-27 22:39:06 -06:00
bootstraponline 252aa10d75 Update gemspec 2013-02-26 19:25:58 -05:00
bootstraponline 6f3d362920 Update Gemfile 2013-02-26 19:25:11 -05:00
bootstraponline 9b54e4c79f Update gollum.gemspec 2013-02-26 19:24:43 -05:00
bootstraponline f908d0d170 Document how to run the tests 2013-02-26 19:22:44 -05:00
bootstraponline 852ecdd1a9 Update pygments.rb. Fixes #639 2013-02-26 18:57:34 -05:00
bootstraponline 78f5df5e56 Update org-ruby. Fixes #640 2013-02-26 18:25:00 -05:00
bootstraponline 580a61a515 Merge pull request #641 from jamieoliver/bug/new-page-subdirectory
Update working directory when creating new page in subdirectory
2013-02-26 15:16:47 -08:00
Jamie Oliver 4faf5a0150 Update working directory when creating new page in subdirectory 2013-02-26 22:43:27 +00:00
bootstraponline 1201d2434a Merge pull request #637 from jamesdabbs/custom-markup
Allow registering custom markup engines
2013-02-25 19:59:18 -08:00
bootstraponline e1ca392da6 Fix tests
0.4.1 and 0.4.2 break gollum's tests
2013-02-25 22:54:32 -05:00
bootstraponline 3ee6d22727 Fix tests
org-ruby 0.8.0+ break the tests
2013-02-25 22:48:46 -05:00
bootstraponline 28a0329f65 Notify me on build failure 2013-02-25 21:50:49 -05:00
bootstraponline 2dc696c940 Update pygments 2013-02-25 21:47:32 -05:00
James Dabbs e3acef0e91 Add test for custom markup engine
This required adding a file to the example repo, so some of the tests'
expected hash values changed accordingly.
2013-02-25 21:06:00 -05:00
James Dabbs 62601f1adc Add system for registering new page extensions / markup formats 2013-02-25 21:05:35 -05:00
bootstraponline 982915a22f Fix #636
https://github.com/github/gollum/issues/636
2013-02-23 15:04:29 -05:00
bootstraponline 9f1bbd097f Merge pull request #634 from jamieoliver/bug/new-rename-dialogs-redirect
Fix Create New Page and Rename Page dialogs redirect behaviour
2013-02-19 16:03:59 -08:00
bootstraponline 694bd6e74a Update gollum.gemspec 2013-02-19 17:43:56 -05:00
Jamie Oliver 394cf0bc8e Fix Create New Page and Rename Page dialogs redirect behaviour 2013-02-19 21:29:21 +00:00
bootstraponline 09257deaae Merge pull request #632 from arr2036/master
Specify the sidebar side
2013-02-11 15:19:04 -08:00
Arran Cudbard-Bell 21c4b0dd95 Allow the sidebar side to be specified 2013-02-11 17:57:45 -05:00
bootstraponline 3b4662b583 Merge pull request #631 from arr2036/master
Fix redirects to index_pages for subdirs
2013-02-06 22:11:11 -08:00
Arran Cudbard-Bell 2e2e6457c7 Add option to specify index_page
Fix redirect to index_page creation for subdirs

Redirect attempts to access directories to index_page

Add tests
2013-02-06 22:05:36 -05:00
bootstraponline 631a7cccd6 Merge pull request #628 from arr2036/fix_titles
Fix page titles for non markdown formats
2013-02-04 15:47:17 -08:00
Arran Cudbard-Bell 2a3d51c7dc Fix page titles for non markdown formats 2013-02-04 16:12:41 -05:00
bootstraponline e7e8a17b61 Merge pull request #598 from dekimsey/new-page-in-current-directory
New page button now respects current directory
2013-01-30 14:57:07 -08:00
Daniel Kimsey 8fd8a56893 New and Rename buttons now support directories
* Also fixes renaming a file from a subdirectory moves it to the root.
  * Add context info option to dialog, used in the new dialog
  * Added CSS to support new context option for dialogs
  * Fix /pages view messing up directory creation in new
  * Removed the Edit and Rename buttons from historic view
2013-01-30 11:03:00 -05:00
bootstraponline 443c453507 Apply font from #624
https://github.com/github/gollum/pull/624
2013-01-20 12:44:53 -05:00
bootstraponline 0495c89ba1 Update HISTORY.md 2013-01-10 18:46:24 -05:00
bootstraponline 78e4dfbece Fix metadata tests 2013-01-08 17:09:21 -05:00
bootstraponline 1c7a481ed9 Release 2.4.11 2013-01-08 16:59:47 -05:00
bootstraponline c3dedcbba5 Disable metadata 2013-01-08 16:58:21 -05:00
bootstraponline 1c767a0e9f Release 2.4.10 2012-12-20 19:43:48 -07:00
bootstraponline f3b0ba49e0 Fix #612 2012-12-20 19:41:28 -07:00
bootstraponline 31dfcbaa9e Release 2.4.9 2012-12-20 19:30:04 -07:00
bootstraponline 8e11c5f46d Fix create 2012-12-20 19:26:26 -07:00
bootstraponline 70793ff559 Release 2.4.8 2012-12-20 19:14:13 -07:00
bootstraponline 6621e71e6c Fix home #491 2012-12-20 19:12:02 -07:00
bootstraponline 2af164ee9e Release 2.4.7 2012-12-20 18:11:44 -07:00
bootstraponline 9227f0a195 Fix tests
File names do not have spaces.
2012-12-20 18:08:21 -07:00
bootstraponline f18330b494 Fix #611 2012-12-20 18:02:26 -07:00
bootstraponline bb32339ab4 Fix spaces in dir #611 2012-12-20 17:45:39 -07:00
bootstraponline ddf4378dfe More work on #491
@teohm pointed out that add_to_index in gollum/committer.rb already appends @wiki.page_file_dir
2012-12-18 20:07:24 -07:00
bootstraponline 2a607e209b Fix #491 2012-12-18 19:01:43 -07:00
bootstraponline a3d85ae8c3 Release 2.4.6 2012-12-18 18:30:17 -07:00
bootstraponline fef62b63cb ASCIIDOC tests don't run on Travis
Tests that use to be green now fail when rerun. The issue is with the travis configuration and asciidoc.

https://travis-ci.org/github/gollum/jobs/3603171
2012-12-18 18:25:41 -07:00
bootstraponline 93ec80f773 Fix #607 2012-12-18 17:41:57 -07:00
bootstraponline 8e3795c317 Update 2012-12-18 17:20:49 -07:00
bootstraponline cb1a633dc5 Fix #607 2012-12-14 19:16:19 -07:00
bootstraponline ace4db6938 Merge pull request #605 from dekimsey/pages-images-now-respect-baseurl
Fix /pages css to the correct path for images
2012-12-11 17:35:03 -08:00
Daniel Kimsey b770062788 Fix /pages css to the correct path for images 2012-12-11 13:00:55 -05:00
bootstraponline 4c4dc5398a Update 1.8 check 2012-12-10 18:41:01 -07:00
bootstraponline 091945152f Release 2.4.5 2012-12-10 18:05:38 -07:00
bootstraponline 4838611273 Fix #602 2012-12-07 17:16:25 -07:00
bootstraponline 144f9959c9 Update test #602 2012-12-07 17:02:50 -07:00
bootstraponline 291c6a8fa0 Add test for #602 2012-12-07 16:49:00 -07:00
bootstraponline d5d3581b78 Update gollum.gemspec 2012-12-06 18:17:41 -07:00
bootstraponline 64d90b027c Merge pull request #597 from shanebdavis/master
altered CSS to more closely match github's markdown css
2012-12-03 16:49:37 -08:00
Shane Brinkman-Davis a0e9989734 altered CSS to more closely match github's markdown css.
Main chaings:
Padding between LIs = 0px
Fixed page-width: 920px
H1, H2, H3: Margin-top: 20px; margin-bottom: 10px
2012-12-01 15:48:28 -08:00
bootstraponline b81aa923d6 Fix KCODE warning on 1.9 2012-11-30 23:35:01 -07:00
bootstraponline 610925bc5a Update Ace
https://github.com/ajaxorg/ace/commit/f887e6411222ed49683c477ca571460b99f8e59f
2012-11-30 23:34:55 -07:00
bootstraponline 86eda9bb10 Release 2.4.4 2012-11-30 17:28:53 -07:00
bootstraponline ca06aa9a6f Merge pull request #595 from jtietema/patch-1
Update lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js
2012-11-30 16:11:47 -08:00
Jeroen Tietema ca57d9e83d Update lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js
Adjusted the height of the preview window so that it doesn't flow 
offscreen. (It was impossible to read the last lines...)
2012-11-30 22:20:36 +01:00
bootstraponline 904f975f0c Fix comment 2012-11-30 00:02:24 -07:00
bootstraponline 9b9212cf4c Remove needless conversion
The fix for page.rb resolved UTF-8 in headers.
2012-11-30 00:00:28 -07:00
bootstraponline 404419d1c3 Release 2.4.3 2012-11-29 23:57:15 -07:00
bootstraponline 4ee94a6574 Fix UTF-8 header and add test 2012-11-29 23:47:25 -07:00
bootstraponline f929df0419 Update check_h1 2012-11-29 23:04:40 -07:00
bootstraponline 57587dafbe Fix UTF-8 in headers 2012-11-29 22:05:29 -07:00
bootstraponline 31a95e81b3 Fix test name 2012-11-29 21:36:04 -07:00
bootstraponline 70a4e9551b Improve h1 test 2012-11-29 21:27:45 -07:00
bootstraponline e1a705f975 Fix UTF-8
to_html uses source document encoding by default. Set UTF-8.

Add note about KCODE warning.
2012-11-29 20:05:41 -07:00
bootstraponline 9057ec82d8 Release 2.4.2 2012-11-29 19:49:15 -07:00
bootstraponline 1b53e36666 Fix UTF-8 2012-11-29 16:58:47 -07:00
bootstraponline 10fa5c7bd2 Upgrade to stringex 1.5 2012-11-29 16:50:52 -07:00
bootstraponline 06e72a5a60 Release 2.4.1 2012-11-19 17:22:28 -07:00
bootstraponline 8fa62fc300 @css is set in before 2012-11-19 17:16:53 -07:00
bootstraponline 6c345fc508 Update dependencies 2012-11-19 17:14:52 -07:00
bootstraponline a34eac4ecb Merge pull request #592 from dekimsey/global-custom-css
Fixed custom.css to apply to all views
2012-11-19 16:11:53 -08:00
bootstraponline 10c121e603 Merge pull request #585 from dekimsey/gitcode-embed-any-file
Modified gitcode to allow syntax highlighting of arbitrary files
2012-11-19 16:11:21 -08:00
Daniel Kimsey 2b910167f4 Fixed custom.css to apply to all views 2012-11-19 13:21:39 -05:00
Daniel Kimsey 7d5311a075 Modified gitcode to allow syntax highlighting of arbitrary files 2012-11-19 12:59:45 -05:00
bootstraponline f5581c4b49 Merge pull request #589 from shanebdavis/master
Fix #96
2012-11-18 19:25:05 -08:00
Shane Brinkman-Davis e09f7cd49c Proposed fix for https://github.com/github/gollum/issues/96
(statically hosted content in the images/ folder returns 404s)
(the problem was all content in javascript, css, and images folders was hard-coded to return 404s)
2012-11-18 09:53:27 -08:00
bootstraponline 4dab03b61b Merge pull request #588 from sunnyone/fix_host_option
Pass the value of --host parameter to Rack::Server
2012-11-17 13:04:38 -08:00
Yoichi Imai 2b5e017aa1 Pass the value of --host parameter to Rack::Server 2012-11-17 19:42:28 +09:00
bootstraponline 8b3d944fd2 Fix #586
Place ASCIIDOC test behind ENV var
2012-11-16 19:08:45 -07:00
bootstraponline 2d886fd38a Fix tests #587 2012-11-16 18:13:38 -07:00
bootstraponline 80088832b9 Fix #587
The default behavior prevented linking to header anchors. id_prefix
can still be set to 'wiki-' however it is no longer the default.
2012-11-16 17:45:56 -07:00
bootstraponline be1883f317 Use HTTPS rubygems
Update gemspec
2012-11-16 17:07:38 -07:00
bootstraponline 30119e0c77 Fix tests 2012-11-16 17:03:18 -07:00
bootstraponline c90c3b1544 Support git code syntax in live preview
Add autocrlf values for Windows, Linux, and OS X.
2012-11-16 16:57:39 -07:00
bootstraponline 578386f083 Add dir support to write_page 2012-11-16 16:43:43 -07:00
bootstraponline 3d21ed362e Add history view test 2012-11-14 21:03:24 -07:00
bootstraponline 9cf469b035 Fix ruby bits #574 2012-11-14 00:45:28 -07:00
bootstraponline 462c93ae43 Fix crash #574 2012-11-13 23:12:22 -07:00
bootstraponline bda3b7b24d Fix --user-icons 2012-11-13 22:56:30 -07:00
bootstraponline d861a22cdd Fix line endings 2012-11-13 22:55:57 -07:00
bootstraponline 0de1a182da Validate user_icons 2012-11-13 22:48:37 -07:00
bootstraponline b030554348 Fix default 2012-11-13 22:43:05 -07:00
bootstraponline 858bfa9ccd Merge pull request #574 from dekimsey/local-gravatar-identicons
Extendable user-icons with optional identicon js library.
2012-11-13 21:42:15 -08:00
Daniel Kimsey ee8ec78da7 Add --user-icons option: none, gravatar, and identicon. 2012-11-13 21:17:23 -05:00
bootstraponline c8f684895c Merge pull request #581 from dekimsey/log-opt-author
Changed history date to use authored date instead.
2012-11-13 16:54:14 -08:00
bootstraponline 138a155ba4 Merge pull request #582 from dekimsey/set-focus-buttons
On window popup, focus the first text-field, if any.
2012-11-13 16:53:34 -08:00
Daniel Kimsey ad749bf345 On window popup, focus the first text-field, if any. 2012-11-13 17:25:36 -05:00
Daniel Kimsey ff0d59c16b Changed history date to use authored date instead. 2012-11-13 15:02:55 -05:00
bootstraponline df75d2d60c Release 2.4.0 2012-11-11 15:08:45 -07:00
bootstraponline 2713aabeaf Update gemspec 2012-11-11 15:08:21 -07:00
bootstraponline 796d1b44c2 Update README.md 2012-11-11 14:46:58 -07:00
bootstraponline 470a7b8f52 Fix #579 2012-11-11 14:40:47 -07:00
bootstraponline f699b82a9f Fix #539 2012-11-11 14:18:14 -07:00
bootstraponline 44edb8c7da Merge pull request #576 from roman-zaharenkov/title_control
Page title control
2012-11-11 12:29:37 -08:00
bootstraponline bc4fc0edd9 Fix gitcode test 2012-11-11 13:14:25 -07:00
Roman Zaharenkov 6545fa691b Adjust page header / title generation.
Now page header can be generated by first h1 header from page content. But page title generated by URL is it was before.
2012-11-11 13:22:10 +03:00
Roman Zaharenkov 4954553927 Page title control
Allow to set page title by setting header inside page body. It will use header as title If header is present and page URL otherwise.
2012-11-11 13:20:14 +03:00
bootstraponline 9c50ba9eeb XSLT was never used 2012-11-10 17:02:27 -07:00
bootstraponline 9a67da145a Merge pull request #578 from github/fileview-hover-fix
Fileview hover fix
2012-11-10 15:59:28 -08:00
bootstraponline ca7d82278c Pretty print with nokogiri 2012-11-10 16:34:37 -07:00
bootstraponline f6245c53dd Add .gitattributes 2012-11-10 12:15:20 -07:00
bootstraponline 6888420cc6 Update file_view output 2012-11-10 12:15:19 -07:00
Daniel Kimsey c5631f5b7d Fixed a:hover not highlighting the a block correctly 2012-11-10 12:15:19 -07:00
Daniel Kimsey 34e0b49d72 Refactored the template generator to use new_page method 2012-11-10 12:15:19 -07:00
Daniel Kimsey bd072264ef Line-ending fix for _styles.css 2012-11-10 12:15:19 -07:00
bootstraponline cfb2d24c71 Merge pull request #577 from dekimsey/fix-page-metadata
Renamed page.meta_data => page.metadata
2012-11-09 18:03:12 -08:00
Daniel Kimsey fe0eb72fa3 Renamed page.meta_data to page.metadata for consistency with views 2012-11-09 18:29:49 -05:00
Daniel Kimsey 2783257f06 Added page.meta_data to tests 2012-11-09 18:25:33 -05:00
bootstraponline cc11cb866c Add css note
#572
2012-11-08 18:51:57 -07:00
bootstraponline 6a02643bda Merge pull request #573 from dekimsey/license-guidelines
Added bootstraponline's comment about licensing guidelines
2012-11-08 16:12:40 -08:00
Daniel Kimsey 7f269c8da3 Added bootstraponline's comment about licensing guidelines 2012-11-08 16:46:49 -05:00
bootstraponline ef7f7cebd1 Release 2.3.12 2012-11-07 20:37:50 -07:00
bootstraponline 05c24fd5e3 Fix #570
Fix #571
2012-11-07 20:35:57 -07:00
bootstraponline b08b97bd28 Release 2.3.11 2012-11-07 20:18:43 -07:00
bootstraponline dbb6ce2f71 Fix #570
Error in gollum.js broke new page button.
2012-11-07 20:17:50 -07:00
bootstraponline f66f14b593 Release 2.3.10 2012-11-07 19:47:09 -07:00
bootstraponline 8a52315dee Add base url to custom css 2012-11-07 19:46:27 -07:00
bootstraponline 7c4052906c Add custom css 2012-11-07 19:40:52 -07:00
bootstraponline 3a56f39f6a Fix readme 2012-11-07 19:17:49 -07:00
bootstraponline 6585ca5dd0 Fix space 2012-11-07 19:13:57 -07:00
bootstraponline 792abae07e Release 2.3.9 2012-11-07 19:11:04 -07:00
bootstraponline 74ce648c59 Options.fetch 2012-11-07 19:04:36 -07:00
bootstraponline 2686e96046 Release 2.3.8 2012-11-07 18:50:37 -07:00
bootstraponline 213e2bb432 Add config example 2012-11-07 18:48:07 -07:00
bootstraponline 79bb5c10ab Remove lib.so note 2012-11-07 18:46:36 -07:00
bootstraponline 7ea012d786 Fix code style 2012-11-07 18:45:20 -07:00
bootstraponline 43591f75de Merge pull request #570 from dekimsey/only-alert-on-changes
Only alert on changes
2012-11-07 17:39:30 -08:00
Daniel Kimsey 05d82c0569 Attach unsaved changes warning to trigger only after changes are made 2012-11-07 17:51:36 -05:00
Daniel Kimsey 76c8d3206c Consolidated create and edit page's javascript into the global gollum.js 2012-11-07 17:50:12 -05:00
bootstraponline 00751d05b4 Release 2.3.7 2012-11-06 18:27:05 -07:00
bootstraponline b5be5df11a Fix test name 2012-11-06 18:26:49 -07:00
bootstraponline 7d159273fc Merge pull request #569 from dekimsey/issue-568
Fixed #568, triple tilde without language causes Gollum to crash
2012-11-06 17:11:08 -08:00
Daniel Kimsey 70127922ab Added test for #568 2012-11-06 15:49:47 -05:00
Daniel Kimsey b95df93775 Fixes #568, triple-tilde without language causes crash 2012-11-06 15:39:39 -05:00
bootstraponline dc06edcf5b Add x.y.z 2012-11-05 17:30:01 -07:00
bootstraponline fdc437dcd5 Release 2.3.6 2012-11-05 17:28:51 -07:00
bootstraponline f6873c9612 Merge pull request #566 from dekimsey/deterministic-search
Gollum search results now displayed in a deterministic order
2012-11-05 16:17:40 -08:00
Daniel Kimsey 93754ab32d Sort by filename in addition to count 2012-11-05 18:01:50 -05:00
Daniel Kimsey 5759334635 Gollum search results are displayed in a deterministic order 2012-11-05 17:02:19 -05:00
bootstraponline f2f543b72d Release 2.3.5 2012-10-31 20:14:15 -06:00
bootstraponline 598b052be3 Fix clean
Duplicate slashes must be removed everywhere.
2012-10-31 20:11:23 -06:00
bootstraponline a746062422 Merge pull request #564 from nikitug/patch-1
Update README to new Sequence diagram markup style
2012-10-31 19:09:45 -07:00
Nikita Afanasenko c8868d369f Update README to new Sequence diagram markup style 2012-10-31 18:02:28 +04:00
bootstraponline 52c6e7474c Release 2.3.4 2012-10-28 20:59:06 -06:00
bootstraponline be81f09b0e Update gemspec 2012-10-28 12:43:51 -06:00
bootstraponline 6fa4504e31 Fix #551 2012-10-28 12:37:02 -06:00
bootstraponline 992ba01a12 Fix page file dir 2012-10-28 11:57:25 -06:00
bootstraponline 72c5a74cf1 Update test
The test passes when verified manually using bin/gollum. Without a running server the test
will fail so it has been commented out. If there's an easy way to mock Rack::Server
then the test can be restored.
2012-10-27 23:44:11 -06:00
bootstraponline 919f41a0f1 Fix #559 2012-10-27 23:44:11 -06:00
bootstraponline 785921cb0f Fix toc generation 2012-10-27 21:46:30 -06:00
bootstraponline 8c8cda5e7d Fix comment 2012-10-27 21:05:56 -06:00
bootstraponline 64ef74e7e9 Add preview button to live preview 2012-10-27 20:52:54 -06:00
bootstraponline 776df4e6ee Fix nokogiri rendering
https://github.com/sparklemotion/nokogiri/issues/782
2012-10-27 19:52:26 -06:00
bootstraponline 68465a8651 Set indent and encoding 2012-10-27 18:12:32 -06:00
bootstraponline fa16c8960c Fix #560 2012-10-27 17:58:14 -06:00
bootstraponline 2c57915781 Refactor fileview 2012-10-23 23:27:31 -06:00
bootstraponline d0527f1aeb Release 2.3.3 2012-10-23 22:58:41 -06:00
bootstraponline 75083c5b56 Fix collapse tree 2012-10-23 22:36:17 -06:00
bootstraponline 82526594db Add attr reader for collapse tree 2012-10-23 22:22:56 -06:00
bootstraponline 941d39800c Merge pull request #556 from adiknoth/fileview
Documentation and usability enhancement of recent fileview fix
2012-10-23 21:20:28 -07:00
bootstraponline a1ae2e8bc0 Fix #554 2012-10-23 22:14:45 -06:00
bootstraponline 4af6f366ca Fix show_all /pages 2012-10-23 22:09:27 -06:00
Adrian Knoth c7a9534ed9 Add --collapse-tree command line option 2012-10-23 14:27:15 +02:00
Adrian Knoth 00bcbbf72b File View: Add option to collapse file trees.
For potentially large repositories, starting with a collapsed tree may
be beneficial.
2012-10-23 14:27:12 +02:00
Adrian Knoth ed2254ff9f Add missing documentation for --show-all 2012-10-23 14:22:54 +02:00
bootstraponline b6633f0ecb Release 2.3.2 2012-10-22 19:21:10 -06:00
bootstraponline e08d2d3052 Enable show_all for /pages 2012-10-22 19:10:40 -06:00
bootstraponline fbc0548b43 Add --show-all
--show-all will show all files in file view (not just valid pages). Default is false.
2012-10-22 19:03:21 -06:00
bootstraponline a9807bd1e1 Update math note 2012-10-21 17:22:31 -06:00
bootstraponline 554b80b39d Add MathJax examples 2012-10-21 17:21:24 -06:00
bootstraponline 99e74bf00b Release 2.3.1 2012-10-21 17:16:40 -06:00
bootstraponline f48e923f28 Fix release 2012-10-21 17:15:09 -06:00
bootstraponline 5400b4bfdd Support inline and display math.
$$2^2$$

$2^2$

\\(2^2\\)

[2^2]
2012-10-21 17:15:09 -06:00
bootstraponline f68bebe0f6 Update math note 2012-10-21 16:26:35 -06:00
bootstraponline 4c6019b439 Update math note 2012-10-21 16:23:58 -06:00
bootstraponline 66e08a6b17 Release 2.3.0 2012-10-21 16:19:05 -06:00
bootstraponline 7898db70ed Auto load all MathJax extensions
Fix #549
2012-10-21 16:14:04 -06:00
bootstraponline 7c357116ff Remove TeX
As discussed with @vmg
MathJax is available via a flag for those self hosting gollum
2012-10-18 23:36:05 -06:00
bootstraponline 69ce0eb0d0 Update rake 2012-10-17 21:04:20 -06:00
bootstraponline 4db31a297b Update rake
Jekyll uses rake ~> 0.9
2012-10-17 21:03:29 -06:00
bootstraponline e1fca457e4 Restore gemnasium
Gemnasium fixed the missing pygments.rb issue.

https://github.com/laserlemon/gemnasium-parser/commit/c9b3e43c3021967d5c1bb115e7dd1555e01c6444
2012-10-17 20:54:01 -06:00
bootstraponline 7f8485ce80 Improve system requirements language 2012-10-16 22:31:25 -06:00
bootstraponline 290061fd11 Add system requirements to readme 2012-10-16 22:15:26 -06:00
bootstraponline a507836936 Update dependencies 2012-10-16 21:39:22 -06:00
bootstraponline 6524d20a96 Use pygments.rb 0.3.2 2012-10-16 21:36:37 -06:00
bootstraponline f1c523aa30 Release 2.2.9 2012-10-14 22:26:17 -06:00
bootstraponline 87c08f5613 Escape " in headers 2012-10-14 22:21:00 -06:00
bootstraponline 82913cea20 Improve base path note 2012-10-14 21:42:25 -06:00
bootstraponline 2ad743e4bd Release 2.2.8 2012-10-14 21:28:43 -06:00
bootstraponline fa97b57a96 Define default map as suggested on #460
Base path now sets a default map without having to use an external config.ru.
2012-10-14 20:57:27 -06:00
bootstraponline 1b952b6d56 Release 2.2.7 2012-10-14 17:24:33 -06:00
bootstraponline 90cc512bd1 Fix home loop with page-file-dir #491 2012-10-14 15:45:26 -06:00
bootstraponline b82556c9c0 Fix #460 2012-10-14 15:42:06 -06:00
bootstraponline fbe3b4bb3b Fix #460 2012-10-14 15:23:52 -06:00
bootstraponline 5ffd98ad31 Fix #491 2012-10-14 15:15:55 -06:00
bootstraponline cb9dd4d228 Fix formatting 2012-10-14 14:31:40 -06:00
bootstraponline cd823bf10c Add doc from wiki.rb 2012-10-14 14:31:00 -06:00
bootstraponline 5560ec52c2 Add base_path doc 2012-10-14 14:27:08 -06:00
bootstraponline 065151a77f Add base_path disclaimer 2012-10-14 14:25:27 -06:00
bootstraponline 23454f556c Release 2.2.6 2012-10-14 13:14:08 -06:00
bootstraponline a2b3ddf931 Update tests to XHTML 2012-10-14 13:07:18 -06:00
bootstraponline 44b0d2fcfc Remove old comment 2012-10-14 12:26:23 -06:00
bootstraponline aed4cc590a Fix unicode characters
Fix #547

Update test
2012-10-14 12:21:31 -06:00
bootstraponline 72ee08b5ab Release 2.2.5 2012-10-14 11:21:56 -06:00
bootstraponline 45547624e4 Improve tilde fence support
More than 3 tildes can be used. The code block must end with the same amount of tildes used to open the code block.

Fix #537

http://johnmacfarlane.net/pandoc/README.html#delimited-code-blocks
2012-10-14 11:02:45 -06:00
bootstraponline f928cfa8be Don't ship Lorem ipsum in gem 2012-10-13 20:21:08 -06:00
bootstraponline 988984846a Release 2.2.4 2012-10-13 20:01:57 -06:00
bootstraponline 1149618653 Fix #537 2012-10-13 19:53:41 -06:00
bootstraponline 168a033903 Remove old comment 2012-10-13 14:59:42 -06:00
bootstraponline 6a765c9791 Fix #537 2012-10-13 14:52:28 -06:00
bootstraponline e16ae7b511 Travis is having a bad day
E: There are problems and -y was used without --force-yes
before_install: 'sudo apt-get install -y asciidoc' returned false.
Done. Build script exited with: 1
2012-10-13 14:07:15 -06:00
bootstraponline 174334ea44 Remove comment 2012-10-13 13:58:56 -06:00
bootstraponline dbdf06930d Fix 2012-10-13 13:55:20 -06:00
bootstraponline c93e65ddc3 Merge branch 'master' of github.com:github/gollum 2012-10-13 13:32:19 -06:00
bootstraponline 56101ed264 Fix #535 and add test 2012-10-13 13:32:08 -06:00
bootstraponline 8269c8e574 TOC doesn't require ' 2012-10-13 13:11:31 -06:00
bootstraponline 2246419d1e Fix spacing 2012-10-13 13:09:20 -06:00
bootstraponline 118a0c318b Update comment 2012-10-13 13:06:15 -06:00
bootstraponline 5401cf2910 Fix #542 2012-10-13 13:04:51 -06:00
bootstraponline 432f9b8d2f Add test for #542 2012-10-13 12:57:58 -06:00
bootstraponline 66fc8a2d31 Revert "Fix #542"
This reverts commit 2f3dd3d227.
2012-10-13 12:55:43 -06:00
bootstraponline 2f3dd3d227 Fix #542
Page link may contain duplicate starting forward slashes.
//page points to http://page/ when what we want is
/page pointing to http://localhost:1234/page
2012-10-13 09:53:25 -06:00
bootstraponline c43fd9fa6c Update language comment 2012-10-12 21:19:24 -06:00
bootstraponline 868518e0f5 Bash is Ace mode sh 2012-10-12 20:58:05 -06:00
bootstraponline 039b5cce98 Try to fix Travis
FFI is no longer used in the new pygments.rb.
apt-get update may resolve the asciidoc install failure.
2012-10-12 20:24:31 -06:00
bootstraponline 4a421842d5 https://github.com/travis-ci/travis-ci/issues/725
Modified README to trigger a Travis CI build. It's currently broken.
2012-10-12 20:22:10 -06:00
bootstraponline cfbb124f81 Update README.md 2012-10-12 20:16:43 -06:00
bootstraponline dcb147cde2 Ensure declaredLanguage is lower case 2012-10-10 20:20:33 -06:00
bootstraponline 8d06b5e67e Fix pygments language to Ace mode translation 2012-10-10 20:16:04 -06:00
bootstraponline 4776d0b422 Use rake release in readme 2012-10-10 19:45:42 -06:00
bootstraponline 58bb340c33 Release 2.2.3 2012-10-10 19:43:30 -06:00
bootstraponline ee790a9b7c Add rake bump to readme 2012-10-10 19:38:53 -06:00
bootstraponline ac432aad78 Add bump task to Rakefile 2012-10-10 19:35:04 -06:00
bootstraponline 30207e0a39 Merge pull request #533 from wrs/wrs_syntaxfixes
Two little syntax highlighting fixes
2012-10-10 16:56:37 -07:00
Walter Smith d98547a33c Fix lack of CoffeeScript livepreview
Pygments calls it coffeescript, but Ace calls it coffee.
2012-10-10 14:20:50 -07:00
Walter Smith b7cdeabbf6 Catch all Pygments errors
An unrecognized language was generating a MentosError rather than a
PythonError. Just catch anything that goes wrong in Pygments.
2012-10-10 14:20:50 -07:00
bootstraponline be9907a0cc v2.2.2 2012-10-04 18:17:24 -06:00
bootstraponline 30f42c50a9 Fix #528 2012-10-04 17:18:47 -06:00
bootstraponline 7cba65b138 Gemnasium is not including all deps.
pygments.rb is missing for example. Will restore once Gemnasium has fixed the issue.
2012-10-01 23:50:35 -06:00
bootstraponline f34a78b336 Proc.new instead of lambda. 2012-10-01 23:45:04 -06:00
bootstraponline e1942dda03 Merge pull request #513 from bootstraponline/embed_code
Embed code. #508.
2012-10-01 22:36:25 -07:00
bootstraponline 7142e284fa .call instead of .() for 1.8.7 2012-10-01 23:29:15 -06:00
bootstraponline 3c1c588953 Restore wiki_factory. 2012-10-01 23:23:40 -06:00
bootstraponline 52cc6bae34 Update dependencies. 2012-09-29 13:50:11 -06:00
bootstraponline 955c608115 Update rake. 2012-09-29 13:40:02 -06:00
bootstraponline 2e00cf312c Merge pull request #524 from osener/patch-1
Update org-ruby
2012-09-29 12:17:59 -07:00
Ozan Sener 09bbc144d1 Update org-ruby
Fixes #81
2012-09-29 11:19:09 +03:00
bootstraponline d02b63a434 Fix test. 2012-09-26 00:08:11 -06:00
bootstraponline 9b63c67d8c Try to fix tests. 2012-09-25 23:57:35 -06:00
bootstraponline 05c4bf3374 Add local file support.
Example of absolute path to local file.
```html:/home```

Example of relative path to local file.
```html:home```

1.8.7 string fix. 's'[0..0] instead of 's'[0]

Fix regex.

Add absolute and relative tests.
2012-09-25 23:31:58 -06:00
bootstraponline 424b4d3f4e Remove debug statements. 2012-09-25 23:31:25 -06:00
bootstraponline f9a6187fab Fix undefined method `[]' for nil:NilClass 2012-09-25 23:31:08 -06:00
Henrik d406472882 1.8.7 fixes 2012-09-25 23:29:11 -06:00
Henrik 749b5a5ff8 Adding functionality for fetching code from github
hack for 1.8.7

Don't miss test_markup's relative require

need some food now
2012-09-25 23:29:08 -06:00
bootstraponline 091d5fe750 Update multibyte caracters. 2012-09-25 22:58:07 -06:00
bootstraponline c8894fb465 New pygments.rb works correctly.
The expected output from the tests differs only in newlines.

git diff makes it seem like everything changed. bzr qdiff has a better default diff. git doesn't do per char diffs.

Revert "New pygments has issues."

This reverts commit 2dd41cbfac.
2012-09-25 22:45:57 -06:00
bootstraponline 2dd41cbfac New pygments has issues.
Revert "Update pygments. Solves #225 #490 #517"

This reverts commit c0c77c5ba7.

Revert "Fix pygments.rb tests."

This reverts commit 1f2165e68b.
2012-09-25 21:54:49 -06:00
bootstraponline 1f2165e68b Fix pygments.rb tests. 2012-09-25 21:47:24 -06:00
bootstraponline e9b6bdbdd7 Add dependency status. 2012-09-25 21:38:09 -06:00
bootstraponline c0c77c5ba7 Update pygments. Solves #225 #490 #517 2012-09-25 21:36:37 -06:00
Corey Donohoe 12403172ac Merge pull request #521 from Vanuan/update_nokogiri
Update nokogiri
2012-09-25 12:16:50 -07:00
John Yani 3b41ab8d75 Update nokogiri 2012-09-25 22:04:43 +03:00
bootstraponline 7bcf35f5b1 Fix #517. Thanks @roa 2012-09-23 16:26:48 -06:00
bootstraponline 9a7e1c94c7 Merge pull request #515 from realmacsoftware/master
Populate author details using the session.
2012-09-16 10:32:33 -07:00
Keith Duncan 30c2e675da Test that author details from the session are committed into the repository 2012-09-16 16:49:17 +01:00
Keith Duncan ac405803e8 Add notes on providing author details to the Rack documentation section 2012-09-16 16:25:09 +01:00
Keith Duncan 7dee787a92 Add documentation for where the commit_message parameters are passed and where they're source from 2012-09-16 15:59:49 +01:00
Keith Duncan ae4b1cdeca Add support for author parameters coming in from the session, to be set by rack middleware further up the stack 2012-09-15 21:06:08 +01:00
bootstraponline 572982cbf9 Use a professional right left button. 2012-09-09 21:11:16 -06:00
bootstraponline 74290874f9 Fix #383 test. 2012-09-09 14:05:10 -06:00
bootstraponline 847f08d952 Use block form of gsub to avoid regexp backref interpolation
The content of this commit message is from @kislyuk's comments on the below two issues.

Fix #383
Fix #511

`gsub!(pattern, replacement) interpolates` regexp backreferences
`gsub!(pattern) do block` doesn't

http://stackoverflow.com/questions/2082457/ruby-gsub-problem-when-using-backreference-and-hashes
2012-09-09 12:22:56 -06:00
Neal Pisenti 0bcd616668 fix mathjax option, fixes #509 2012-09-09 11:50:48 -06:00
bootstraponline 9dd701ccc4 Grit is broken. #508 #356 2012-09-04 17:52:56 -06:00
bootstraponline 56a5a7d92b Fix #507 2012-09-04 16:24:16 -06:00
bootstraponline 0cf0fad50e Finish removing MathJax from Live Preview. 2012-09-02 15:27:32 -06:00
bootstraponline 5f9e91656e Fix LaTeX tests. 2012-09-02 15:03:56 -06:00
Vicent Marti a7a2479f85 Release 2.2.1 2012-09-02 22:43:50 +02:00
Vicent Marti a8b230a490 Properly escape TeX data. 2012-09-02 22:27:04 +02:00
bootstraponline 041b01f171 Fix #490 2012-09-01 12:33:08 -06:00
Vicent Marti 1c475f3215 Release 2.2.0 2012-09-01 12:24:17 +02:00
Vicent Marti ab699d94b0 Do not render LaTeX locally
Offload the rendering service to MathTran.org, the free and open-source
LaTeX rendering engine.
2012-09-01 12:23:02 +02:00
bootstraponline 942d32c9b6 Fix uninstall command 2012-08-30 21:36:11 -06:00
bootstraponline 97f15f0b18 Add edit hotkey. #496 2012-08-30 21:07:57 -06:00
bootstraponline ed49358c50 Add h1-3 shortcuts. #496 2012-08-30 20:54:20 -06:00
bootstraponline 85eeecd140 Add save hotkey. 2012-08-30 20:48:44 -06:00
bootstraponline 30fd40fbe5 Fix #498
Ruby 1.8.7 and ri can't deal with <!-- appearing in documentation.
Please upgrade to the latest Ruby if you're able to.
2012-08-30 20:29:53 -06:00
bootstraponline 2ed262cacd v2.1.9 2012-08-30 20:12:28 -06:00
bootstraponline 29a1ef8f8a Skip doc on install 2012-08-30 20:04:20 -06:00
bootstraponline 772d18ee62 Fix uninstall command 2012-08-30 20:00:54 -06:00
bootstraponline dd604d9942 Fix #498 2012-08-30 19:57:20 -06:00
bootstraponline 85abc83427 v2.1.8 2012-08-30 19:41:54 -06:00
bootstraponline 6d8220629c Fix #500 2012-08-30 19:37:57 -06:00
bootstraponline 6ff7ada096 Fix #495 2012-08-30 18:31:35 -03:00
bootstraponline 8575049de5 Update get /data
Remove leading slash from page
Fix edge case with path set to '/'
2012-08-30 11:40:07 -03:00
bootstraponline bb6fb0c253 pathName is undefined when not found instead of 0 2012-08-30 11:18:02 -03:00
bootstraponline eb2ad9f840 Fix path
.key now returns undefined on failure so path can be 0.
If path is undefined then use an empty string.
2012-08-30 11:14:24 -03:00
bootstraponline d0dd23fc11 Fix path 2012-08-30 11:09:44 -03:00
bootstraponline 7ae4acbdb0 Fix #497 #492
Data url now includes path.
2012-08-30 11:03:11 -03:00
bootstraponline 881590ab37 Merge pull request #494 from releu/fix-requiring-uri-encoding-components
Move require "uri_encode_component"
2012-08-28 18:33:18 -07:00
Jan Bernacki 5e479dc5d9 move require 2012-08-28 22:44:09 +04:00
bootstraponline 7db9c2e762 Merge pull request #487 from jm/master
Fix bug with missing variable 'ext'
2012-08-27 11:08:19 -07:00
bootstraponline ce6b0ac095 v2.1.7 2012-08-25 19:21:13 -06:00
bootstraponline 420bb06988 Fix create test. 2012-08-25 18:58:20 -06:00
bootstraponline 20566f8acf Fix #484 2012-08-25 18:54:07 -06:00
bootstraponline 1d5f69704a Clean paths so they start with one slash. 2012-08-25 18:41:13 -06:00
bootstraponline 0da664299e Fix edit. 2012-08-24 13:47:17 -06:00
bootstraponline 6e8fb2b457 Disable exact on edit for now. 2012-08-24 13:38:34 -06:00
bootstraponline d1c72a4ff3 Fix #483 and #481
Exact matching of requested pages

- /page is no longer the same as /a/page
- Deleting /page only deletes /page (before it would delete /a/page instead of /page)
- Edit currently breaks the unit tests if exact matching is enabled
- Fix redirect on create
- Add @giga's checked_dir = '' fix https://github.com/giga/gollum/commit/936958b47324a09c683cb90a2560484b47e09529
- Fix create unit test
2012-08-24 13:35:37 -06:00
bootstraponline 0bf05392e4 Redirect to correct path. #481 2012-08-24 12:26:59 -06:00
bootstraponline 7ecef0c045 Fix #479 2012-08-23 14:11:28 -06:00
bootstraponline 33ca329253 Handle nil slash. 2012-08-23 12:30:08 -06:00
bootstraponline 01fa4770cb Fix page lookup. #473 2012-08-23 12:16:40 -06:00
bootstraponline b76257c49c Restore foward slash. 2012-08-23 11:59:56 -06:00
bootstraponline e2fbf22f38 Fix #473. 2012-08-23 11:51:20 -06:00
bootstraponline 134432d029 v2.1.6 2012-08-23 11:33:00 -06:00
bootstraponline 8d4d6e80b8 Fix #475. 2012-08-23 11:27:40 -06:00
bootstraponline 85e6ef3dca v2.1.5 2012-08-22 19:57:22 -06:00
bootstraponline 60f1467229 Fix encoding for 1.8. 2012-08-22 18:51:41 -06:00
bootstraponline 1757242382 Don't unpack Fixnum. 2012-08-22 17:40:53 -06:00
bootstraponline 55df7bb9c4 Use encodeURIComponent instead of CGI::escape when output is sent to browser. 2012-08-22 17:30:46 -06:00
bootstraponline 686b8acd38 Fix encodeURIComponent on Ruby 1.8.
Replace .ord with .unpack('U')[0]
2012-08-22 17:23:08 -06:00
bootstraponline a5f9df6170 Restore CGI::escape. 2012-08-22 16:57:24 -06:00
bootstraponline 27f61a870a Merge pull request #477 from LuminosoInsight/master
Fix titles created with the "New" button.
2012-08-22 15:54:23 -07:00
bootstraponline a48e8d1c5c New editor style.
Disable MathJax in live preview. Parser isn't MathJax aware.
Performance of MathJax in live preview is not great.
Auto hide editor overflow.
2012-08-22 16:50:57 -06:00
bootstraponline b80f74bccd Remove protocol and host. 2012-08-22 13:32:18 -06:00
bootstraponline 1e768734ef Disable MathJax by default.
GitHub.com doesn't support MathJax. The parser is not MathJax aware which causes problems.

--mathjax enables MathJax.
2012-08-22 13:31:21 -06:00
bootstraponline 11c9cabeb3 Fix edit baseUrl. 2012-08-22 13:21:01 -06:00
bootstraponline 3a14ab92f0 Fix new page when using map '/wiki' in config.ru. 2012-08-22 13:15:18 -06:00
bootstraponline 62d5f52398 Fix anchor for Firefox. 2012-08-22 13:10:11 -06:00
Rob Speer 2b4848566c Fix names created with the 'New' button.
Previously, a page created with the 'New' button would get all of its
spaces turned into the + symbol when submitted, which Gollum would then
convert into "-plus-" in the title. So, for example, a request to create
a page called "Test page" would instead get "test plus page".

This change changes + to - in the parameter received by /create/.
2012-08-22 14:15:20 -04:00
bootstraponline 7c825e877c Remove protocol + host. 2012-08-20 15:51:07 -06:00
bootstraponline 8417c277e6 Fix delete link when using baseUrl. 2012-08-20 15:23:07 -06:00
bootstraponline 9cef423908 Remove default value in new page. 2012-08-19 14:25:02 -06:00
bootstraponline e73c84490e Remove prefix. #470. 2012-08-16 12:01:03 -06:00
bootstraponline 6cfc807db0 Revert still broken in Grit. 2012-08-15 12:22:03 -06:00
bootstraponline be366f8103 v2.1.4 2012-08-15 12:06:12 -06:00
bootstraponline 2d13bd796f Improve #470 fix. 2012-08-15 12:03:48 -06:00
bootstraponline 523f8f80ca Fix #470. 2012-08-15 11:48:17 -06:00
bootstraponline b76fef9143 Update version to 2.1.3 2012-08-13 11:37:56 -06:00
bootstraponline e935af83d5 Update gemspec. 2012-08-13 11:35:15 -06:00
bootstraponline d4e019ef42 Merge pull request #331 from tjh/home-page-link-issue
Redirect from root to /Home, fixes #250
2012-08-09 10:41:31 -07:00
bootstraponline 2e738828c6 Merge pull request #467 from jamesduncombe/pygments_initialize
Added Pygments.start to initialize Pygments on startup, fixes #465
2012-08-09 10:21:59 -07:00
James Duncombe fd7dc93778 Added Pygments.start to initialize Pygments on startup 2012-08-09 09:14:55 +01:00
bootstraponline 3df407d9ee Merge pull request #464 from giga/master
Fix editor when base url is '/'
2012-08-08 10:53:45 -07:00
Jean-Philippe Garcia Ballester 6fbba84725 Revert "Base path is relative."
This reverts commit 69e453ea0b.
2012-08-08 13:49:11 +02:00
Jean-Philippe Garcia Ballester 37d20fa9cc Base url without trailing '/'
This will allow cleaner url in templates and javascripts.
2012-08-08 13:49:09 +02:00
bootstraponline 410cd912ac Fix releasing. 2012-08-06 18:31:36 -06:00
bootstraponline d234bbd861 Test get %r{/(.+?)/([0-9a-f]{40})} do 2012-08-06 18:27:12 -06:00
Corey Donohoe 3f68d96815 setup proper gem version numbers 2012-08-06 16:32:16 -07:00
bootstraponline 015cd895d2 Don't ignore version. 2012-08-06 17:18:30 -06:00
bootstraponline 5fa4b48d85 Fix new page default dir. 2012-08-06 15:57:46 -06:00
bootstraponline 88a3783bbc Remove wpage. 2012-08-06 15:55:05 -06:00
bootstraponline ea2254b9bd Fix #462.
Add test for 462.
2012-08-06 15:52:19 -06:00
bootstraponline 9a0c1f2605 Fix path. 2012-08-06 15:18:15 -06:00
bootstraponline 008f26bb7d Fix app. 2012-08-06 14:49:56 -06:00
bootstraponline 69e453ea0b Base path is relative. 2012-08-06 14:28:24 -06:00
bootstraponline 88b0b608f4 Add null guard. 2012-08-06 13:49:48 -06:00
bootstraponline 19e3987ae3 Fix path escaping. 2012-08-06 13:36:28 -06:00
bootstraponline c72e91ddaf Fix #462. 2012-08-06 13:16:31 -06:00
bootstraponline c789dd5067 Update org-ruby. 2012-08-02 19:45:06 -06:00
bootstraponline 551949de29 Fix #459. 2012-08-02 16:55:24 -06:00
bootstraponline 80730ee87a Merge pull request #419 from trans/metadata
Add support for embedded page metadata.
2012-08-01 16:05:10 -07:00
trans 71028adc9e Add support for embedded page metadata. 2012-08-01 18:35:53 -04:00
bootstraponline a2efebc06c Fix #453. 2012-08-01 13:04:04 -06:00
bootstraponline a4e277a86b Update gemspec. 2012-08-01 10:20:53 -06:00
bootstraponline 494c80d8b1 Add home button. 2012-08-01 01:53:30 -06:00
bootstraponline 02539bfdd3 Move new page dir logic to JS. 2012-08-01 01:49:38 -06:00
bootstraponline a0f05eaf67 More refactoring.
Fix delete.
2012-08-01 01:36:23 -06:00
bootstraponline 72e26fc90b Refactor app.rb to use paged.
Create new pages relative to current directory.
2012-08-01 00:37:34 -06:00
bootstraponline 2261cfabf3 Make wiki.page directory aware.
Remove scoped_page.
2012-07-31 23:24:37 -06:00
bootstraponline c1afa2a0e3 Path is now sent on rename. 2012-07-31 22:13:04 -06:00
bootstraponline d28f454c6e Send path when renaming pages.
Fix nil error on editing a non-existent page.
Use baseURL on delete.
2012-07-31 21:58:35 -06:00
bootstraponline f471c80ac0 Merge pull request #455 from ennova/scoped-page
Add a method that returns a given page name scoped to a directory.
2012-07-31 20:18:38 -07:00
Odin Dutton and Sebastian Korfmann be086d94b5 Add a method that returns a given page name scoped to a directory.
This is to allow access to non unique pages.
2012-08-01 09:15:25 +10:00
bootstraponline ff719510b6 Merge pull request #454 from kislyuk/master
Don't stop highlighting if one code block throws an exception.
2012-07-31 11:13:58 -07:00
Andrey Kislyuk 7b16116b67 Proceed with highlighting if one code block fails 2012-07-31 08:44:38 -07:00
bootstraponline 8422b71204 @arr2036's fix for #453. 2012-07-30 19:04:10 -06:00
bootstraponline c9bc2a89f6 Delete link now works with directories.
Fix #452.
2012-07-27 15:03:26 -06:00
bootstraponline 387a52a7ba Remove extra / in delete href. 2012-07-27 14:54:34 -06:00
bootstraponline 96842d9742 Refactor page url generation.
Avoid appending './' to urls.
2012-07-27 14:45:40 -06:00
bootstraponline 8fcef5401b Fix href in file view. 2012-07-27 12:27:16 -06:00
bootstraponline 804c4c678d Fix #446.
The old regex turns 'a/b/c/' into 'a/' which is not correct.
The new regex is directory aware.
2012-07-27 12:14:06 -06:00
bootstraponline 8558777ece Include full path in file view href. 2012-07-27 11:34:04 -06:00
bootstraponline 77bb608878 Fix #446. 2012-07-27 11:08:11 -06:00
bootstraponline 2f574261a7 Merge pull request #359 from sunny/base-url
Relative urls.
2012-07-25 09:55:26 -07:00
Sunny Ripert 28c4a2c39e Merge pull request #2 from giga/base-url
Fix relative url
2012-07-25 07:59:01 -07:00
Jean-Philippe Garcia Ballester bd36cb59b1 Fix relative url 2012-07-25 12:33:48 +02:00
Jean-Philippe Garcia Ballester 998358ada8 Fix relative url 2012-07-25 12:27:00 +02:00
Sunny Ripert 75a00e8821 baseUrl missing on page rename 2012-07-25 11:20:53 +02:00
Sunny Ripert b5653464d2 Merge branch 'master' into base-url
Conflicts:
	lib/gollum/frontend/public/gollum/css/_styles.css
	lib/gollum/frontend/public/gollum/javascript/gollum.js
	lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js
	lib/gollum/frontend/templates/file_view.mustache
	lib/gollum/frontend/templates/layout.mustache
	lib/gollum/frontend/templates/page.mustache
2012-07-25 10:00:52 +02:00
Sunny Ripert 0269cd0b3b Merge pull request #1 from giga/base-url
Base url
2012-07-25 00:49:18 -07:00
Jean-Philippe Garcia Ballester 88ed662fd4 Fix editor to work with “base_url” 2012-07-24 23:51:49 +02:00
Jean-Philippe Garcia Ballester 7c180c86a4 Set wiki “base_path” option to fix “base_url”
If the “base_path” option of the wiki is not set, set it to the base url.
  It will make links work seamlessly when mounting to a relative url.
2012-07-24 23:46:22 +02:00
bootstraponline f811ac510e Improve names. Fix #447. 2012-07-22 21:04:02 -06:00
bootstraponline 3e5054f357 Call to_url on rename to prevent invalid renames.
Remove to_url on delete so invalid names can be deleted.
Handle nil in to_url.
Update tests.
2012-07-22 13:45:30 -06:00
bootstraponline 3424a424a7 Add /delete test. 2012-07-22 13:25:25 -06:00
bootstraponline 8eb8af8ef8 Use old name default text on rename. 2012-07-21 21:00:14 -06:00
bootstraponline 8eaf7fc497 Remove msg. 2012-07-21 16:57:20 -06:00
bootstraponline 3255709399 Don't mess with the commit message. 2012-07-21 16:52:18 -06:00
bootstraponline 2dbea36b81 Add rename button. Fix #444. 2012-07-21 16:31:38 -06:00
bootstraponline e0b7009bff Add delete this Page based on .com.
Match short sha commit message of .com for edit and delete.
Update tests.
2012-07-21 15:33:43 -06:00
Vicent Marti 77fb5ec3cb Fix parsing extra whitespace in code blocks 2012-07-21 15:34:56 +02:00
bootstraponline 7392bce5dc Restore livepreview.
Improvements include:
- UTF-8 aware
- Undo and redo support
- Code highlighting fixes
- New tests ensure output matches native sundown

Use jquery 1.7.2
2012-07-18 18:11:19 -06:00
bootstraponline 8188bbd35d Add mousetrap. 2012-07-18 18:03:26 -06:00
bootstraponline 80fdea7bfb Fix #437.
Add hotkey support using mousetrap.
2012-07-18 14:17:50 -06:00
bootstraponline dc9f6ac709 Display to_url name on create. 2012-07-18 12:29:03 -06:00
bootstraponline ba796bc23d Comment out test. See #363. 2012-07-18 10:35:53 -06:00
bootstraponline e0ecb4c44f Fix #435. 2012-07-17 15:29:34 -06:00
bootstraponline d4c05304e9 Fix #434. 2012-07-17 15:22:37 -06:00
bootstraponline ccdbd71517 Fix style. 2012-07-17 11:19:54 -06:00
bootstraponline 454fce09c6 Merge pull request #441 from haad/upstream-gollum-path
Add --gollum-path [PATH].
2012-07-17 10:15:32 -07:00
bootstraponline be4b12b4c8 Use .times.
Fix style.
2012-07-17 11:12:59 -06:00
bootstraponline 9fa629de31 Use range instead of upto. 2012-07-17 11:01:52 -06:00
bootstraponline 78dd5774b3 Fix code style. 2012-07-17 10:55:57 -06:00
bootstraponline bb9a9cd0db Merge pull request #440 from haad/upstream
Add support for multi-level directory setups, where files are under mult...
2012-07-17 09:46:34 -07:00
Adam Hamsik ab9d8fb3db Add option to define gollum path from command line. This way we can use different git repo for wiki files and different repo for
gollum.
2012-07-17 15:25:55 +02:00
Adam Hamsik 6ce76af2be Fix tests. 2012-07-17 12:00:42 +02:00
Adam Hamsik 3199a4b2cb Remove debug puts. 2012-07-17 11:10:09 +02:00
Adam Hamsik 6a2d153c3d Add support for multi-level directory setups, where files are under multiple directories.
Generate HTML for them properly.
2012-07-17 11:06:04 +02:00
bootstraponline bfd4ad9255 Async loading of MathJax.
http://calendar.perfplanet.com/2011/the-art-and-craft-of-the-async-snippet/
2012-07-13 14:25:53 -06:00
bootstraponline 30224515fd Update table style to match .com. 2012-07-13 14:11:10 -06:00
bootstraponline d7f3acfd05 Disable live preview until a robust JavaScript based markdown parser is found. 2012-07-13 00:42:26 -06:00
bootstraponline a9e9eeeb54 Another encoding fix from #387. 2012-07-12 12:06:47 -06:00
bootstraponline 76fa52b313 Merge pull request #387 from arr2036/fix_encoding
Work around Grit encoding issues.
2012-07-12 11:03:19 -07:00
bootstraponline 67de8e6a3a Fix to_url so it correctly handles _Header, _Footer, and _Sidebar. 2012-07-11 20:10:59 -06:00
bootstraponline ff78998829 30px height. 2012-07-11 16:12:27 -06:00
bootstraponline 55786e2d29 Uninstall old gollum before installing the new gem. 2012-07-11 10:35:37 -06:00
bootstraponline 20534a71b9 Remove New Page from file view. 2012-07-11 10:23:01 -06:00
bootstraponline 316b6feccb Write_page changes not yet merged. 2012-07-10 11:46:00 -06:00
bootstraponline 6c7417e0a2 Add transliteration test. 2012-07-10 11:40:36 -06:00
bootstraponline af89dc881e Merge pull request #424 from bootstraponline/unicode_to_ascii
Ensure page file names are ASCII.
2012-07-10 09:52:57 -07:00
bootstraponline 5714cef3de Page names are no longer case sensitive. 2012-07-10 10:47:15 -06:00
bootstraponline 3d2c8e7cc5 ASCII only filenames.
Fix test_unicode.
2012-07-10 10:41:55 -06:00
bootstraponline 772ffcc5e8 Ensure ascii only filenames. Fix #423. 2012-07-09 13:22:45 -06:00
bootstraponline 8c30bb3a9f Merge pull request #422 from nature/sidebar_rendering_in_subfolders
Sidebar rendering in subfolders.
2012-07-09 09:19:11 -07:00
bootstraponline 89bc121d3f Merge pull request #421 from nature/create_new_page_in_subdir
Make the 'New Page' button create pages in sub directories.
2012-07-09 09:15:42 -07:00
Darren Oakley 1cc9d7b647 Slight optimisations...
- only create a new GitAccess object if the wiki does not have a @page_file_dir directive
- memoize the new GitAccess object
2012-07-09 13:01:40 +01:00
Darren Oakley 50e494e8e9 Make pages inherit their sidebar/header/footer from parent directories regardless of the current 'page_file_dir' of the wiki. refs #413 (https://github.com/github/gollum/issues/413) 2012-07-09 12:10:41 +01:00
Darren Oakley 19325930a2 Add a new file and sub-directory - 'Rivendell/Elrond.md' so we can test Sidebar/Header/Footer inheritance from parent directory. 2012-07-09 11:50:08 +01:00
Darren Oakley ac97f7e9a2 Make the 'New Page' button create pages in sub directories if the user puts a slash in the path/page name. 2012-07-09 10:41:51 +01:00
bootstraponline 33f133b8b2 Livepreview is 102KB again.
java -jar compiler.jar --compilation_level WHITESPACE_ONLY --js sundown_o2_m0.js --js_output_file sundown_o2_wo.js

MKDEXT_SUPERSCRIPT extension disabled to match .com behavior (also fixes MathJax).
2012-07-06 23:26:12 -06:00
bootstraponline 2e9995e80a Use sundown_o2_m0. Fix #415. 2012-07-06 16:20:53 -06:00
bootstraponline 53f676bf2e Do not load data on github.com. 2012-07-06 12:21:55 -06:00
bootstraponline 874d658d2a Ace is broken on Safari 6. Fix #414. 2012-07-06 12:01:45 -06:00
bootstraponline d27c455ab7 Update sundown. 2012-07-05 12:01:09 -06:00
bootstraponline 9291431c61 Fix #413. 2012-07-04 12:24:35 -06:00
bootstraponline 2e5f51e9ae Update comment. 2012-07-04 11:20:38 -06:00
bootstraponline 2aa7e466ed File view links use '-' instead of %20. 2012-07-04 11:04:51 -06:00
Jeremy McAnally 3767a11d21 Rename variables to be more clear and fix reference to non-existent 'ext' variable 2012-07-04 12:33:09 -04:00
bootstraponline 8c8b72d482 Restore path support to livepreview.js. 2012-07-03 23:55:28 -06:00
bootstraponline bb9effa282 Prevent wrapping on long file names.
Fix formatting.
2012-07-03 20:41:14 -06:00
bootstraponline 52e96bfa0f Detect typed array support based on user agent.
http://caniuse.com/typedarrays
2012-07-03 15:26:40 -06:00
bootstraponline 00ded65b7f Fall back to old edit mode if typed arrays are not supported. 2012-07-03 14:47:27 -06:00
bootstraponline f738aa4234 Disable ie 9 live preview support for now. 2012-07-03 14:19:27 -06:00
bootstraponline 6ff939451c Update livepreview.
Update ace.
Replace pagedown with sundown. Live preview is now able to render markdown identical to regular gollum by leveraging the same library.

Thanks to @kripken for explaining how to best use emscripten for sundown.
2012-07-03 13:55:08 -06:00
bootstraponline 32930cee01 extract_path fails on nil paths. 2012-07-03 10:55:42 -06:00
bootstraponline 3f45c76f48 Extract path on edit. Fix #410. 2012-07-03 10:53:18 -06:00
bootstraponline 1511baf12d Restore Home.md. 2012-07-02 10:37:46 -06:00
bootstraponline 20dd0816a6 Revert "Merge pull request #379 from pipex/latex-dollar-sign"
This reverts commit b53c961db2, reversing
changes made to 9c40cbea76.
2012-07-02 10:27:30 -06:00
bootstraponline 41cd43ebc6 Updated Home (markdown) 2012-07-02 10:18:40 -06:00
Sunny Ripert 4a63899722 Livepreview JavaScript fix for base_url 2012-07-02 15:03:01 +02:00
Sunny Ripert c31ead493a Fixed tests to make up for base url 2012-06-28 17:31:19 +02:00
Sunny Ripert 7485733fba Sinatra base url to allow subdirectories 2012-06-28 17:31:19 +02:00
bootstraponline e930b5d07b Merge pull request #390 from arr2036/app_rest_fix
App rest fix.
2012-06-26 13:27:57 -07:00
Arran Cudbard-Bell 4543781153 Add tests to check page redirects to create 2012-06-24 22:41:27 +01:00
Arran Cudbard-Bell 1d5bfbb162 Add URL for page creation to allow preemption by extensions 2012-06-24 22:41:27 +01:00
bootstraponline 7045f7f92d Fix searching for page titles. 2012-06-22 16:04:57 -06:00
bootstraponline 5e7974f30b Fix file ext removal.
a = '/.md/home.md'

a.chomp(File.extname(a))
=> "/.md/home"

a.gsub(File.extname(a),'')
=> "//home"
2012-06-22 11:45:42 -06:00
bootstraponline 1079a888d3 nil.to_i == 0 2012-06-22 11:28:34 -06:00
bootstraponline b1837abbc2 Fix nil error in search. 2012-06-22 11:24:13 -06:00
bootstraponline 611e1a536c Merge pull request #403 from trans/file
Add Wiki#files for list of non-page files.
2012-06-22 09:59:31 -07:00
bootstraponline c152ae1557 Merge pull request #401 from nature/make_gollum_search_count_additive
Update the Wiki.search function to make the results counts 'additive'.
2012-06-22 09:49:04 -07:00
bootstraponline de3020c1aa Merge pull request #400 from nature/new_page_within_dir
Add a 'New Page' button to the /pages browser.
2012-06-22 09:48:23 -07:00
trans f12c3fe06f Fix docs for File#populate. 2012-06-22 08:45:57 -04:00
trans 754485c306 Add Wiki#files for list of non-page files. 2012-06-22 08:23:46 -04:00
Darren Oakley 088448a8a1 Update the Wiki.search function to make the results counts 'additive'.
i.e. so if we have a file named 'foo' that also contains the word 'foo' is should report 2 matches, not 1.
2012-06-22 12:01:39 +01:00
Darren Oakley 6e35a09abd Add a 'New Page' button to the /pages browser that allows users to create a new page within a subdirectory. 2012-06-22 11:41:42 +01:00
bootstraponline 8fd11e8fdb Fix #396.
Use ls-files to search file names (which define the page title).
2012-06-21 19:18:46 -06:00
bootstraponline 40855103ad Disable failing test. 2012-06-21 17:26:19 -06:00
bootstraponline 02041dbdb7 Work around #363 (grit is broken). 2012-06-21 16:45:38 -06:00
bootstraponline 18ccc01501 Remove #head boarder in /pages because it's now defined by .breadcrumb. 2012-06-21 13:16:34 -06:00
bootstraponline 1ff3f9c0da Merge pull request #393 from nature/dir_support
Add Directory Support.
2012-06-21 09:39:12 -07:00
Darren Oakley 7a251248f1 Re-work the compare URL matchers so that CGI escaping etc shouldn't be so needed. 2012-06-21 15:59:10 +01:00
Darren Oakley 971cbb94f6 Make the Sinatra app directory aware. 2012-06-21 15:59:01 +01:00
bootstraponline b53c961db2 Merge pull request #379 from pipex/latex-dollar-sign
[New] Support `$` and `$$` as formula delimiters.
2012-06-19 13:22:49 -07:00
bootstraponline 9c40cbea76 Merge pull request #377 from pipex/latex-align
[Fix] Inline latex formula alignment
2012-06-19 13:22:26 -07:00
bootstraponline a8ce7e93cd Enable MathJax for live preview. 2012-06-19 11:58:09 -06:00
bootstraponline 4b02b74d6f Fix #389.
Set page name correctly on preview.
2012-06-19 10:59:24 -06:00
Arran Cudbard-Bell 67dd3afd92 Fix for 1.8 versions of ruby 2012-06-19 15:33:47 +02:00
bootstraponline 7aca7fa0ec Update Ace. 2012-06-18 12:32:27 -06:00
bootstraponline c0564a1467 Update readme. 2012-06-18 12:32:14 -06:00
bootstraponline b0a8984d3b Update livepreview for new Ace. 2012-06-18 12:31:30 -06:00
bootstraponline 0f451d6833 Fix #386. File view defines its own layout. 2012-06-18 10:54:14 -06:00
Arran Cudbard-Bell c704d1f3b3 Hacky fix for encoding issues 2012-06-18 09:44:20 +02:00
bootstraponline e6d568fd49 Merge pull request #385 from bootstraponline/sequence_no_conflict
Fix #376.
2012-06-17 15:20:19 -07:00
bootstraponline ee56509302 Fix #376.
New syntax for sequence diagrams is {{{{{{ }}}}}}.
2012-06-17 16:11:59 -06:00
bootstraponline bc5896b51f Update readme. 2012-06-17 16:01:48 -06:00
bootstraponline 3224f5f422 Document building the gem from master.
[ci skip]
2012-06-16 12:17:13 -06:00
Felipe Lalanne f9cd97edaa [Fix] Replaced random escaping of $
The `$` symbol is now escaped by replacing it with a static string.
2012-06-11 20:18:22 +02:00
bootstraponline e1ce3d46de Fix location for live preview. 2012-06-11 10:07:17 -06:00
Felipe Lalanne 294a8e9642 [New] Support $ and $$ as formula delimiters.
Although the standard formula delimiters for latex formulas is currently
`\(` and `\[`, the `$` syntax has an advantage from the point of view of
writing speed, very important if we intend to use *gollum* as a writing
tool.

The code includes support for escaping of the `$` symbol by using the
gollum syntax `'`.
2012-06-11 12:06:54 +02:00
Felipe Lalanne 44fb6d9648 [Removed] Unnecessary require 'time' line. 2012-06-11 11:39:37 +02:00
Felipe Lalanne 74c1ba1653 [Fix] Inline latex formula alignment
Fixed an issue of latex inline formulas not aligning correctly with
the text. The fix is a ruby translation of the Perl code described in
http://tex.stackexchange.com/questions/44486/pixel-perfect-vertical-alignment-of-image-rendered-tex-snippets.
This code calculates the alignment of the generated image depending on
the image size and the size of the white space between the formula and
the margins of the image.

The alignment now is nearly perfect, however the new rendering comes
with a performance impact because of the increased number of operations.
To reduce this impact, the generated images and calculated values for
the alignment are now cached in `~/.cache/gollum`. The caching is done
per formula and not per page, thus avoiding caching the same formula
twice.

The Readme and tests have been modified accordingly with the new tool
requirements and expected markup.
2012-06-11 11:25:25 +02:00
bootstraponline 0cb39f049f Fix IE check. 2012-06-08 16:57:19 -06:00
bootstraponline f7a3a8aa55 Live preview supports IE 9. 2012-06-08 16:54:28 -06:00
bootstraponline cbc37eb006 Fix live_preview option #374. 2012-06-08 16:39:44 -06:00
bootstraponline 097f45eeb3 Use Ace for code highlighting.
Update Ace.
Fix CSS for new Ace.
Prevent flickering of toolpanel.
Add GitHub theme for Ace.
Remove gutter in static highlight ext.
Update languages for Ace.
2012-06-08 15:50:20 -06:00
bootstraponline 4c5b3dd76f Remove highlightjs.
Remove old Ace.
2012-06-08 15:49:05 -06:00
bootstraponline ccf70590a4 Merge pull request #374 from arr2036/optional_livepreview
Optional livepreview
2012-06-07 09:08:58 -07:00
Arran Cudbard-Bell 3c709a27ac Add commandline option for disabling livepreview 2012-06-07 18:05:15 +02:00
Arran Cudbard-Bell 8554654ee9 Add option to disable livepreview from settings 2012-06-07 11:30:30 +02:00
bootstraponline 59ac86cf6e Add header example to readme. 2012-06-05 15:56:02 -06:00
bootstraponline a4ecc9a187 Merge pull request #371 from bootstraponline/searchfix
Search fix (#348 with assert_not_match replacement).
2012-06-03 15:42:21 -07:00
bootstraponline cc67c8b68e Don't use assert_not_match. 2012-06-03 16:37:47 -06:00
bootstraponline b41f660fec Merge pull request #358 from blmarket/koreanfix
Use grit with force_encoding('ascii-8bit')
2012-06-03 15:00:37 -07:00
bootstraponline 00edcbbf64 Move build status to top of readme. 2012-06-03 15:56:29 -06:00
bootstraponline c530c70575 Add tests for file_view. 2012-06-03 15:53:11 -06:00
bootstraponline 21840bb344 Remove debug code. 2012-06-03 14:00:50 -06:00
bootstraponline 57bc23779d Merge pull request #370 from cholick/master
File View doesn't work when there's a single subdirectory
2012-06-03 12:41:23 -07:00
Matt Cholick (phenom2-desktop) 78e649f30a fix for broken file view when only a single directory 2012-06-03 11:56:18 -05:00
blmarket eaa7a61f71 Fixed 1.8.7 compatible issue 2012-05-31 21:27:27 +09:00
Neon 150a019b8d Added test cases to test Unicode handling issue.
these test cases will fail on non-unicode testing environment
2012-05-31 20:14:21 +09:00
Jeong, Heon 5dd1158025 Use grit with force_encoding('ascii-8bit') 2012-05-31 20:14:21 +09:00
bootstraponline c60ca4a8d2 Merge pull request #367 from bootstraponline/browser_fallback
Enable live preview only for supported user agents.
2012-05-29 17:35:01 -07:00
bootstraponline e1b28f0805 Rename is_supported to supported_useragent?. 2012-05-29 18:28:19 -06:00
bootstraponline aeeaeb1eae Fall back to old edit mode for browsers that are not officially supported by Ace. 2012-05-29 16:32:39 -06:00
Corey Donohoe 76f87f9094 stay on 1.8.7 for the foreseeable future
Settles #365 for now
2012-05-28 10:55:59 -07:00
bootstraponline 01e1c92813 Add --base-path option. 2012-05-24 20:45:33 -06:00
bootstraponline 22c0206451 Call page.versions once. 2012-05-24 18:32:45 -06:00
bootstraponline 5173c258b7 Merge pull request #354 from bootstraponline/mathjax
Add MathJax (only for gollum, not github.com).
2012-05-24 16:24:44 -07:00
bootstraponline ff8b892ebe Add mathjax using SSL CDN. 2012-05-24 17:18:55 -06:00
bootstraponline 7b0988cc19 Remove empty line. 2012-05-24 17:10:05 -06:00
bootstraponline a4c79f09f8 Gem uninstall does not require sudo (pointed out by @michaelklishin). 2012-05-24 16:48:54 -06:00
bootstraponline 7ec3d92215 Merge pull request #361 from github/travis-fixes
nuke the ffi gem on travis boxes
2012-05-24 15:43:21 -07:00
Corey Donohoe ac9fef784a nuke the ffi gem on travis boxes
/cc @bootstraponline @akzhan
2012-05-24 15:31:54 -07:00
bootstraponline 4822bad4fb Merge pull request #355 from bootstraponline/author_fix
Fix author info (based on #350).
2012-05-23 11:40:26 -07:00
bootstraponline d7dd90f073 Update README.md 2012-05-23 11:12:29 -06:00
Neon bbc19d1800 Added testcase for 'open existing parent' 2012-05-24 00:04:45 +09:00
Jeong, Heon 9ee9e61312 Fix searching in page_dir if it exists
This bug can cause DuplicateError even there is no such file

in page_dir
2012-05-23 23:58:54 +09:00
bootstraponline f765137f3f Avoid nil. 2012-05-23 00:04:57 -06:00
bootstraponline e160822b0f Only use versions. 2012-05-22 23:48:56 -06:00
bootstraponline c0e35b0126 Avoid nil. 2012-05-22 23:03:23 -06:00
bootstraponline ac41ed629e Merge modified #350. 2012-05-22 22:46:15 -06:00
Kristi 8b5dfff2a1 Merge pull request #343 from kristi/toc
Table of contents feature
2012-05-22 13:14:25 -07:00
kristi e77154bf7a Merge remote-tracking branch 'upstream/master' into toc 2012-05-22 12:14:03 -07:00
kristi 5f5187e05c Only set parentpage if a subpage was found
Fixes error if there's no header or footer
2012-05-22 11:55:02 -07:00
bootstraponline 5db1728a3f Use org-ruby 0.6.3. Fixes #86. 2012-05-22 09:49:11 -06:00
bootstraponline c7984ceed1 Revert "Merge pull request #350 from blmarket/pageauthor"
This reverts commit 5d3571b7a3, reversing
changes made to c1082b4474.
2012-05-21 17:09:15 -06:00
bootstraponline 5d3571b7a3 Merge pull request #350 from blmarket/pageauthor
Proper last edit info (with test case)
2012-05-21 16:00:15 -07:00
bootstraponline c1082b4474 Fix click. 2012-05-21 10:39:11 -06:00
bootstraponline 14f16349c0 Remove unload on save. 2012-05-21 10:35:29 -06:00
bootstraponline aa7e01a085 Add unload confirmation on live preview, edit, and create. 2012-05-21 10:27:16 -06:00
bootstraponline 484629734e Update README.md 2012-05-21 10:17:05 -06:00
bootstraponline 444fca2250 Revert changes to Home. 2012-05-21 10:02:55 -06:00
bootstraponline 7f17102c86 Remove home.md. 2012-05-21 10:00:06 -06:00
bootstraponline e480998a4c Merge pull request #345 from bootstraponline/file_view
Add file view.
2012-05-21 08:58:14 -07:00
bootstraponline 5c642997fe Origin is undefined in Firefox. 2012-05-21 09:50:23 -06:00
bootstraponline 5be5cd5ba5 Updated Home (markdown) 2012-05-21 09:49:22 -06:00
bootstraponline 1d55ed0599 Updated Home (markdown) 2012-05-21 09:49:12 -06:00
bootstraponline 4380aa9803 Updated Home (markdown) 2012-05-21 09:45:39 -06:00
bootstraponline 66e7f240da Updated Home (markdown) 2012-05-21 09:45:14 -06:00
bootstraponline f3e5816547 Updated Home (markdown) 2012-05-21 09:45:08 -06:00
bootstraponline 3d5931c259 Updated Home (markdown) 2012-05-21 09:44:52 -06:00
bootstraponline d510c74456 Updated Home (markdown) 2012-05-21 09:44:27 -06:00
bootstraponline 7154220d0b Updated Home (markdown) 2012-05-21 09:44:19 -06:00
bootstraponline d5155273df Move script tags to bottom. Refactor livepreview logic into livepreview.js. 2012-05-20 12:34:32 -06:00
Jeong, Heon 60dbe9d0a7 Proper last edit info
but it can be slow if page modified so many times
2012-05-20 12:37:10 +09:00
bootstraponline f7d3f6b3f0 Don't wait for onload. 2012-05-18 15:57:41 -06:00
bootstraponline 40fdd2aa74 Adjust save text. 2012-05-18 15:49:57 -06:00
bootstraponline f39ed93ca0 Use default commit message in comment window. 2012-05-18 15:32:14 -06:00
bootstraponline 541b2fabb4 Add new page button to file view action panel. 2012-05-18 15:00:23 -06:00
bootstraponline 067ad72f34 Update icon license. 2012-05-18 13:12:14 -06:00
bootstraponline 6c137e39c9 Add file view button. 2012-05-18 13:05:08 -06:00
bootstraponline f8c6cdb207 Add license for css tree menu. 2012-05-18 12:11:55 -06:00
bootstraponline f5de6a809d Remove name2 now that name is fixed. 2012-05-18 12:09:42 -06:00
bootstraponline e36b96fca6 Remove comments. 2012-05-18 12:01:43 -06:00
bootstraponline cd1738bdf6 Fix file names. 2012-05-18 12:00:43 -06:00
bootstraponline ebcd30fadc Add file view. 2012-05-18 11:50:38 -06:00
bootstraponline 3c10a6bf94 Set focus when toggling comment window. 2012-05-18 11:08:27 -06:00
bootstraponline dc80fd9b15 Remove old comments. 2012-05-18 10:39:52 -06:00
bootstraponline 5d21df9ac7 Fix css href. 2012-05-18 10:38:27 -06:00
bootstraponline 019e912d7f Fix comment button. 2012-05-18 10:35:42 -06:00
bootstraponline 3479dca0d0 Add comment window using Ace that allows user entered commit messages.
Use darkness div to dim the background when the comment window is active.
Set CSS in batch to avoid unnecessary reflows.
Use debouncing to efficiently resize the window.
Eliminate previewSetter in favor of redefining the previewSet function.
2012-05-18 10:28:59 -06:00
bootstraponline 32e5cc4a5a Add debounce. 2012-05-18 10:27:01 -06:00
bootstraponline 268a9f18fa Update readme. 2012-05-18 10:24:14 -06:00
bootstraponline 16a6186570 Add icon for save with comment in live preview. 2012-05-17 16:00:09 -06:00
bootstraponline 4b2fb6dd11 Add default commit messages when using gollum editor. 2012-05-17 15:17:24 -06:00
bootstraponline 67d21bcd64 Fix location. 2012-05-17 12:44:28 -06:00
bootstraponline 9b87126f0f Generate commit messages when using live preview. 2012-05-17 12:40:27 -06:00
Corey Donohoe 1043b4de70 Revert "Merge pull request #338 from jroes/resize-sha1s"
This reverts commit 4bc5e7b8ff, reversing
changes made to 423b5205bf.
2012-05-16 12:48:16 -07:00
Corey Donohoe 4bc5e7b8ff Merge pull request #338 from jroes/resize-sha1s
Fit generated SHA1 placeholders to original length.
2012-05-16 12:15:40 -07:00
bootstraponline 423b5205bf Fix language detection. 2012-05-15 11:49:55 -06:00
bootstraponline fde288d9e8 Guess highlight rules for code blocks to match gollum behavior. 2012-05-15 11:48:48 -06:00
bootstraponline f2a2d85008 Preserve whitespace in gollum code blocks. 2012-05-15 11:20:01 -06:00
bootstraponline 3a91b076e1 Fix gollum code blocks. 2012-05-15 11:06:36 -06:00
bootstraponline 27bd608b53 Update live preview title. 2012-05-15 10:37:38 -06:00
bootstraponline 966ba29084 Fix gollum style code blocks. 2012-05-15 10:12:32 -06:00
bootstraponline 3ea5b0193c Fix sanitizer to whitelist h1-6. 2012-05-15 09:59:15 -06:00
kristi 97dd1b3b00 Fix toc test 2012-05-14 17:01:39 -07:00
kristi fe0088d1ae Add TOC to readme file 2012-05-14 16:12:20 -07:00
kristi 342e1e22f8 Change link icon 2012-05-14 15:54:46 -07:00
kristi c9203047fc Make universal toc pretty too 2012-05-14 13:07:57 -07:00
kristi a3a946ccd6 Remove toc.rb; markup.rb handles toc processing 2012-05-14 13:06:46 -07:00
kristi 22564f34a9 Merge remote-tracking branch 'upstream/master' into toc 2012-05-14 10:44:50 -07:00
kristi f939c24aa4 Clear floats for footer 2012-05-14 10:25:31 -07:00
kristi be93fa747b Make TOC pretty. Also put in "[[_TOC_]]" stub for viewing sub-page directly 2012-05-14 10:23:12 -07:00
kristi d7f4eeea2c Merge remote-tracking branch 'upstream/master' into toc
Conflicts:
	lib/gollum/frontend/app.rb
	lib/gollum/markup.rb
	test/test_markup.rb
2012-05-14 09:12:44 -07:00
kristi 6191f60025 Fix tests for added example repo pages 2012-05-14 02:01:33 -07:00
kristi 82ccb0cedb add documentation comment 2012-05-14 02:01:06 -07:00
kristi eb92e4413a Add header files and TOC test files 2012-05-14 01:28:03 -07:00
kristi b0ba205532 Remove :header_hashtags option and adjust tests 2012-05-14 00:38:27 -07:00
kristi 4fa2cdf8d9 Allow sub pages to use the [[_TOC_]] tag 2012-05-13 22:19:55 -07:00
kristi ae30b23d34 insert a comment if no TOC headers found 2012-05-13 18:48:02 -07:00
kristi 1d3905bb71 Use special tag [[_TOC_]] to insert a table of contents 2012-05-13 12:44:20 -07:00
kristi aa1e845f9a create process_headers function to add anchors and create toc 2012-05-13 10:21:50 -07:00
Jonathan Roes fbcc69ec67 Tell Travis that the tests now depend on docutils. 2012-05-12 21:47:31 -04:00
Jonathan Roes 68b2de6dd7 Fit generated SHA1 placeholders to original length. 2012-05-12 21:05:42 -04:00
bootstraponline 20389babbc Merge pull request #336 from jroes/remove-links-in-code
Remove links in code, fixes #128.
2012-05-12 14:48:41 -07:00
Jonathan Roes f9899033aa Before replacing tags, ensure the SHA1 is not within preformatted content. 2012-05-12 17:29:23 -04:00
Jonathan Roes eb37b17486 Remove links in code, fixes #128. 2012-05-11 22:49:26 -04:00
bootstraponline c428cad286 Remove marker on no highlight pre tags. 2012-05-11 15:05:05 -06:00
kristi 26486da27b Use correct wiki option 2012-05-11 13:41:03 -07:00
kristi cabd0ed85e Add tests for new universal_toc and header_hashtags wiki options 2012-05-11 13:27:43 -07:00
kristi f53e1a60d5 Fix tests by adding a default_options hash to the wiki 2012-05-11 12:51:04 -07:00
kristi ec694e4a99 Fix option setting 2012-05-11 12:50:34 -07:00
Corey Donohoe 81e076c924 gemspec upgrade 2012-05-10 14:12:45 -07:00
Corey Donohoe 04070ffc23 bump gollum version 2012-05-10 14:12:36 -07:00
bootstraponline 6941d6b863 Restore title now that #308 is merged using github.com css. 2012-05-10 13:35:33 -06:00
bootstraponline 3c88f68f16 Fix relative links in live preview. 2012-05-10 12:25:26 -06:00
bootstraponline 82461da704 Merge pull request #334 from Skookum/selected-links
Grab selected text and use it as the default text when creating links.
2012-05-10 10:23:52 -07:00
Mark Rickert 8e5d17c907 Grab selected text and use it as the default text when creating links. 2012-05-10 13:16:52 -04:00
Tim Harvey 43d2143506 Redirect from root to /Home, fixes #250 2012-05-10 08:55:56 -04:00
kristi 28b729acda Add in some minimal documentation for wiki options 2012-05-10 00:38:35 -07:00
kristi 584641236b fixup toc/anchor code in markup.rb 2012-05-10 00:34:35 -07:00
kristi ca74897569 Add header_hashtag feature option: headers display a link icon when moused over so you can jump to sections
Move anchor processing into markup.rb
Use dashes for spaces in the anchor hashtag
2012-05-10 00:26:22 -07:00
kristi 61987c85d2 Add universal_toc wiki option 2012-05-09 16:13:53 -07:00
bootstraponline cfb75abeed Remove test file. 2012-05-09 16:27:59 -06:00
bootstraponline fd32706f0b Use pre tag for code in live preview. 2012-05-09 16:15:48 -06:00
bootstraponline d1f90b7d44 Merge branch 'master' of github.com:github/gollum 2012-05-09 16:09:30 -06:00
kristi f09bc4a81a Fix editor bug - displaying wrong version of header/footer/sidebar
Use most recent version; not the version matching the page
2012-05-09 15:04:29 -07:00
bootstraponline 31b3aea282 Merge branch 'master' of github.com:github/gollum 2012-05-09 14:36:37 -06:00
bootstraponline 2e1d236e8e Enable previewframe scrolling. 2012-05-09 14:36:20 -06:00
kristi 065d06a98f Move toc calling code out of app; put in Page.toc_data
Page stores the formatted document parsed by Nokogiri
2012-05-09 13:33:54 -07:00
kristi 63107566ec add Toc to Gollum 2012-05-09 13:33:08 -07:00
bootstraponline 4f1dcea806 2012-05-09 14:28:32 -06:00
bootstraponline 5da1a2c611 2012-05-09 14:28:20 -06:00
bootstraponline 180a214e1f Merge pull request #311 from bootstraponline/livepreview
Live Preview.
2012-05-09 13:24:12 -07:00
kristi bb417c6975 Rename class to Toc 2012-05-09 12:18:24 -07:00
kristi 75c02475be Remove extensions namespace 2012-05-09 12:14:45 -07:00
bootstraponline 2fd07211d9 Update README.md 2012-05-09 12:06:05 -06:00
bootstraponline 128f3be596 Use template.css 2012-05-09 10:56:52 -06:00
bootstraponline 810333dbb7 Update link CSS to match github.com. 2012-05-09 10:24:12 -06:00
bootstraponline e465358ec0 Add Ubuntu asciidoc install commmand. 2012-05-09 10:03:38 -06:00
bootstraponline 2954ed84a0 Merge pull request #327 from arr2036/master
Pass :is_bare to Grit where appropriate.
2012-05-09 08:57:18 -07:00
Arran Cudbard-Bell b36cd8a68e Pass through :is_bare option from wiki_options, allows Gollum to work with gitolite 2012-05-09 16:12:00 +02:00
Arran Cudbard-Bell 8435daa598 Stop anchor highlighting 2012-05-09 15:37:42 +02:00
Arran Cudbard-Bell 38c943d564 Add supporting modifications to frontend and css 2012-05-09 15:07:01 +02:00
Arran Cudbard-Bell 8e89ec504f Initial commit of Nokogiri based TOC generator 2012-05-09 14:06:17 +02:00
Kristi a692ec1124 Merge pull request #326 from kristi/frontend-tweak
Frontend tweak: Add header to editor, small fixup for asciidoc css, add spacing to headers
2012-05-08 17:25:26 -07:00
kristi 4e5f2c9587 Add header to editor 2012-05-08 17:29:28 -07:00
kristi 1cc263acfb Make footer editor font normal sized 2012-05-08 17:22:39 -07:00
kristi 49c6534da6 Put asciidoc fix into template with the rest of the markup css
Also remove padding from the asciidoc code block so first line doesn't get indented
2012-05-08 17:11:02 -07:00
bootstraponline 02d3a3d7ec Clarify gemspec task desc. 2012-05-08 16:36:44 -06:00
kristi 1dbe49243c Give headers more headroom 2012-05-08 15:03:15 -07:00
kristi 2c12fb7ae8 Add missing semicolons 2012-05-08 15:02:52 -07:00
kristi 829c6debbd Merge remote-tracking branch 'upstream/master' into frontend-tweak 2012-05-08 14:58:32 -07:00
bootstraponline f2d3ed322e Merge pull request #325 from bootstraponline/ascii_css
Fix AsciiDoc CSS.
2012-05-08 12:40:57 -07:00
bootstraponline d90e7db497 Fix #278. 2012-05-08 13:39:21 -06:00
Corey Donohoe 26f372a36a this works on 1.9.3 now too 2012-05-08 12:25:03 -07:00
bootstraponline b037777f83 Fix spacing. 2012-05-08 13:18:46 -06:00
bootstraponline 35ce35b1e0 Default to empty edit window. 2012-05-08 13:15:09 -06:00
bootstraponline e1517c2907 Merge with upstream. 2012-05-08 13:13:36 -06:00
bootstraponline ed5f88daa0 Remove unused local var. 2012-05-08 13:05:49 -06:00
bootstraponline 4afda646f0 Merge pull request #324 from bootstraponline/windowsNote
Add windows filename invalid characters notice to readme.
2012-05-08 11:36:41 -07:00
bootstraponline e782538777 Add windows filename invalid notice to readme. 2012-05-08 12:17:36 -06:00
Corey Donohoe 4e86be86d9 Merge pull request #323 from kristi/frontend-tweak
Fix HR background
2012-05-07 21:22:29 -07:00
kristi 6c8cfcd7c2 Make code border darker 2012-05-07 20:47:04 -07:00
kristi 9fc7929665 uniform spacing for css 2012-05-07 20:47:04 -07:00
kristi d590bf7d64 Add images from github 2012-05-07 20:47:04 -07:00
kristi c0f653340e Fix urls 2012-05-07 20:47:04 -07:00
Corey Donohoe ac2bef083b Merge pull request #322 from kristi/header-feature
Header feature
2012-05-07 20:42:14 -07:00
kristi 42c7d0ca44 Fix crazy spacing (sorry, git blame, I couldn't stand it any longer) 2012-05-07 20:35:28 -07:00
kristi 8a8afcfb24 Put gray background on header, fix footer font size 2012-05-07 20:28:07 -07:00
kristi 5d259bb5aa Use markdown css formatting for header and footer 2012-05-07 20:09:59 -07:00
Corey Donohoe d2a24ed4bc Merge pull request #321 from bootstraponline/cleanUp
Remove unused local var.
2012-05-07 15:04:04 -07:00
bootstraponline efd2f49484 Remove unused local var. 2012-05-07 15:37:24 -06:00
Corey Donohoe 9d4d6ccca5 Merge remote-tracking branch 'bootstraponline/gollum2'
/cc @kristi is the css behaving on this? we had minor markup conflicts

Conflicts:
	lib/gollum/frontend/templates/page.mustache
2012-05-07 14:10:38 -07:00
Aman Gupta 218c894b5a Merge pull request #319 from bootstraponline/looseObject
Fix LooseObjectError by upgrading to grit 2.5.
2012-05-07 13:29:21 -07:00
bootstraponline 0dec522542 Fix LooseObjectError by upgrading to grit 2.5. See https://github.com/mojombo/grit/issues/65 2012-05-07 14:26:48 -06:00
bootstraponline 7fa6708483 Add _Header.md to revert.git. 2012-05-07 14:17:15 -06:00
kristi 33af47c282 Make code border darker 2012-05-07 00:22:24 -07:00
kristi 6b971e9e1b uniform spacing for css 2012-05-07 00:22:24 -07:00
kristi 50107504a6 Add images from github 2012-05-07 00:22:23 -07:00
kristi 2cb0c9fea6 Fix urls 2012-05-07 00:22:23 -07:00
Corey Donohoe dd7c2cc7f6 Merge pull request #317 from kristi/frontend-tweak
Frontend tweak
2012-05-06 17:00:16 -07:00
kristi 857ca14499 add bottom margin to wiki-page css 2012-05-06 16:37:29 -07:00
kristi f022b3fcde Use github markup for page and sidebar content 2012-05-06 16:37:29 -07:00
kristi 9470ff2dcc fix the sidebar editor 2012-05-06 16:37:28 -07:00
Corey Donohoe d817a4fdb6 fixup page versioning, fixes #174
Thanks @nealpoole and @arr2036
2012-05-06 13:30:23 -07:00
Corey Donohoe 19635b06cf gemspec updates 2012-05-06 12:08:25 -07:00
Corey Donohoe 872776660b next version will be 2.0 2012-05-06 12:08:12 -07:00
Corey Donohoe 9644d4b00e dupe sanitization attrs initialized by constants, fixes #200 2012-05-06 12:07:41 -07:00
bootstraponline 04579d7ae6 Update test. 2012-05-05 13:51:46 -06:00
bootstraponline e9a9eb1779 Add header. 2012-05-05 13:49:01 -06:00
Corey Donohoe 9a1dddaccf whitelist apt uri schemes, fixes #233 2012-05-05 11:56:01 -07:00
Corey Donohoe 4110ab5a82 Merge pull request #308 from bootstraponline/title
Title defined by filename only.
2012-05-04 15:35:32 -07:00
Corey Donohoe 5d1844e491 Merge pull request #313 from kristi/frontend-tweak
Fix searchbar scaling issue
2012-05-04 09:44:23 -07:00
kristi 6a126d46ee Fix searchbar scaling issue 2012-05-04 09:35:27 -07:00
kristi f834a0c84f searchbar fix for ie9 2012-05-04 09:24:20 -07:00
Corey Donohoe 9dfeb237e7 Merge pull request #312 from kristi/frontend-tweak
searchbar fix for ie9
2012-05-04 09:21:45 -07:00
Corey Donohoe b769ba2974 Merge pull request #310 from kristi/frontend-tweak
Frontend tweaks
2012-05-04 08:32:17 -07:00
Corey Donohoe fc1feb280f let's use 0.8.0 if at all 2012-05-04 08:25:01 -07:00
Corey Donohoe bface83af7 Merge pull request #309 from nricciar/master
Gollum using very old version of wikicloth
2012-05-04 08:24:14 -07:00
bootstraponline 9a89a16388 Update live preview and gemspec. 2012-05-03 17:22:34 -06:00
bootstraponline 7649abf86a Add encodeURIComponent. 2012-05-03 11:51:59 -06:00
bootstraponline b6ad97745d Use encodeURIComponent. 2012-05-03 11:49:41 -06:00
bootstraponline 92028e191d Remove console.log. 2012-05-03 11:13:27 -06:00
bootstraponline 7d4427a5d3 Add save and load. 2012-05-03 11:10:50 -06:00
Vicent Martí 2bea800a37 Proper ordering for markup processing, fixes #135
Code blocks get extracted first.
2012-05-02 18:53:41 -07:00
kristi 4c1ff7deb7 fixup the compare revisions page 2012-05-02 16:55:16 -07:00
bootstraponline 347260f17b Add livepreview (7f3ed651e4e4388977f9b3ce29ed1a995ff6d7a9). 2012-05-02 16:59:50 -06:00
bootstraponline 1086fba7da Only use live preview for editing markdown pages. 2012-05-02 16:58:49 -06:00
kristi 5a7cb129bb Fixup css styling for pages, editor, history 2012-05-02 15:52:15 -07:00
kristi b29d22e99b Make navbar flow nicely for narrow windows 2012-05-02 13:51:26 -07:00
David 12cf102543 removing hardcoded reference to old version of wikicloth 2012-05-02 20:45:46 +00:00
kristi 3d95730880 Fix navbar and searchbar css 2012-05-02 13:00:46 -07:00
bootstraponline c5d807dd58 Fix tests. 2012-05-02 12:13:18 -06:00
bootstraponline d40df79dce Title defined by filename only. 2012-05-02 12:05:57 -06:00
Corey Donohoe 3cfa297b49 hide the page title as before 2012-05-02 19:29:17 +02:00
Corey Donohoe e435769345 remove executable bit 2012-05-02 19:20:57 +02:00
bootstraponline 9a73877b3e Fix search bar and restore title. 2012-05-02 11:03:37 -06:00
Corey Donohoe e2cd8d93f4 Merge pull request #306 from pdeschen/master
README Installation requirements sub section for mathematical equations support
2012-05-01 16:33:51 -07:00
Corey Donohoe afc6ec468f bit of testing info 2012-05-02 01:33:15 +02:00
Corey Donohoe 391838cfc3 no more rbx 2012-05-02 01:25:52 +02:00
Corey Donohoe 36a11ded4f Merge pull request #304 from rwfowler/asciidocLinksWithTravis
Disable internal link processing for asciidoc
2012-05-01 16:10:51 -07:00
Corey Donohoe f540ef2e06 Merge pull request #305 from rwfowler/goForGreen
Fix the test_normalizes_commit_hash on Travis-CI
2012-05-01 16:04:39 -07:00
Corey Donohoe b061e0f859 2.0 is unnecessary 2012-05-02 00:49:44 +02:00
Corey Donohoe 4972fbbc7b this doesn't build on 1.9.x /cc @brianmario 2012-05-02 00:44:17 +02:00
Pascal Deschenes 1f318de812 add missing note about dvips in installation requirements sub section + associated section text 2012-05-01 18:15:01 -04:00
Pascal Deschenes 0ceeadd75b add installation requirements regarding mathematical equations support 2012-05-01 18:10:21 -04:00
Ryan Fowler b9dad32707 Fix the test_normalizes_commit_hash on Travis-CI 2012-05-01 17:02:50 -05:00
Ryan Fowler d1cf698b45 Disable internal link processing for asciidoc
asciidoc's representation of section identifiers interferes with
Gollum's page linking. This disables Gollum's page link tag
extraction for asciidoc files.

Adds "apt-get install -y asciidoc" to .travis.yml so tests pass
on @travis-ci.
2012-05-01 14:23:26 -05:00
Corey Donohoe 9dba3f9c58 Revert "Merge pull request #303 from rwfowler/asciidocLinks"
This reverts commit 8fbbe40300, reversing
changes made to b7fb4c5950.
2012-05-01 19:51:05 +02:00
Corey Donohoe 8fbbe40300 Merge pull request #303 from rwfowler/asciidocLinks
Fix for #52 - Disable internal link processing for asciidoc
2012-05-01 10:42:31 -07:00
Ryan Fowler f73c925ad9 Disable internal link processing for asciidoc
asciidoc's representation of section identifiers interferes with
Gollum's page linking. This disables Gollum's page link tag
extraction for asciidoc files.
2012-05-01 11:43:27 -05:00
Corey Donohoe b7fb4c5950 Merge pull request #302 from kristi/master
fix Rack config.ru documentation
2012-05-01 02:32:07 -07:00
kristi fed49bb98b Fix gollum_path in rack setup documentation 2012-05-01 01:37:17 -07:00
Vicent Martí 6aa4e382b2 Tag 1.4.3 2012-04-25 14:12:54 -07:00
Vicent Martí 8051d4f9b0 Fix the public path 2012-04-25 14:11:02 -07:00
Vicent Martí 31a49601b1 Namespace the public assets 2012-04-25 14:11:02 -07:00
Corey Donohoe 4a50635fe1 docs for releasing the gem 2012-04-25 20:52:40 +02:00
Vicent Martí 9b92e9d325 Add Gollum.assets_path hook 2012-04-25 11:46:28 -07:00
Corey Donohoe 833953d658 bump to 1.4.2 2012-04-25 20:44:16 +02:00
Corey Donohoe 198dc8a8e2 Merge remote-tracking branch 'jussimalinen/fix-rest-local-links' 2012-04-25 17:00:56 +02:00
Vicent Martí 78cd65240f Tag 1.4.1 2012-04-24 20:42:33 -07:00
Jussi Malinen 02073f827b add id to whitelisted attributes. The transformers still seem to work and prefix ids with wiki-. Uncommented relevant tests. 2012-04-23 20:08:24 +03:00
Corey Donohoe 4cd3fdcdba fixup readme error, fixes #294 2012-04-16 15:41:11 -07:00
Corey Donohoe 7c803288e0 update org-ruby dev dep 2012-04-14 14:10:29 -07:00
Corey Donohoe dc91e0f733 Merge remote-tracking branch 'origin/sane-parsing' 2012-04-12 14:07:08 -07:00
Vicent Martí adc3abe82a Update README 2012-04-12 22:59:44 +02:00
bootstraponline 00b6f5c3fb Add desc to tasks so they show up in rake -T. 2012-04-12 13:58:57 -07:00
Vicent Martí b5a2a8df67 Keep a MarkupGFM class for compatibility reasons 2012-04-12 22:54:45 +02:00
Vicent Martí 0cc4c9f2c2 Remove the GFM parser; it makes no sense
The new versions of GitHub::Markup will automatically render GFM for
Markdown documents if the necessary gems are installed.
2012-04-12 22:54:11 +02:00
Vicent Martí 7317a9ba2d Allow indented code blocks in Gollum syntax 2012-04-12 22:52:08 +02:00
Corey Donohoe d6a4009989 nuke whitespace 2012-04-10 18:38:04 -07:00
Corey Donohoe 8ee52e7d05 cleanup whitespace 2012-04-10 18:26:13 -07:00
Corey Donohoe b9a970a19a minor css fixups from github's internal copy 2012-04-10 18:25:09 -07:00
Corey Donohoe bee93eade1 release 1.4.0 2012-04-10 18:15:39 -07:00
Corey Donohoe 5d157eea54 update what changed in this release 2012-04-10 18:15:00 -07:00
Corey Donohoe 28b494c913 Merge remote-tracking branch 'andrew0/editor_hooks' 2012-04-10 17:50:02 -07:00
Corey Donohoe 817f189154 be a little more rubyish 2012-04-10 17:40:47 -07:00
Corey Donohoe 0bfa049778 Merge remote-tracking branch 'origin/master' into websequencediagrams
Conflicts:
	README.md
	lib/gollum.rb
	lib/gollum/markup.rb
2012-04-10 17:37:48 -07:00
Corey Donohoe 8745314ad8 Merge pull request #281 from muzuiget/master
Fix searchbar position and button appearance
2012-04-10 17:11:19 -07:00
Corey Donohoe 846d6d62c7 Merge pull request #257 from hulihanapplications/default-editor-markup
Make default markup changeable through sinatra settings
2012-04-10 17:10:12 -07:00
Corey Donohoe c625440161 Merge pull request #249 from ChrisCauser/master
Fix spaces in filenames breaking redirect with Sinatra 1.3.1
2012-04-10 16:10:02 -07:00
Corey Donohoe aa544f03fb Merge pull request #166 from arr2036/mediawiki_compat
Gollum doesn't play nice with un-canonicalized filenames, and breaks offsite links when replacing mediawiki
2012-04-10 16:04:09 -07:00
bootstraponline 8d42c06fb0 Remove MathJax. 2012-04-10 15:59:05 -07:00
Corey Donohoe 4480ff0520 update the gemspec to reflect mathjax being gone 2012-04-10 15:55:30 -07:00
Corey Donohoe eed9b2695a Merge branch 'master' into code_with_multibyte
Conflicts:
	lib/gollum/markup.rb
	test/test_markup.rb
2012-04-10 15:49:37 -07:00
Corey Donohoe 337a9b180e Merge remote-tracking branch 'xdite/highlight-utf8' 2012-04-10 15:27:46 -07:00
Corey Donohoe 66a6ee97f0 Merge pull request #273 from polarblau/code_block_ascii_bug
Added test for ASCII characters in code blocks created with back ticks.
2012-04-10 15:26:31 -07:00
Corey Donohoe 26d5abe7a5 Merge pull request #264 from github/remove_contents
remove contents of script and style elements
2012-04-10 15:26:00 -07:00
Corey Donohoe bf8246c705 minor api updates 2012-04-10 15:21:34 -07:00
Corey Donohoe 73cd25b05f Merge remote-tracking branch 'origin/master' into xdite-merge
Conflicts:
	lib/gollum/markup.rb
2012-04-10 15:16:13 -07:00
Corey Donohoe c5cc6905de Merge pull request #283 from dentarg/master
Serve Gravatars via SSL
2012-04-10 15:06:30 -07:00
Patrik Ragnarsson 7b0a714e1f Serve Gravatars via SSL. 2012-03-17 19:06:11 +01:00
muzuiget b47d83a7f2 Fix searchbar position and button appearance 2012-03-04 17:57:31 +08:00
Polarblau 5f4d312b8e Added test for ASCII characters in code blocks created with back ticks. 2012-02-07 12:52:06 +02:00
Jesse Newland be4c52202c remove contents of script and style elements
Avoids rendering HTML-ized CSS and/or Javascript by removing the
contents of script and style elements as well as the elements
themselves.

/cc @technoweenie

Pull Request: master
2012-01-08 22:07:33 -05:00
Dave Hulihan 4e9111976e Make default markup changeable through sinatra settings 2011-12-22 20:20:03 -07:00
rick 5163f11ecb allow ftp and irc protocol links in wiki pages 2011-12-22 09:30:27 -07:00
xdite 5a1d5fa4f0 syntax highlight should with utf-8 2011-12-21 15:18:12 +08:00
Chris Causer d389390523 Escape names on page create redirect 2011-12-14 13:10:44 +00:00
Chris Causer 5a661fdacc Add tests for escaped characters in title 2011-12-14 13:07:13 +00:00
Vicent Marti bd6dfcd51c Merge branch 'drop-redcarpet' of github.com:github/gollum into drop-redcarpet 2011-12-07 19:10:43 +01:00
Vicent Marti 8014486fd8 XHTML is dead
Do not enforce the XHTML conversion for Wiki pages. HTML is cool!
2011-12-07 18:57:07 +01:00
Vicent Marti 654b5b176b Bump GitHub::Markup dependency 2011-12-07 16:54:35 +01:00
Vicent Marti af09f99c8a Fix newline tests in code blocks 2011-12-07 13:02:54 +01:00
Vicent Marti 108876d9a1 Do not assume Markdown output is XHTML
Self-closing tags are bad for your health.
2011-12-07 12:34:59 +01:00
Vicent Marti 1eb65caff4 Remove dependency on Redcarpet
Now Gollum does all its Markdown processing through GitHub::Markup; if
you require a custom Markdown renderer using Redcarpet or another
library, you can hot-load it from your own code base:

	Gollum::Wiki.markup_classes[:markdown] = YourRedcarpetRenderer
2011-12-07 12:12:02 +01:00
xdite 7924e8c9a9 compatible with RedCarpet 2.0+ 2011-12-01 19:26:14 +08:00
Joshua Peek 101f43947f Merge pull request #222 from github/server-side-tex
Render Tex on Server
2011-11-29 08:46:45 -08:00
Joshua Peek 68a0ead0c5 Use posix-spawn for tex shell out 2011-11-29 09:47:32 -06:00
Joshua Peek 3d119c0d5d Depend on posix-spawn 2011-11-29 09:35:27 -06:00
Joshua Peek f3e8cbf41d Requires ghostscript too 2011-11-28 16:45:29 -06:00
Joshua Peek f0fa42a50e Fix error check order 2011-11-28 16:41:03 -06:00
Joshua Peek a20fd4fdcf Raise Tex::Error 2011-11-28 13:53:36 -06:00
Joshua Peek 32fb1cdb23 Better tex errors 2011-11-28 13:49:42 -06:00
Joshua Peek ac24213d53 Link to tex image at wiki base path 2011-11-28 13:41:43 -06:00
Joshua Peek fa20343253 Remove MathJax from README 2011-11-28 13:36:42 -06:00
Joshua Peek f4d70d3748 Remove other mathjax support 2011-11-28 13:35:53 -06:00
Joshua Peek b311730c7c Remove MathJax 2011-11-28 13:34:11 -06:00
Joshua Peek 3cba98fee6 Merge branch 'master' into server-side-tex 2011-11-28 13:21:46 -06:00
Arran Cudbard-Bell 7c799323a5 Add additional tests to verify that existing filenames are processed properly and not cannonicalized 2011-11-24 11:07:27 +01:00
Arran Cudbard-Bell 6926746624 Do not re-canonicalize names referring to existing page files when updating format extensions 2011-11-24 11:07:27 +01:00
Arran Cudbard-Bell af7a52970f Repository page files with spaces, will now match using urls with hyphens, underscores and urlencoded spaces. This is for compatibility with mediawiki conversions. 2011-11-24 11:07:27 +01:00
rick 5ce3886651 Merge pull request #237 from bootstraponline/master
Update Gollum CSS based on GitHub's production CSS
2011-11-22 12:50:15 -08:00
bootstraponline 0bc883ee29 Update CSS based on GitHub's production Gollum CSS. 2011-11-22 10:56:10 -07:00
Joshua Peek cc96786ac0 Fix Wiki XSS vuln 2011-11-15 15:29:05 -06:00
hibariya 5b84ecf372 ruby1.8 compatibility 2011-11-12 11:32:54 +09:00
hibariya 620926c379 add encoding option 2011-11-12 11:23:04 +09:00
Joshua Peek 7a4e57a49d Fix Tex tests 2011-10-24 15:54:40 -05:00
Joshua Peek cdca60ff1b Remove test document 2011-10-24 15:52:48 -05:00
Joshua Peek 604f88939e Render tex formulas to images 2011-10-24 15:50:02 -05:00
Joshua Peek 95a7d33848 2011-10-24 15:10:23 -05:00
rick 39e06e48bd Merge pull request #217 from phlipper/fix-sinatra-api-warning
set :public_folder in frontend app instead of :public
2011-10-22 01:58:13 -07:00
Phil Cohen 9246c1443f set :public_folder in frontend app
:public is no longer used to avoid overloading
Module#public, use :public_folder instead
2011-10-21 16:39:15 -07:00
Joshua Peek d3e358817e Merge pull request #209 from pal/edit-page-preview-fix
Fix edit page preview problems
2011-10-05 06:50:44 -07:00
pal 3682bc8558 Fix preview problems, also see #141 2011-10-05 12:11:09 +02:00
rick 8c1f82d894 let Gollum::Markup handle code blocks instead of RedCarpet 2011-09-29 11:02:35 -06:00
rick 6887c89d5c remove rdoc task 2011-09-29 10:04:48 -06:00
Joshua Peek 5071072c6b Prune MathJax docs 2011-09-28 17:53:18 -05:00
Joshua Peek 1cb7bc96c7 Merge pull request #206 from github/backport-js
Backport JS
2011-09-28 13:44:27 -07:00
Joshua Peek 755c303008 Use $.facebox for dialog if its available 2011-09-27 17:13:53 -05:00
Joshua Peek 381a963971 Fix lang script uri 2011-09-27 17:13:33 -05:00
Joshua Peek 903ea7c49a Reindent dialog JS and trim trailing spaces 2011-09-27 16:50:24 -05:00
Joshua Peek 41c4801aed Backport some JS changes from github.com 2011-09-27 16:49:52 -05:00
Joshua Peek 3a8d65bd3e Fix indenting offset
2 spaces, not 3
2011-09-27 16:26:03 -05:00
Joshua Peek 095a392359 Trim trailing whitespace 2011-09-27 16:06:16 -05:00
Joshua Peek ce770c2e79 Don't leak nodeSelector 2011-09-27 14:51:47 -05:00
Joshua Peek be9529faee Remove dead and leaky global functions 2011-09-27 14:48:38 -05:00
Joshua Peek 1f948e30d8 Cleanup gollum.js trailing whitespace 2011-09-27 14:27:37 -05:00
Joshua Peek 50de79171a Rebuild empty.git fixture 2011-09-27 14:01:58 -05:00
Joshua Peek e8b3854682 Hush test clone warnings
warning: You appear to have cloned an empty repository.
2011-09-27 13:49:59 -05:00
Joshua Peek 985fade9f6 Don't call id on nil 2011-09-27 13:48:16 -05:00
Joshua Peek 39b1177ba0 Check in empty directories 2011-09-27 13:43:52 -05:00
rick 5fb440171e Merge pull request #205 from x1024/author_on_first_preview
The first page in an empty repository can now be previewed.
2011-09-27 09:10:21 -07:00
Mihail Minkov 38673e5f43 regenerated gollum.gemspec 2011-09-27 19:07:05 +03:00
Mihail Minkov b8ce2b251d The first page in an empty repository can now be previewed. 2011-09-27 18:52:51 +03:00
Joshua Peek 7829e17c27 Fix invalid syntax, leaky vars and trailing whitespace in lang JS 2011-09-26 17:35:39 -05:00
Joshua Peek fced891975 Merge pull request #204 from github/pygments.rb
Switch to Pygments.rb
2011-09-26 15:00:48 -07:00
Joshua Peek 35da594bfc Switch to pygments.rb 2011-09-26 16:45:21 -05:00
rick e8df272729 Merge pull request #195 from bobrik/patch-1
Forcing encoding to UTF-8 for git tree
2011-09-21 19:33:14 -07:00
Ian Babrou a337b9ba15 added method existence checking for UTF-8, thanks to @technoweenie 2011-09-09 19:24:27 +04:00
Ian Babrou 685cc358b3 forcing encoding to UTF-8 for git tree to be able to use gollum with non-ascii wiki filenames 2011-09-09 17:24:19 +04:00
risk 9ce4f0220e dont want wikicloth 0.7.0 2011-08-08 15:45:55 -07:00
risk 2128559186 fix edge case where sanitize gem doesn't operate on <a> node if the custom transformer runs 2011-08-08 15:43:21 -07:00
risk 20e4ca6a56 normalize test output 2011-08-08 15:26:27 -07:00
risk 6f15fafc4a add a Page#markup_class reader 2011-08-08 15:26:22 -07:00
risk cd4704aed7 prefix name attributes too 2011-08-08 15:02:10 -07:00
risk 82fd4d8b26 update the changelog 2011-08-04 14:18:38 -07:00
risk 08a58b7520 Sanitization#id_prefix can be modified 2011-08-04 14:02:24 -07:00
risk c7d8026ac5 when extracting the code blocks, use the SHA of the lang code AND contents to uniquely identify the snippet 2011-08-04 13:38:05 -07:00
risk c7729f81ad Release 1.3.1 2011-07-21 16:30:59 -07:00
risk 7e12de0087 tomdoc 2011-07-21 16:19:48 -07:00
risk c9c7db5a53 add backwards compatible Gollum::Wiki.markup_class 2011-07-21 16:17:09 -07:00
risk aadbdd8b76 keep the versions of rake in the gemspec and gemfile in sync for cry babies 2011-07-21 16:04:08 -07:00
risk b2d372ab3c id attribute transformers should always return a hash or nil 2011-07-21 15:47:00 -07:00
risk c47a47bc30 disable notifications 2011-07-21 15:43:03 -07:00
risk ad5ec77f41 smaller #inspect output for wiki and page objects 2011-07-21 15:27:56 -07:00
risk c0bf387cb4 requiring gollum doesnt require the load path to be set to the lib directory ahead of time (good for rake console) 2011-07-21 15:27:34 -07:00
risk 267323c7c3 merge gfm 2011-07-21 15:04:50 -07:00
risk d9b1ea3d51 track builds in travis-ci 2011-07-21 14:53:05 -07:00
risk 70bf86f561 specify rake gem in gemfile 2011-07-21 14:53:05 -07:00
rick e1eebb2f75 Merge pull request #182 from schacon/test-fixes
Fixing Tests
2011-07-21 14:37:58 -07:00
Scott Chacon aa258dbe6b fix test breaking due to new footnote anchor 2011-07-19 12:55:43 -07:00
Scott Chacon 5a7659e1c3 fix tests breaking due to whitespace issues 2011-07-19 12:55:19 -07:00
Scott Chacon d51a829038 rake is needed to run the tests in dev 2011-07-19 12:54:13 -07:00
Ryan Tomayko b7ffc4051c Wiki#tree_list returns an empty array if the ref doesnt resolve
Signed-off-by: risk <technoweenie@gmail.com>
2011-07-14 14:35:58 -07:00
risk bb06b566cd GitAccess#ref_to_sha should never return a blank string 2011-07-14 14:30:23 -07:00
Vicent Marti fc6149a171 Bless Gollum with the power of GFM
With these changes, the Markdown rendered in Gollum wikis will have the
same quality and safety as the MD we render everywhere else @ GitHub.

This commit also changes the old `markup_class` accessor to
`markup_classes`, allowing users to specify a custom Markup class for
each markup language.
2011-06-21 18:28:28 +02:00
rick 4abc32f1ec Merge pull request #143 from kashif/patch-1
Fixed spelling.
2011-06-20 09:18:22 -07:00
rick efd734d962 Merge pull request #162 from ttscoff/master
Spacing fix for issue #145
2011-06-20 09:17:59 -07:00
rick 8158610587 Merge pull request #164 from arr2036/patches_1.3.0
Remove edit button on preview pages
2011-06-20 09:15:38 -07:00
rick 2bb62309be Merge pull request #157 from nealpoole/master
Fixed broken preview functionality
2011-06-20 09:15:23 -07:00
rick 401e41b699 Merge pull request #169 from JoshCheek/fix_page_file_dir_option
Fix page_file_dir option
2011-06-07 23:44:51 -07:00
Josh Cheek 3015831d66 fix bug where can't edit pages while using page_file_dir 2011-06-07 22:47:01 -05:00
Josh Cheek c2919897e2 add test that fails when editing pages while using page_file_dir 2011-06-07 22:45:41 -05:00
Arran Cudbard-Bell 83d6cae53f Remove edit button on preview pages 2011-05-26 21:35:34 -07:00
Brett Terpstra 7ad54e3c94 Added spacing to allow has-rightbar and has-footer classes to work 2011-05-23 13:12:47 -05:00
Neal Poole c1fc3a92c0 Fixed broken preview functionality in Gollum. 2011-05-16 17:10:08 -04:00
Aman Gupta 23508d3867 Merge pull request #153 from guilleiguaran/patch-1
default_executable= have been deprecated
2011-05-08 22:43:00 -07:00
Guillermo Iguaran b5cb2e6dd6 default_executable= have been deprecated 2011-05-08 22:38:24 -07:00
Andrew O'Brien 9efcf8bfb1 Added support for activate/deactivate functions in LanguageDefinition so that languages that have a client-side component can setup and teardown UI elements. 2011-05-06 11:29:54 -04:00
rick 1ff486e16c Merge pull request #146 from schuyler1d/master
allow prefixed @id attributes to allow internal linking
2011-05-06 03:51:13 -07:00
Schuyler Duveen c22050fca8 allow @id attributes but force a "wiki-" prefix 2011-05-04 11:50:38 -04:00
Kashif Rasul e910dd0ccf Fixed spelling. 2011-05-02 07:15:11 -07:00
rick 748d76dff1 Release 1.3.0 2011-04-25 20:59:57 -04:00
rick 2ebed41225 Merge branch 'master' of github.com:github/gollum 2011-04-25 20:47:46 -04:00
rick 86d14fa7ab Merged pull request #134 from mrjbq7/master.
Fixing search box location.
2011-04-25 11:38:01 -07:00
rick 82e31e971a Merged pull request #136 from freerange/master.
Remove redundant 1.8 compatibilty
2011-04-25 11:37:21 -07:00
Chris Roos 3d591b49cb Updated the gemspec.
Commit df505a7289 removed ruby1.8.rb but it was still included in the gemspec which caused Bundler to complain about an invalid Gemspec.

*NOTE* There are five test failures when running 'rake'.  I checked out the last commit before Tom's change (d3594f6652) and that also has these five failures so I'm happy that we didn't introduce them.
2011-04-15 15:54:35 +01:00
Tom Ward df505a7289 ruby1.8 compatibility isn't required to run gollum using ruby 1.8.7
The sanitize gem requires 1.8.7 or later, so compatibility with earlier versions is moot
2011-04-12 15:23:23 +01:00
rick 17dcde1f61 fix xss vulnerability in mathjax parsing 2011-04-11 23:29:06 -04:00
John Benediktsson 2a052cae8d Remove default width of page name header. 2011-04-10 22:28:37 -07:00
Tom Clark d3594f6652 Added 'All Pages' route and view 2011-04-09 14:09:36 -07:00
rick ad561226b9 merrrge 2011-03-31 15:11:24 -07:00
Tom Clark 8403868ac3 Test that wikis can write to different branches in isolation 2011-02-22 00:12:32 -05:00
Tom Clark a1d760df1e Write pages to the proper branch 2011-02-21 23:32:27 -05:00
Randy Merrill e3950d52c1 Removing the ref as an argument to the Committer#parents and just using the @wiki.ref.
Updated the test to reflect the change and to test creating a wiki with a custom ref returns the correct parent for the `Committer#parents`.
2011-01-27 13:59:39 -08:00
Randy Merrill 7427ddd900 Adding some tests to test that the commiter can retrieve parents that are not the same as the wiki ref.
Also testing that the default wiki ref works without passing a ref.
2011-01-27 13:00:54 -08:00
Randy Merrill 364b2b85ae Moving the ref to be an argument to the parents that defaults to the @wiki.ref 2011-01-27 12:46:29 -08:00
Randy Merrill a71ab7c418 Changing from using branch as the variable to using ref. 2011-01-27 11:38:48 -08:00
Randy Merrill 2bb1937fa9 Fixing the docs for the default branch. 2011-01-27 11:29:21 -08:00
Randy Merrill 3c44205be7 Adding the logic to accept a command line flag for the branch to use to retrieve pages. 2011-01-27 11:24:15 -08:00
Tim Sharpe 4cad535baa Tomdoc'd 2010-10-01 16:18:09 +10:00
Tim Sharpe 5fc3c298c1 Some docs for the README 2010-10-01 16:10:24 +10:00
Tim Sharpe e5fe89a4fd Simple test case 2010-10-01 16:05:20 +10:00
Tim Sharpe ccaea78901 Helps if I commit this bit too 2010-10-01 15:44:53 +10:00
Tim Sharpe 1111dbb9a2 Holy crap, it works 2010-10-01 15:44:32 +10:00
1779 changed files with 282140 additions and 52975 deletions
+32
View File
@@ -0,0 +1,32 @@
# https://help.github.com/articles/dealing-with-line-endings
#
# For Mac & Linux
# git config --global core.autocrlf input
#
# For windows
# git config --global core.autocrlf true
#
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.txt text
*.md text
*.rb text
*.js text
*.html text
*.yml text
*.mustache text
*.css text
Rakefile text
Gemfile text
LICENSE text
COPYRIGHT text
gollum text
.gitattributes text
.gitignore text
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
+3
View File
@@ -3,3 +3,6 @@ pkg
.DS_Store
.bundle
Gemfile.lock
*.gem
*.swp
.*
+11
View File
@@ -0,0 +1,11 @@
rvm:
- 2.0.0
- 2.1.0
- 2.1.1
- 2.2.2
- 2.3.0
- 2.4.0
- jruby-19mode
before_install:
- sudo apt-get update
- sudo apt-get install libicu-dev
+91
View File
@@ -0,0 +1,91 @@
# Contributing to Gollum
Thanks for your interest in the gollum project!
## Submitting an Issue
Please note that the issue tracker is meant for:
1. Bug reports.
2. Feature requests.
If your have problems using or installing the software which stem from bugs in the software or a lack of documentation, we are always happy to help out! However, **for ordinary usage questions, please consider asking elsewhere**, for instance on [StackOverflow](http://stackoverflow.com/questions/tagged/gollum-wiki).
Gollum supports [custom macros](https://github.com/gollum/gollum/wiki#macros) for the creation of additional wiki markup tags. Please **do not** use this tracker to request macros specific to your situation. However, if you have or are working on a macro that you think may be useful to more users, you can share it as a GitHub [gist](https://gist.github.com) and link to it in the [wiki](https://github.com/gollum/gollum/wiki/Custom-macros).
Before submitting an issue, **please carefully look through the following places** to make sure your problem is not already addressed:
1. The issue tracker.
1. The [README](https://github.com/gollum/gollum/blob/master/README.md).
1. The project's [wiki](https://github.com/gollum/gollum/wiki).
Lastly, please **consider helping out** by opening a Pull Request!
## Opening a Pull Request
Pull Requests fixing bugs, implementing new features, or updating documentation and dependencies are all very welcome! If you would like to help out with the project, you can pick an open issue from the issue tracker. We're more than happy to help you get started! Here's how you can proceed:
1. Fork and clone Gollum.
2. Create a thoughtfully named topic branch to contain your changes.
3. If you haven't installed dependencies yet, navigate to your clone and execute:
```
[sudo] bundle install
```
4. Hack away.
5. Add your own tests and make sure they're all still passing.
6. If some of your changes deserve a mention on Gollum's home page, edit the README accordingly.
7. If necessary, rebase your commits into logical chunks, without errors.
8. Push the branch to your fork on GitHub.
9. Create a pull request for Gollum.
**Notes:**
* Do not change Gollum's version numbers, we will do that on our own.
### Running tests
1. Install [Bundler](http://bundler.io/).
2. Navigate to the cloned source of Gollum.
3. Install dependencies:
```
[sudo] bundle install
```
4. Run the tests:
```
bundle exec rake test
```
### Working with test repositories
An example of how to add a test file to the bare repository lotr.git.
```
mkdir tmp
cd tmp
git clone ../lotr.git/
git log
echo "test" > test.md
git add .
git commit -am "Add test"
git push ../lotr.git/ master
```
## Releasing the gem
Gollum uses [Semantic Versioning](http://semver.org/).
x.y.z
For z releases:
```
rake bump
rake release
```
For x.y releases:
```
# First update VERSION in lib/gollum.rb and then:
rake gemspec
rake release
```
+2 -1
View File
@@ -1,3 +1,4 @@
source "http://rubygems.org"
source 'https://rubygems.org'
gemspec
gem 'rake', '~> 10.4'
+82 -2
View File
@@ -1,4 +1,84 @@
# HEAD
# 4.1.0 /2017-03-09
* Added file deletion functionality to file view
* Various performance improvements
* Emoji support
# 4.0.0 /2015-04-11
* Now compatible with JRuby (via the [rjgit](https://github.com/repotag/rjgit) [adapter](https://github.com/repotag/gollum-lib_rjgit_adapter))
# 3.1.1 /2014-12-04
* Security fix for [remote code execution issue](https://github.com/gollum/gollum/issues/913). Please update!
# 3.1 / 2014-11-28
* New features
* Drag-and-drop uploading in the editor [@lucas-clemente](https://github.com/lucas-clemente)
* Latest changes view [@etienneCharignon](https://github.com/etienneCharignon) (#707)
* Option `--no-edit` to disable editing from the web interface [@bambycha](https://github.com/bambycha) (#879)
* Option `--mathjax-config` to specify custom mathjax configuration [@hardywu](https://github.com/hardywu) (#842)
* Major enhancements
* Made the Gollum theme responsive [@rtrvrtg](https://github.com/rtrvrtg) (#831)
* Depends on new [gollum-lib](https://github.com/gollum/gollum-lib) `4.0.0`
* Allows specifiying [git adapter](https://github.com/gollum/gollum/wiki/Git-adapters) with `--adapter` [@bartkamphorst](https://github.com/bartkamphorst), [@dometto](https://github.com/dometto)
* Numerous bugfixes
* **NB**: please pass `--h1-title` if you do not want page titles to default to the page's filepath. See [here](https://github.com/gollum/gollum/wiki/Page-titles).
# 2.4.11 / 2013-01-08
* Numerous security issues have been fixed. Please update to `2.4.11`
# 1.4.0 / 2012-04-10
* Minor
* Add a way to configure the `#id_prefix` property of Sanitization
objects.
* Add web sequence diagrams support
* Support for updating wysiwyg components when markup language changes
* Support RedCarpet 2.0
* Allow ftp and irc links in wiki markup
* Minor ui fixups
* Bug Fixes
* Include the language of the code snippet when making a uniquely
identifiable sha of a code snippet while rendering a page.
* Pygments lexer forces utf8 encoding
* Remove MathJax, this created problems in production for us.
We'll look at bringing it back in future releases
# 1.3.1 / 2011-07-21
* Major Enhancements
* Allow prefixed ID attributes in headers to support internal linking
(#146).
* Markdown pages are rendered through Redcarpet by default (#176).
* Minor Enhancements
* Remove Edit button on Preview pages (#164).
* Simplify Wiki#inspect and Page#inspect.
* Bug Fixes
* Fixed broken preview functionality (#157).
* Fixed sidebar/footer rendering problems related to whitespace (#145).
# 1.3.0 / 2011-04-25
* Major Enhancements
* Listing of all Pages
* Support for running Gollum under a separate branch.
* Minor Enhancements
* Fix a security issue with rendering Mathjax.
# 1.2.0 / 2011-03-11
* Major Enhancements
* Major HTML/CSS/JS overhaul.
* Add Sidebars (similar to Footers).
* Add commit reverts.
* Minor Enhancements
* Optimization in source code highlighting, resulting in a huge
decrease in rendering time.
* Security fixes related to source code highlighting.
* Major Enhancements
* Add Page sidebars, similar to Page footers.
@@ -51,4 +131,4 @@
# 1.0.0 / 2010-08-12
* Open Source Birthday!
* Open Source Birthday!
-3
View File
@@ -1,3 +0,0 @@
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vulputate tincidunt sollicitudin. Quisque sit amet leo sed nunc eleifend rhoncus in consectetur leo. Vivamus posuere semper convallis. Duis malesuada lacus sed erat lobortis tincidunt mattis ligula consectetur. Sed aliquam vulputate eros at euismod. Aenean egestas lorem ligula, quis faucibus turpis. Curabitur a eros in ipsum gravida ornare. Sed elementum enim vel mi scelerisque dapibus. Nulla id libero ligula, quis tempus sem. Morbi nec felis tortor, ac cursus risus. Mauris elementum tortor id lacus eleifend non lobortis tellus pharetra. Etiam posuere cursus vestibulum. $x \lt y$
Morbi tincidunt dolor vel massa dictum volutpat. Vestibulum quis nibh metus, id tincidunt nisl. Vivamus eget sem ac risus eleifend rhoncus at eu nisl. Nunc elit massa, vulputate ac gravida eget, condimentum quis justo. Integer scelerisque, libero vel consequat ultricies, eros libero sagittis libero, pellentesque bibendum quam massa ut orci. Maecenas sit amet urna eget quam aliquam posuere. Nulla facilisi. Duis imperdiet augue sit amet metus ornare et hendrerit dui feugiat. Aenean a lacus neque. Sed eu enim tincidunt dolor pharetra porttitor. Vestibulum ut felis dui, rutrum iaculis orci. Duis eu bibendum tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse mollis sagittis purus sit amet sollicitudin. Phasellus vel interdum erat.
+136 -411
View File
@@ -1,452 +1,177 @@
gollum -- A wiki built on top of Git
gollum -- A git-based Wiki
====================================
[![Gem Version](https://badge.fury.io/rb/gollum.svg)](http://badge.fury.io/rb/gollum)
[![Build Status](https://travis-ci.org/gollum/gollum.svg?branch=master)](https://travis-ci.org/gollum/gollum)
[![Dependency Status](https://gemnasium.com/gollum/gollum.svg)](https://gemnasium.com/gollum/gollum)
## DESCRIPTION
Gollum is a simple wiki system built on top of Git that powers GitHub Wikis.
Gollum is a simple wiki system built on top of Git. A Gollum Wiki is simply a git repository (either bare or regular) of a specific nature:
* A Gollum repository's contents are human-editable, unless the repository is bare. Pages are unique text files which may be organized into directories any way you choose. Other content can also be included, for example images, PDFs and headers/footers for your pages.
* Gollum pages:
* May be written in a variety of [markups](#markups).
* Can be edited with your favourite system editor or IDE (changes will be visible after committing) or with the built-in web interface.
* Can be displayed in all versions (commits).
Gollum wikis are simply Git repositories that adhere to a specific format.
Gollum pages may be written in a variety of formats and can be edited in a
number of ways depending on your needs. You can edit your wiki locally:
Gollum can be launched either as a webserver (with the web interface) or in "console mode", where you can use a predefined API to query and manipulate the repository. For more information, see the [Running](#running) and [Configuration](#configuration) sections.
* With your favorite text editor or IDE (changes will be visible after committing).
* With the built-in web interface.
* With the Gollum Ruby API.
For more information on Gollum's capabilities and pitfalls:
Gollum follows the rules of [Semantic Versioning](http://semver.org/) and uses
[TomDoc](http://tomdoc.org/) for inline documentation.
1. [Syntax/capability overview for pages](https://github.com/gollum/gollum/wiki).
2. [Known limitations](https://github.com/gollum/gollum/wiki/Known-limitations).
3. [Troubleshoot guide](https://github.com/gollum/gollum/wiki/Troubleshoot-guide).
4. [Security overview](https://github.com/gollum/gollum/wiki/Security).
### Videos
* [Quick impression of gollum](https://www.youtube.com/watch?v=gj1qqK3Oku8)
* [Gollum overview and simple markdown tutorial (german with english subtitles)](https://www.youtube.com/watch?v=wfWgDRmcbU4)
* [Advanced features in action](https://www.youtube.com/watch?v=EauxgxsLDC4)
## SYSTEM REQUIREMENTS
| Operating System | Ruby | Adapters | Supported |
| ---------------- | -------------- | ------------------ | --------- |
| Unix/Linux-like | Ruby 1.9.3+ | all except [RJGit](https://github.com/repotag/rjgit) | yes |
| Unix/Linux-like | [JRuby](https://github.com/jruby/jruby) (1.9.3+ compatible) | [RJGit](https://github.com/repotag/rjgit) | yes |
| Windows | Ruby 1.9.3+ | all except [RJGit](https://github.com/repotag/rjgit) | no |
| Windows | [JRuby](https://github.com/jruby/jruby) (1.9.3+ compatible) | [RJGit](https://github.com/repotag/rjgit) | almost<sup>1</sup> |
**Notes:**
1. There are still some bugs and this setup is not ready for production yet. You can track the progress at [Support Windows via JRuby - Meta Issue](https://github.com/gollum/gollum/issues/1044).
## INSTALLATION
The best way to install Gollum is with RubyGems:
Varies depending on operating system, package manager and Ruby installation. Generally, you should first install Ruby and then Gollum.
$ [sudo] gem install gollum
1. Ruby is best installed either via [RVM](https://rvm.io/) or a package manager of choice.
2. Gollum is best installed via RubyGems:
```
[sudo] gem install gollum
```
If you're installing from source, you can use [Bundler][bundler] to pick up all the
gems:
Installation examples for individual systems can be seen [here](https://github.com/gollum/gollum/wiki/Installation).
$ bundle install # ([more info](http://gembundler.com/bundle_install.html))
**Notes:**
* Whichever Ruby implementation you're using, Gollum ships with the appropriate default git adapter. So the above installation procedure is common for both MRI and JRuby.
* If you're installing from source:
* Optionally uninstall any previous versions of Gollum:
```
[sudo] gem uninstall -aIx gollum
```
* Install [Bundler](http://bundler.io/).
* Navigate to the cloned source of Gollum.
* Install dependencies:
```
[sudo] bundle install
```
* Build:
```
rake build
```
* And install:
```
[sudo] gem install --no-document pkg/gollum*.gem
```
In order to use the various formats that Gollum supports, you will need to
separately install the necessary dependencies for each format. You only need
to install the dependencies for the formats that you plan to use.
### Markups
* [ASCIIDoc](http://www.methods.co.nz/asciidoc/) -- `brew install asciidoc`
* [Creole](http://wikicreole.org/) -- `gem install creole`
* [Markdown](http://daringfireball.net/projects/markdown/) -- `gem install rdiscount`
* [Org](http://orgmode.org/) -- `gem install org-ruby`
* [Pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::HTML` comes with Perl >= 5.10. Lower versions should install Pod::Simple from CPAN.
Gollum presently ships with support for the following markups:
* [Markdown](http://daringfireball.net/projects/markdown/syntax)
* [RDoc](http://rdoc.sourceforge.net/)
* [ReStructuredText](http://docutils.sourceforge.net/rst.html) -- `easy_install docutils`
* [Textile](http://www.textism.com/tools/textile/) -- `gem install RedCloth`
* [MediaWiki](http://www.mediawiki.org/wiki/Help:Formatting) -- `gem install wikicloth`
[bundler]: http://gembundler.com/
Since all markups are rendered by the [github-markup](https://github.com/github/markup) gem, you can easily add support for other markups by additional installation:
* [AsciiDoc](http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/) -- `[sudo] gem install asciidoctor`
* [Creole](http://www.wikicreole.org/wiki/CheatSheet) -- `[sudo] gem install creole`
* [MediaWiki](http://www.mediawiki.org/wiki/Help:Formatting) -- `[sudo] gem install wikicloth`
* [Org](http://orgmode.org/worg/dev/org-syntax.html) -- `[sudo] gem install org-ruby`
* [Pod](http://perldoc.perl.org/perlpod.html) -- requires Perl >= 5.10 (the `perl` command must be available on your command line)
* Lower versions should install `Pod::Simple` from CPAN.
* [ReStructuredText](http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html) -- requires python >= 2 (the `python2` command must be available on your command line)
* Note that Gollum will also need you to install `docutils` for your Python 2. Installation procedure can, again, vary depending on operating system and package manager.
* [Textile](http://redcloth.org/hobix.com/textile/quick.html) -- `[sudo] gem install RedCloth`
By default, Gollum ships with the `kramdown` gem to render Markdown. However, you can use any [Markdown renderer supported by github-markup](https://github.com/github/markup/blob/master/lib/github/markup/markdown.rb). The thing to remember is that the first installed renderer from the list will be used. So, for example, `redcarpet` will NOT be used if `github/markdown` is installed.
## RUNNING
To view and edit your Gollum repository locally via the built in web
interface, simply install the Gollum gem, navigate to your repository via the
command line, and run the executable:
Simply:
$ gollum
1. Navigate to your git repository (wiki) via the command line.
2. Run: `gollum`.
3. Open `http://localhost:4567` in your browser.
This will start up a web server running the Gollum frontend and you can view
and edit your wiki at http://localhost:4567. To get help on the command line
utility, you can run it like so:
This will start up a web server (WEBrick) running Gollum with a web interface, where you can view and edit your wiki.
$ gollum --help
### Running from source
1. `git clone https://github.com/gollum/gollum`
2. `cd gollum`
3. `[sudo] bundle install` (may not always be necessary).
4. `bundle exec bin/gollum`
* Like that, gollum assumes the target wiki (git repository) is the project repository itself. If it's not, execute `bundle exec bin/gollum <path-to-wiki>` instead.
5. Open `http://localhost:4567` in your browser.
## REPO STRUCTURE
### Rack
A Gollum repository's contents are designed to be human editable. Page content
is written in `page files` and may be organized into directories any way you
choose. Special footers can be created in `footer files`. Other content
(images, PDFs, etc) may also be present and organized in the same way.
Gollum can also be ran with any [rack-compatible web server](https://github.com/rack/rack#supported-web-servers). More on that [over here](https://github.com/gollum/gollum/wiki/Gollum-via-Rack).
### Rack, with an authentication server
## PAGE FILES
Gollum can also be ran alongside a CAS (Central Authentication Service) SSO (single sign-on) server. With a bit of tweaking, this adds basic user-support to Gollum. To see an example and an explanation, navigate [over here](https://github.com/gollum/gollum/wiki/Gollum-via-Rack-and-CAS-SSO).
Page files may be written in any format supported by
[GitHub-Markup](http://github.com/github/markup) (except roff). The
current list of formats and allowed extensions is:
### Docker
* ASCIIDoc: .asciidoc
* Creole: .creole
* Markdown: .markdown, .mdown, .mkdn, .mkd, .md
* Org Mode: .org
* Pod: .pod
* RDoc: .rdoc
* ReStructuredText: .rest.txt, .rst.txt, .rest, .rst
* Textile: .textile
* MediaWiki: .mediawiki, .wiki
Gollum can also be ran via [Docker](https://www.docker.com/). More on that [over here](https://github.com/gollum/gollum/wiki/Gollum-via-Docker).
Gollum detects the page file format via the extension, so files must have one
of the supported extensions in order to be converted.
### Service
Page file names may contain any printable UTF-8 character except space
(U+0020) and forward slash (U+002F). If you commit a page file with any of
these characters in the name it will not be accessible via the web interface.
Gollum can also be ran as a service. More on that [over here](https://github.com/gollum/gollum/wiki/Gollum-as-a-service).
Even though page files may be placed in any directory, there is still only a
single namespace for page names, so all page files should have globally unique
names regardless of where they are located in the repository.
## CONFIGURATION
The special page file `Home.ext` (where the extension is one of the supported
formats) will be used as the entrance page to your wiki. If it is missing, an
automatically generated table of contents will be shown instead.
Gollum comes with the following command line options:
## SIDEBAR FILES
| Option | Arguments | Description |
| ----------------- | --------- | ----------- |
| --host | [HOST] | Specify the hostname or IP address to listen on. Default: `0.0.0.0`.<sup>1</sup> |
| --port | [PORT] | Specify the port to bind Gollum with. Default: `4567`. |
| --config | [FILE] | Specify path to Gollum's configuration file. |
| --ref | [REF] | Specify the git branch to serve. Default: `master`. |
| --adapter | [ADAPTER] | Launch Gollum using a specific git adapter. Default: `grit`.<sup>2</sup> |
| --bare | none | Tell Gollum that the git repository should be treated as bare. This is only necessary when using the default grit adapter. |
| --base-path | [PATH] | Specify the leading portion of all Gollum URLs (path info). Setting this to `/wiki` will make the wiki accessible under `http://localhost:4567/wiki/`. Default: `/`. |
| --page-file-dir | [PATH] | Specify the subdirectory for all pages. If set, Gollum will only serve pages from this directory and its subdirectories. Default: repository root. |
| --css | none | Tell Gollum to inject custom CSS into each page. Uses `custom.css` from repository root.<sup>3,5</sup> |
| --js | none | Tell Gollum to inject custom JS into each page. Uses `custom.js` from repository root.<sup>3,5</sup> |
| --emoji | none | Parse and interpret emoji tags (e.g. :heart:). |
| --no-edit | none | Disable the feature of editing pages. |
| --live-preview | none | Enable the live preview feature in page editor. |
| --no-live-preview | none | Disable the live preview feature in page editor. |
| --allow-uploads | [MODE] | Enable file uploads. If set to `dir`, Gollum will store all uploads in the `/uploads/` directory in repository root. If set to `page`, Gollum will store each upload at the currently edited page.<sup>4</sup> |
| --mathjax | none | Enables MathJax (renders mathematical equations). By default, uses the `TeX-AMS-MML_HTMLorMML` config with the `autoload-all` extension.<sup>5</sup> |
| --irb | none | Launch Gollum in "console mode", with a [predefined API](https://github.com/gollum/gollum-lib/). |
| --h1-title | none | Tell Gollum to use the first `<h1>` as page title. |
| --show-all | none | Tell Gollum to also show files in the file view. By default, only valid pages are shown. |
| --collapse-tree | none | Tell Gollum to collapse the file tree, when the file view is opened. By default, the tree is expanded. |
| --user-icons | [MODE] | Tell Gollum to use specific user icons for history view. Can be set to `gravatar`, `identicon` or `none`. Default: `none`. |
| --mathjax-config | [FILE] | Specify path to a custom MathJax configuration. If not specified, uses the `mathjax.config.js` file from repository root. |
| --template-dir | [PATH] | Specify custom mustache template directory. |
| --help | none | Display the list of options on the command line. |
| --version | none | Display the current version of Gollum. |
Sidebar files allow you to add a simple sidebar to your wiki. Sidebar files
are named `_Sidebar.ext` where the extension is one of the supported formats.
Sidebars affect all pages in their directory and any subdirectories that do not
have a sidebar file of their own.
**Notes:**
## FOOTER FILES
1. The `0.0.0.0` IP address allows remote access. Should you wish for Gollum to turn into a personal Wiki, use `127.0.0.1`.
2. Before using `--adapter`, you should probably read [this](https://github.com/gollum/gollum/wiki/Git-adapters) first.
3. When `--css` or `--js` is used, respective files must be committed to your git repository or you will get a 302 redirect to the create a page.
4. Files can be uploaded simply by dragging and dropping them onto the editor's text area (this is, however exclusive to the default editor, not the live preview editor).
5. Read the relevant [Security note](https://github.com/gollum/gollum/wiki/Security#custom-cssjs--mathjax-config) before using these.
Footer files allow you to add a simple footer to your wiki. Footer files must
be named `_Footer.ext` where the extension is one of the supported formats.
Like sidebars, footers affect all pages in their directory and any
subdirectories that do not have a footer file of their own.
### Config file
When `--config` option is used, certain inner parts of Gollum can be customized. This is used throughout our wiki for certain user-level alterations, among which [customizing supported markups](https://github.com/gollum/gollum/wiki/Formats-and-extensions) will probably stand out.
## HTML SANITIZATION
For security and compatibility reasons Gollum wikis may not contain custom CSS
or JavaScript. These tags will be stripped from the converted HTML. See
`docs/sanitization.md` for more details on what tags and attributes are
allowed.
## BRACKET TAGS
A variety of Gollum tags use a double bracket syntax. For example:
[[Link]]
Some tags will accept attributes which are separated by pipe symbols. For
example:
[[Link|Page Title]]
In all cases, the first thing in the link is what is displayed on the page.
So, if the tag is an internal wiki link, the first thing in the tag will be
the link text displayed on the page. If the tag is an embedded image, the
first thing in the tag will be a path to an image file. Use this trick to
easily remember which order things should appear in tags.
Some formats, such as MediaWiki, support the opposite syntax:
[[Page Title|Link]]
## PAGE LINKS
To link to another Gollum wiki page, use the Gollum Page Link Tag.
[[Frodo Baggins]]
The above tag will create a link to the corresponding page file named
`Frodo-Baggins.ext` where `ext` may be any of the allowed extension types. The
conversion is as follows:
1. Replace any spaces (U+0020) with dashes (U+002D)
2. Replace any slashes (U+002F) with dashes (U+002D)
If you'd like the link text to be something that doesn't map directly to the
page name, you can specify the actual page name after a pipe:
[[Frodo|Frodo Baggins]]
The above tag will link to `Frodo-Baggins.ext` using "Frodo" as the link text.
The page file may exist anywhere in the directory structure of the repository.
Gollum does a breadth first search and uses the first match that it finds.
Here are a few more examples:
[[J. R. R. Tolkien]] -> J.-R.-R.-Tolkien.ext
[[Movies / The Hobbit]] -> Movies---The-Hobbit.ext
[[モルドール]] -> モルドール.ext
## EXTERNAL LINKS
As a convenience, simple external links can be placed within brackets and they
will be linked to the given URL with the URL as the link text. For example:
[[http://example.com]]
External links must begin with either "http://" or "https://". If you need
something more flexible, you can resort to the link syntax in the page's
underlying markup format.
## ABSOLUTE VS. RELATIVE VS. EXTERNAL PATH
For Gollum tags that operate on static files (images, PDFs, etc), the paths
may be referenced as either relative, absolute, or external. Relative paths
point to a static file relative to the page file within the directory
structure of the Gollum repo (even though after conversion, all page files
appear to be top level). These paths are NOT prefixed with a slash. For
example:
gollum.pdf
docs/diagram.png
Absolute paths point to a static file relative to the Gollum repo's
root, regardless of where the page file is stored within the directory
structure. These paths ARE prefixed with a slash. For example:
/pdfs/gollum.pdf
/docs/diagram.png
External paths are full URLs. An external path must begin with either
"http://" or "https://". For example:
http://example.com/pdfs/gollum.pdf
http://example.com/images/diagram.png
All of the examples in this README use relative paths, but you may use
whatever works best in your situation.
## FILE LINKS
To link to static files that are contained in the Gollum repository you should
use the Gollum File Link Tag.
[[Gollum|gollum.pdf]]
The first part of the tag is the link text. The path to the file appears after
the pipe.
## IMAGES
To display images that are contained in the Gollum repository you should use
the Gollum Image Tag. This will display the actual image on the page.
[[gollum.png]]
In addition to the simple format, there are a variety of options that you
can specify between pipe delimiters.
To specify alt text, use the `alt=` option. Default is no alt text.
[[gollum.png|alt=Gollum and his precious wiki]]
To place the image in a frame, use the `frame` option. When combined with the
`alt=` option, the alt text will be used as a caption as well. Default is no
frame.
[[gollum.png|frame|alt=Gollum and his precious wiki]]
To specify the alignment of the image on the page, use the `align=` option.
Possible values are `left`, `center`, and `right`. Default is `left`.
[[gollum.png|align=center]]
To float an image so that text flows around it, use the `float` option. When
`float` is specified, only `left` and `right` are valid `align` options.
Default is not floating. When floating is activated but no alignment is
specified, default alignment is `left`.
[[gollum.png|float]]
To specify a max-width, use the `width=` option. Units must be specified in
either `px` or `em`.
[[gollum.png|width=400px]]
To specify a max-height, use the `height=` option. Units must be specified in
either `px` or `em`.
[[gollum.png|height=300px]]
Any of these options may be composed together by simply separating them with
pipes.
## ESCAPING GOLLUM TAGS
If you need the literal text of a wiki or static link to show up in your final
wiki page, simply preface the link with a single quote (like in LISP):
'[[Page Link]]
'[[File Link|file.pdf]]
'[[image.jpg]]
This is useful for writing about the link syntax in your wiki pages.
## SYNTAX HIGHLIGHTING
In page files you can get automatic syntax highlighting for a wide range of
languages (courtesy of [Pygments](http://pygments.org/) - must install
separately) by using the following syntax:
```ruby
def foo
puts 'bar'
end
```
The block must start with three backticks (as the first characters on the
line). After that comes the name of the language that is contained by the
block. The language must be one of the `short name` lexer strings supported by
Pygments. See the [list of lexers](http://pygments.org/docs/lexers/) for valid
options.
If the block contents are indented two spaces or one tab, then that whitespace
will be ignored (this makes the blocks easier to read in plaintext).
The block must end with three backticks as the first characters on a
line.
## MATHEMATICAL EQUATIONS
Page files may contain mathematic equations in TeX syntax that will be nicely
typeset into the expected output. A block-style equation is delimited by `\[`
and `\]`. For example:
\[ P(E) = {n \choose k} p^k (1-p)^{ n-k} \]
Inline equations are delimited by `\(` and `\)`. These equations will appear
inline with regular text. For example:
The Pythagorean theorum is \( a^2 + b^2 = c^2 \).
Gollum uses [MathJax](http://www.mathjax.org/) to convert the TeX syntax into
output suitable for display in web browsers.
## API DOCUMENTATION
The Gollum API allows you to retrieve raw or formatted wiki content from a Git
repository, write new content to the repository, and collect various meta data
about the wiki as a whole.
Initialize the Gollum::Repo object:
# Require rubygems if necessary
require 'rubygems'
# Require the Gollum library
require 'gollum'
# Create a new Gollum::Wiki object by initializing it with the path to the
# Git repository.
wiki = Gollum::Wiki.new("my-gollum-repo.git")
# => <Gollum::Wiki>
By default, internal wiki links are all absolute from the root. To specify a different base path, you can specify the `:base_path` option:
wiki = Gollum::Wiki.new("my-gollum-repo.git", :base_path => "/wiki")
Get the latest version of the given human or canonical page name:
page = wiki.page('page-name')
# => <Gollum::Page>
page.raw_data
# => "# My wiki page"
page.formatted_data
# => "<h1>My wiki page</h1>"
page.format
# => :markdown
vsn = page.version
# => <Grit::Commit>
vsn.id
# => '3ca43e12377ea1e32ea5c9ce5992ec8bf266e3e5'
Get the footer (if any) for a given page:
page.footer
# => <Gollum::Page>
Get a list of versions for a given page:
vsns = wiki.page('page-name').versions
# => [<Grit::Commit, <Grit::Commit, <Grit::Commit>]
vsns.first.id
# => '3ca43e12377ea1e32ea5c9ce5992ec8bf266e3e5'
vsns.first.authored_date
# => Sun Mar 28 19:11:21 -0700 2010
Get a specific version of a given canonical page file:
wiki.page('page-name', '5ec521178e0eec4dc39741a8978a2ba6616d0f0a')
Get the latest version of a given static file:
file = wiki.file('asset.js')
# => <Gollum::File>
file.raw_data
# => "alert('hello');"
file.version
# => <Grit::Commit>
Get a specific version of a given static file:
wiki.file('asset.js', '5ec521178e0eec4dc39741a8978a2ba6616d0f0a')
Get an in-memory Page preview (useful for generating previews for web
interfaces):
preview = wiki.preview_page("My Page", "# Contents", :markdown)
preview.formatted_data
# => "<h1>Contents</h1>"
Methods that write to the repository require a Hash of commit data that takes
the following form:
commit = { :message => 'commit message',
:name => 'Tom Preston-Werner',
:email => 'tom@github.com' }
Write a new version of a page (the file will be created if it does not already
exist) and commit the change. The file will be written at the repo root.
wiki.write_page('Page Name', :markdown, 'Page contents', commit)
Update an existing page. If the format is different than the page's current
format, the file name will be changed to reflect the new format.
page = wiki.page('Page Name')
wiki.update_page(page, page.name, page.format, 'Page contents', commit)
To delete a page and commit the change:
wiki.delete_page(page, commit)
## CONTRIBUTE
If you'd like to hack on Gollum, start by forking my repo on GitHub:
http://github.com/github/gollum
To get all of the dependencies, install the gem first. The best way to get
your changes merged back into core is as follows:
1. Clone down your fork
1. Create a thoughtfully named topic branch to contain your change
1. Hack away
1. Add tests and make sure everything still passes by running `rake`
1. If you are adding new functionality, document it in the README
1. Do not change the version number, I will do that on my end
1. If necessary, rebase your commits into logical chunks, without errors
1. Push the branch up to GitHub
1. Send a pull request to the github/gollum project.
**All of the mentioned alterations work both for Gollum's config file (`config.rb`) and Rack's config file (`config.ru`).**
+43 -10
View File
@@ -17,6 +17,27 @@ def version
line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
end
# assumes x.y.z all digit version
def next_version
# x.y.z
v = version.split '.'
# bump z
v[-1] = v[-1].to_i + 1
v.join '.'
end
def bump_version
old_file = File.read("lib/#{name}.rb")
old_version_line = old_file[/^\s*VERSION\s*=\s*.*/]
new_version = next_version
# replace first match of old vesion with new version
old_file.sub!(old_version_line, " VERSION = '#{new_version}'")
File.write("lib/#{name}.rb", old_file)
new_version
end
def date
Date.today.to_s
end
@@ -60,14 +81,6 @@ task :coverage do
sh "open coverage/index.html"
end
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "#{name} #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
desc "Open an irb session preloaded with this library"
task :console do
sh "irb -rubygems -r ./lib/#{name}.rb"
@@ -79,7 +92,14 @@ end
#
#############################################################################
desc "Update version number and gemspec"
task :bump do
puts "Updated version to #{bump_version}"
# Execute does not invoke dependencies.
# Manually invoke gemspec then validate.
Rake::Task[:gemspec].execute
Rake::Task[:validate].execute
end
#############################################################################
#
@@ -87,24 +107,36 @@ end
#
#############################################################################
desc 'Create a release build and push to rubygems'
task :release => :build do
unless `git branch` =~ /^\* master$/
puts "You must be on the master branch to release!"
exit!
end
sh "git commit --allow-empty -a -m 'Release #{version}'"
sh "git pull --rebase origin master"
sh "git tag v#{version}"
sh "git push origin master"
sh "git push origin v#{version}"
sh "gem push pkg/#{name}-#{version}.gem"
end
desc 'Publish to rubygems. Same as release'
task :publish => :release
desc 'Build gem'
task :build => :gemspec do
sh "mkdir -p pkg"
sh "gem build #{gemspec_file}"
sh "mv #{gem_file} pkg"
end
desc "Build and install"
task :install => :build do
sh "gem install --local --no-ri --no-rdoc pkg/#{name}-#{version}.gem"
end
desc 'Update gemspec'
task :gemspec => :validate do
# read spec file and split out manifest section
spec = File.read(gemspec_file)
@@ -122,7 +154,7 @@ task :gemspec => :validate do
split("\n").
sort.
reject { |file| file =~ /^\./ }.
reject { |file| file =~ /^(rdoc|pkg)/ }.
reject { |file| file =~ /^(rdoc|pkg|test|Home\.md|\.gitattributes)/ }.
map { |file| " #{file}" }.
join("\n")
@@ -133,6 +165,7 @@ task :gemspec => :validate do
puts "Updated #{gemspec_file}"
end
desc 'Validate lib files and version file'
task :validate do
libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}"]
unless libfiles.empty?
+213 -42
View File
@@ -2,52 +2,169 @@
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
help = <<HELP
Gollum is a multi-format Wiki Engine/API/Frontend.
Basic Command Line Usage:
gollum [OPTIONS] [PATH]
PATH The path to the Gollum repository (default .).
Options:
HELP
require 'optparse'
require 'rubygems'
require 'gollum'
require 'cgi'
exec = {}
options = { 'port' => 4567, 'bind' => '0.0.0.0' }
wiki_options = {}
exec = {}
options = {
:port => 4567,
:bind => '0.0.0.0',
}
wiki_options = {
:live_preview => false,
:allow_uploads => false,
:allow_editing => true,
}
opts = OptionParser.new do |opts|
opts.banner = help
opts.on("--port [PORT]", "Bind port (default 4567).") do |port|
options['port'] = port.to_i
# define program name (although this defaults to the name of the file, just in case...)
opts.program_name = "gollum"
# set basic info for the "--help" command (options will be appended automatically from the below definitions)
opts.banner = '
Gollum is a multi-format Wiki Engine/API/Frontend.
Usage:
gollum [options] [git-repo]
Arguments:
[git-repo] Path to the git repository being served. If not specified, current working directory is used.
Notes:
Paths for all options are relative to <git-repo> unless absolute.
This message is only a basic description. For more information, please visit:
https://github.com/gollum/gollum
OPTIONS'
# define gollum options
opts.separator ""
opts.separator " Major:"
opts.on("-h", "--host [HOST]", "Specify the hostname or IP address to listen on. Default: '0.0.0.0'.") do |host|
options[:bind] = host
end
opts.on("--host [HOST]", "Hostname or IP address to listen on (default 0.0.0.0).") do |host|
options['bind'] = host
opts.on("-p", "--port [PORT]", "Specify the port to bind Gollum with. Default: '4567'.") do |port|
begin
# don't use "port.to_i" here... it doesn't raise errors which might result in a nice confusion later on
options[:port] = Integer(port)
rescue ArgumentError
puts "Error: '#{port}' is not a valid port number."
exit 1
end
end
opts.on("-c", "--config [FILE]", "Specify path to the Gollum's configuration file.") do |file|
options[:config] = file
end
opts.on("-r", "--ref [REF]", "Specify the branch to serve. Default: 'master'.") do |ref|
wiki_options[:ref] = ref
end
opts.on("-a", "--adapter [ADAPTER]", "Launch Gollum using a specific git adapter. Default: 'grit'.") do |adapter|
Gollum::GIT_ADAPTER = adapter
end
opts.on("--bare", "Declare '<git-repo>' to be bare. This is only necessary when using the grit adapter.") do
wiki_options[:repo_is_bare] = true
end
opts.on("-b", "--base-path [PATH]", "Specify the leading portion of all Gollum URLs (path info). Default: '/'.",
"Example: setting this to '/wiki' will make the wiki accessible under 'http://localhost:4567/wiki/'.") do |base_path|
# first trim a leading slash, if any
base_path.sub!(/^\/+/, '')
opts.on("--version", "Display current version.") do
# make a backup of the option and sanitize it
base_path_original = base_path.dup
base_path = CGI.escape(base_path)
# then let the user know if we changed the URL
unless base_path_original == base_path
puts <<MSG
Warning: your base-path has been sanitized:
- original: '#{base_path_original}'
- sanitized: '#{base_path}'
MSG
end
# and finally, let others enjoy our hard work:
wiki_options[:base_path] = base_path
end
opts.on("--page-file-dir [PATH]", "Specify the subdirectory for all pages. Default: repository root.",
"Example: setting this to 'pages' will make Gollum serve only pages at '<git-repo>/pages/*'.") do |path|
wiki_options[:page_file_dir] = path
end
opts.on("--css", "Inject custom CSS into each page. The '<git-repo>/custom.css' file is used (must be committed).") do
wiki_options[:css] = true
end
opts.on("--js", "Inject custom JavaScript into each page. The '<git-repo>/custom.js' file is used (must be committed).") do
wiki_options[:js] = true
end
opts.on("--emoji", "Parse and interpret emoji tags (e.g. :heart:).") do
wiki_options[:emoji] = true
end
opts.on("--no-edit", "Disable the feature of editing pages.") do
wiki_options[:allow_editing] = false
end
opts.on("--live-preview", "Enable the live preview feature in page editor.") do
wiki_options[:live_preview] = true
end
opts.on("--no-live-preview", "Disable the live preview feature in page editor.") do
wiki_options[:live_preview] = false
end
opts.on("--allow-uploads [MODE]", [:dir, :page], "Enable file uploads.",
"If set to 'dir', Gollum will store all uploads in the '<git-repo>/uploads/' directory.",
"If set to 'page', Gollum will store each upload at the currently edited page.") do |mode|
wiki_options[:allow_uploads] = true
wiki_options[:per_page_uploads] = true if mode == :page
end
opts.on("--mathjax", "Enable MathJax (renders mathematical equations).",
"By default, uses the 'TeX-AMS-MML_HTMLorMML' config with the 'autoload-all' extension.") do
wiki_options[:mathjax] = true
end
opts.on("--irb", "Launch Gollum in 'console mode', with a predefined API.") do
options[:irb] = true
end
opts.separator ""
opts.separator " Minor:"
opts.on("--h1-title", "Use the first '<h1>' as page title.") do
wiki_options[:h1_title] = true
end
opts.on("--show-all", "Also show files in the file view. By default, only valid pages are shown.") do
wiki_options[:show_all] = true
end
opts.on("--collapse-tree", "Collapse the tree, when file view is opened. By default, the tree is expanded.") do
wiki_options[:collapse_tree] = true
end
opts.on("--user-icons [MODE]", [:gravatar, :identicon, :none], "Use specific user-icons for history view.",
"Can be set to 'gravatar', 'identicon' or 'none'. Default: 'none'.") do |mode|
wiki_options[:user_icons] = mode
end
opts.on("--mathjax-config [FILE]", "Specify path to a custom MathJax configuration.",
"If not specified, uses the '<git-repo>/mathjax.config.js' file.") do |file|
wiki_options[:mathjax_config] = file || 'mathjax.config.js'
end
opts.on("--plantuml-url [URL]", "Sets the PlantUML server endpoint.") do |url|
wiki_options[:plantuml_url] = url
end
opts.on("--template-dir [PATH]", "Specify custom mustache template directory.") do |path|
wiki_options[:template_dir] = path
end
opts.separator ""
opts.separator " Common:"
opts.on("--help", "Display this message.") do
puts opts
exit 0
end
opts.on("--version", "Display the current version of Gollum.") do
puts "Gollum " + Gollum::VERSION
exit 0
end
opts.on("--config [CONFIG]", "Path to additional configuration file") do |config|
options['config'] = config
end
opts.on("--irb", "Start an irb process with gollum loaded for the current wiki.") do
options['irb'] = true
end
opts.on("--page-file-dir [PATH]", "Specify the sub directory for all page files (default: repository root).") do |path|
wiki_options[:page_file_dir] = path
end
opts.separator ""
end
# Read command line options into `options` hash
@@ -59,9 +176,10 @@ rescue OptionParser::InvalidOption
exit
end
# --gollum-path wins over ARGV[0]
gollum_path = ARGV[0] || Dir.pwd
if options['irb']
if options[:irb]
require 'irb'
# http://jameskilton.com/2009/04/02/embedding-irb-into-your-ruby-application/
module IRB # :nodoc:
@@ -87,10 +205,22 @@ if options['irb']
end
begin
require 'gollum-lib'
wiki = Gollum::Wiki.new(gollum_path, wiki_options)
if !wiki.exist? then raise Grit::InvalidGitRepositoryError end
puts "Loaded Gollum wiki at #{File.expand_path(gollum_path).inspect}."
if !wiki.exist? then
raise Gollum::InvalidGitRepositoryError
end
if wiki_options[:plantuml_url]
Gollum::Filter::PlantUML.configure do |config|
puts "Using #{wiki_options[:plantuml_url]} as PlantUML endpoint"
config.url = wiki_options[:plantuml_url]
end
end
puts
puts "Loaded Gollum wiki at:"
puts "#{File.expand_path(gollum_path).inspect}"
puts
puts "Example API calls:"
puts %( page = wiki.page('page-name'))
puts %( # => <Gollum::Page>)
puts
@@ -100,23 +230,64 @@ if options['irb']
puts %( page.formatted_data)
puts %( # => "<h1>My wiki page</h1>")
puts
puts "Check out the Gollum README for more."
puts "Full API documentation at:"
puts "https://github.com/gollum/gollum-lib"
puts
IRB.start_session(binding)
rescue Grit::InvalidGitRepositoryError, Grit::NoSuchPathError
rescue Gollum::InvalidGitRepositoryError, Gollum::NoSuchPathError
puts "Invalid Gollum wiki at #{File.expand_path(gollum_path).inspect}"
exit 0
end
else
require 'gollum/frontend/app'
require 'gollum/app'
Precious::App.set(:gollum_path, gollum_path)
Precious::App.set(:wiki_options, wiki_options)
Precious::App.settings.mustache[:templates] = wiki_options[:template_dir] if wiki_options[:template_dir]
if cfg = options['config']
if cfg = options[:config]
# If the path begins with a '/' it will be considered an absolute path,
# otherwise it will be relative to the CWD
cfg = File.join(Dir.getwd, cfg) unless cfg.slice(0) == File::SEPARATOR
require cfg
end
Precious::App.run!(options)
if wiki_options[:plantuml_url]
Gollum::Filter::PlantUML.configure do |config|
puts "Using #{wiki_options[:plantuml_url]} as PlantUML endpoint"
config.url = wiki_options[:plantuml_url]
end
end
base_path = wiki_options[:base_path]
if base_path.nil?
Precious::App.run!(options)
else
require 'rack'
class MapGollum
def initialize(base_path)
@mg = Rack::Builder.new do
map "/#{base_path}" do
run Precious::App
end
map '/' do
run Proc.new { [302, { 'Location' => "/#{base_path}" }, []] }
end
map '/*' do
run Proc.new { [302, { 'Location' => "/#{base_path}" }, []] }
end
end
end
def call(env)
@mg.call(env)
end
end
# Rack::Handler does not work with Ctrl + C. Use Rack::Server instead.
Rack::Server.new(:app => MapGollum.new(base_path), :Port => options[:port], :Host => options[:bind]).start
end
end
+11
View File
@@ -0,0 +1,11 @@
=begin
This file can be used to (e.g.):
- alter certain inner parts of Gollum,
- extend it with your stuff.
It is especially useful for customizing supported formats/markups. For more information and examples:
- https://github.com/gollum/gollum#config-file
=end
# enter your Ruby code here ...
+12
View File
@@ -0,0 +1,12 @@
=begin
You should use this file, if you wish to:
- launch Gollum as a Rack app,
- alter certain startup behaviour of Gollum.
For more information and examples:
- https://github.com/gollum/gollum/wiki/Gollum-via-Rack
- https://github.com/gollum/gollum#config-file
=end
# enter your Ruby code here ...
+3
View File
@@ -0,0 +1,3 @@
GOLLUM_USER=gollum
GOLLUM_BASE=/home/gollum/wiki
GOLLUM_OPTS="--config /home/gollum/config.rb"
+36
View File
@@ -0,0 +1,36 @@
#!/sbin/runscript
# Distributed under the terms of the MIT License
NAME=gollum
PID=/var/run/${NAME}.pid
EXEC=/usr/local/bin/gollum
LOG=/var/log/gollum.log
depend() {
need net
}
start() {
# Change log file to be owned by GOLLUM_USER
touch "${LOG}"
chown "${GOLLUM_USER}" "${LOG}"
ebegin "Starting Gollum"
start-stop-daemon --start \
--name "${NAME}" \
--user "${GOLLUM_USER}" \
--pidfile "${PID}" \
--make-pidfile --background \
--stderr "${LOG}" \
--exec "${EXEC}" -- $GOLLUM_OPTS "$GOLLUM_BASE"
eend $?
}
stop() {
ebegin "Stopping Gollum"
start-stop-daemon --stop \
--name "${NAME}" \
--user "${GOLLUM_USER}" \
--pidfile "${PID}"
eend $?
}
+12
View File
@@ -0,0 +1,12 @@
[Unit]
Description=Gollum wiki server
After=network.target
[Service]
Type=simple
User=%i
ExecStart=/usr/bin/gollum
Restart=on-abort
[Install]
WantedBy=multi-user.target
+79
View File
@@ -0,0 +1,79 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: gollum
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Start/stop gollum wiki
### END INIT INFO
# Distributed under the terms of the MIT License
set -e
# Edit these settings to your liking:
GOLLUM_USER=gollum
GOLLUM_BASE=/var/lib/gollum/.git
GOLLUM_OPTS="--bare"
NAME=gollum
PID=/var/run/${NAME}.pid
EXEC=/usr/local/bin/gollum
LOG=/var/log/gollum.log
. /lib/lsb/init-functions
start ()
{
# Change log file to be owned by GOLLUM_USER
touch "${LOG}"
chown "${GOLLUM_USER}" "${LOG}"
log_daemon_msg "Starting Gollum"
start-stop-daemon --start \
--name "${NAME}" \
--user "${GOLLUM_USER}" \
--chuid "${GOLLUM_USER}" \
--pidfile "${PID}" \
--make-pidfile --background \
--startas /bin/sh -- -c "exec ${EXEC} $GOLLUM_OPTS \"$GOLLUM_BASE\" > \"${LOG}\" 2>&1"
log_end_msg $?
}
stop ()
{
log_daemon_msg "Stopping Gollum"
start-stop-daemon --stop \
--user "${GOLLUM_USER}" \
--signal INT \
--pidfile "${PID}" \
--retry 10
log_end_msg $?
}
status ()
{
status_of_proc -p $PID $EXEC $NAME
}
case $1 in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
log_success_msg "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
-32
View File
@@ -1,32 +0,0 @@
Sanitization Rules
==================
Gollum uses the [Sanitize](http://wonko.com/post/sanitize) gem for HTML
sanitization.
See `lib/gollum.rb` for actual settings.
## ALLOWED TAGS
a, abbr, acronym, address, area, b, big, blockquote, br, button, caption,
center, cite, code, col, colgroup, dd, del, dfn, dir, div, dl, dt, em,
fieldset, font, form, h1, h2, h3, h4, h5, h6, hr, i, img, input, ins, kbd,
label, legend, li, map, menu, ol, optgroup, option, p, pre, q, s, samp,
select, small, span, strike, strong, sub, sup, table, tbody, td, textarea,
tfoot, th, thead, tr, tt, u, ul, var
## ALLOWED ATTRIBUTES
abbr, accept, accept-charset, accesskey, action, align, alt, axis, border,
cellpadding, cellspacing, char, charoff, charset, checked, cite, class, clear,
cols, colspan, color, compact, coords, datetime, dir, disabled, enctype, for,
frame, headers, height, href, hreflang, hspace, id, ismap, label, lang,
longdesc, maxlength, media, method, multiple, name, nohref, noshade, nowrap,
prompt, readonly, rel, rev, rows, rowspan, rules, scope, selected, shape,
size, span, src, start, summary, tabindex, target, title, type, usemap,
valign, value, vspace, width
## ALLOWED PROTOCOLS
a href: http, https, mailto
img src: http, https
+1057 -779
View File
File diff suppressed because it is too large Load Diff
+14 -16
View File
@@ -1,31 +1,29 @@
# ~*~ encoding: utf-8 ~*~
# stdlib
require 'digest/md5'
require 'digest/sha1'
require 'ostruct'
# external
require 'grit'
require 'github/markup'
require 'sanitize'
# ruby 1.8 compatibility
require 'gollum/ruby1.8'
# internal
require 'gollum/git_access'
require 'gollum/committer'
require 'gollum/pagination'
require 'gollum/blob_entry'
require 'gollum/wiki'
require 'gollum/page'
require 'gollum/file'
require 'gollum/markup'
require 'gollum/albino'
require 'gollum/sanitization'
require File.expand_path('../gollum/uri_encode_component', __FILE__)
# Set ruby to UTF-8 mode
# This is required for Ruby 1.8.7 which gollum still supports.
$KCODE = 'U' if RUBY_VERSION[0, 3] == '1.8'
module Gollum
VERSION = '1.2.0'
VERSION = '4.1.1'
class Error < StandardError; end
def self.assets_path
::File.expand_path('gollum/public', ::File.dirname(__FILE__))
end
class Error < StandardError;
end
class DuplicatePageError < Error
attr_accessor :dir
-5
View File
@@ -1,5 +0,0 @@
require 'albino/multi'
class Gollum::Albino < Albino::Multi
self.bin = ::Albino::Multi.bin
end
+592
View File
@@ -0,0 +1,592 @@
# ~*~ encoding: utf-8 ~*~
require 'cgi'
require 'sinatra'
require 'gollum-lib'
require 'mustache/sinatra'
require 'useragent'
require 'stringex'
require 'gollum'
require 'gollum/views/layout'
require 'gollum/views/editable'
require 'gollum/views/has_page'
require File.expand_path '../helpers', __FILE__
#required to upload bigger binary files
Gollum::set_git_timeout(120)
Gollum::set_git_max_filesize(190 * 10**6)
# Fix to_url
class String
alias :upstream_to_url :to_url
if defined?(Gollum::GIT_ADAPTER) && Gollum::GIT_ADAPTER != 'grit'
def to_ascii
self # Do not transliterate utf-8 url's unless using Grit
end
end
# _Header => header which causes errors
def to_url
return nil if self.nil?
upstream_to_url :exclude => ['_Header', '_Footer', '_Sidebar'], :force_downcase => false
end
end
# Run the frontend, based on Sinatra
#
# There are a number of wiki options that can be set for the frontend
#
# Example
# require 'gollum/app'
# Precious::App.set(:wiki_options, {
# :universal_toc => false,
# }
#
# See the wiki.rb file for more details on wiki options
module Precious
class App < Sinatra::Base
register Mustache::Sinatra
include Precious::Helpers
dir = File.dirname(File.expand_path(__FILE__))
# Detect unsupported browsers.
Browser = Struct.new(:browser, :version)
@@min_ua = [
Browser.new('Internet Explorer', '10.0'),
Browser.new('Chrome', '7.0'),
Browser.new('Firefox', '4.0'),
Browser.new('Safari', '9.0')
]
def supported_useragent?(user_agent)
ua = UserAgent.parse(user_agent)
@@min_ua.detect { |min| ua >= min }
end
# We want to serve public assets for now
set :public_folder, "#{dir}/public/gollum"
set :static, true
set :default_markup, :markdown
set :mustache, {
# Tell mustache where the Views constant lives
:namespace => Precious,
# Mustache templates live here
:templates => "#{dir}/templates",
# Tell mustache where the views are
:views => "#{dir}/views"
}
# Sinatra error handling
configure :development, :staging do
enable :show_exceptions, :dump_errors
disable :raise_errors, :clean_trace
end
configure :test do
enable :logging, :raise_errors, :dump_errors
end
before do
settings.wiki_options[:allow_editing] = settings.wiki_options.fetch(:allow_editing, true)
@allow_editing = settings.wiki_options[:allow_editing]
Precious::App.set(:mustache, {:templates => settings.wiki_options[:template_dir]}) if settings.wiki_options[:template_dir]
@base_url = url('/', false).chomp('/')
@page_dir = settings.wiki_options[:page_file_dir].to_s
# above will detect base_path when it's used with map in a config.ru
settings.wiki_options.merge!({ :base_path => @base_url })
@css = settings.wiki_options[:css]
@js = settings.wiki_options[:js]
@mathjax_config = settings.wiki_options[:mathjax_config]
end
get '/' do
redirect clean_url(::File.join(@base_url, @page_dir, wiki_new.index_page))
end
# path is set to name if path is nil.
# if path is 'a/b' and a and b are dirs, then
# path must have a trailing slash 'a/b/' or
# extract_path will trim path to 'a'
# name, path, version
def wiki_page(name, path = nil, version = nil, exact = true)
wiki = wiki_new
path = name if path.nil?
name = extract_name(name) || wiki.index_page
path = extract_path(path)
path = '/' if exact && path.nil?
OpenStruct.new(:wiki => wiki, :page => wiki.paged(name, path, exact, version),
:name => name, :path => path)
end
def wiki_new
Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
end
get '/emoji/:name' do
begin
[200, {'Content-Type' => 'image/png'}, emoji(params['name'])]
rescue ArgumentError
not_found
end
end
get '/data/*' do
if page = wiki_page(params[:splat].first).page
page.raw_data
end
end
get '/edit/*' do
forbid unless @allow_editing
wikip = wiki_page(params[:splat].first)
@name = wikip.name
@path = wikip.path
@upload_dest = find_upload_dest(@path)
wiki = wikip.wiki
@allow_uploads = wiki.allow_uploads
if page = wikip.page
if wiki.live_preview && page.format.to_s.include?('markdown') && supported_useragent?(request.user_agent)
live_preview_url = '/livepreview/?page=' + encodeURIComponent(@name)
if @path
live_preview_url << '&path=' + encodeURIComponent(@path)
end
redirect to(live_preview_url)
else
@page = page
@page.version = wiki.repo.log(wiki.ref, @page.path).first
@content = page.text_data
mustache :edit
end
else
redirect to("/create/#{encodeURIComponent(@name)}")
end
end
post '/uploadFile' do
forbid unless @allow_editing
wiki = wiki_new
unless wiki.allow_uploads
@message = "File uploads are disabled"
mustache :error
return
end
if params[:file]
fullname = params[:file][:filename]
tempfile = params[:file][:tempfile]
end
halt 500 unless tempfile.is_a? Tempfile
# Remove page file dir prefix from upload path if necessary -- committer handles this itself
dir = wiki.per_page_uploads ? params[:upload_dest] : ::File.join([wiki.page_file_dir, 'uploads'].compact)
ext = ::File.extname(fullname)
format = ext.split('.').last || 'txt'
filename = ::File.basename(fullname, ext)
contents = ::File.read(tempfile)
reponame = filename + '.' + format
head = wiki.repo.head
options = {
:message => "Uploaded file to #{dir}/#{reponame}",
:parent => wiki.repo.head.commit,
}
author = session['gollum.author']
unless author.nil?
options.merge! author
end
begin
committer = Gollum::Committer.new(wiki, options)
committer.add_to_index(dir, filename, format, contents)
committer.after_commit do |committer, sha|
wiki.clear_cache
committer.update_working_dir(dir, filename, format)
end
committer.commit
redirect to(request.referer)
rescue Gollum::DuplicatePageError => e
@message = "Duplicate page: #{e.message}"
mustache :error
end
end
post '/deleteFile/*' do
forbid unless @allow_editing
wiki = wiki_new
filepath = params[:splat].first
unless filepath.nil?
commit = commit_message
commit[:message] = "Deleted #{filepath}"
wiki.delete_file(filepath, commit)
end
redirect to('/fileview')
end
post '/rename/*' do
forbid unless @allow_editing
wikip = wiki_page(params[:splat].first)
halt 500 if wikip.nil?
wiki = wikip.wiki
page = wiki.paged(wikip.name, wikip.path, exact = true)
rename = params[:rename]
halt 500 if page.nil?
halt 500 if rename.nil? or rename.empty?
# Fixup the rename if it is a relative path
# In 1.8.7 rename[0] != rename[0..0]
if rename[0..0] != '/'
source_dir = ::File.dirname(page.path)
source_dir = '' if source_dir == '.'
(target_dir, target_name) = ::File.split(rename)
target_dir = target_dir == '' ? source_dir : "#{source_dir}/#{target_dir}"
rename = "#{target_dir}/#{target_name}"
end
committer = Gollum::Committer.new(wiki, commit_message)
commit = { :committer => committer }
success = wiki.rename_page(page, rename, commit)
if !success
# This occurs on NOOPs, for example renaming A => A
redirect to("/#{page.escaped_url_path}")
return
end
committer.commit
wikip = wiki_page(rename)
page = wiki.paged(wikip.name, wikip.path, exact = true)
return if page.nil?
redirect to("/#{page.escaped_url_path}")
end
post '/edit/*' do
forbid unless @allow_editing
path = '/' + clean_url(sanitize_empty_params(params[:path])).to_s
page_name = CGI.unescape(params[:page])
wiki = wiki_new
page = wiki.paged(page_name, path, exact = true)
return if page.nil?
committer = Gollum::Committer.new(wiki, commit_message)
commit = { :committer => committer }
update_wiki_page(wiki, page, params[:content], commit, page.name, params[:format])
update_wiki_page(wiki, page.header, params[:header], commit) if params[:header]
update_wiki_page(wiki, page.footer, params[:footer], commit) if params[:footer]
update_wiki_page(wiki, page.sidebar, params[:sidebar], commit) if params[:sidebar]
committer.commit
redirect to("/#{page.escaped_url_path}") unless page.nil?
end
get '/delete/*' do
forbid unless @allow_editing
wikip = wiki_page(params[:splat].first)
name = wikip.name
wiki = wikip.wiki
page = wikip.page
unless page.nil?
commit = commit_message
commit[:message] = "Destroyed #{name} (#{page.format})"
wiki.delete_page(page, commit)
end
redirect to('/')
end
get '/create/*' do
forbid unless @allow_editing
wikip = wiki_page(params[:splat].first.gsub('+', '-'))
@name = wikip.name.to_url
@path = wikip.path
@allow_uploads = wikip.wiki.allow_uploads
@upload_dest = find_upload_dest(@path)
page_dir = settings.wiki_options[:page_file_dir].to_s
unless page_dir.empty?
# --page-file-dir docs
# /docs/Home should be created in /Home
# not /docs/Home because write_page will append /docs
@path = @path.sub(page_dir, '/') if @path.start_with? page_dir
end
@path = clean_path(@path)
page = wikip.page
if page
page_dir = settings.wiki_options[:page_file_dir].to_s
redirect to("/#{clean_url(::File.join(page_dir, page.escaped_url_path))}")
else
mustache :create
end
end
post '/create' do
forbid unless @allow_editing
name = params[:page].to_url
path = sanitize_empty_params(params[:path]) || ''
format = params[:format].intern
wiki = wiki_new
path.gsub!(/^\//, '')
begin
wiki.write_page(name, format, params[:content], commit_message, path)
page_dir = settings.wiki_options[:page_file_dir].to_s
redirect to("/#{clean_url(::File.join(encodeURIComponent(page_dir), encodeURIComponent(path), encodeURIComponent(name)))}")
rescue Gollum::DuplicatePageError => e
@message = "Duplicate page: #{e.message}"
mustache :error
end
end
post '/revert/*/:sha1/:sha2' do
forbid unless @allow_editing
wikip = wiki_page(params[:splat].first)
@path = wikip.path
@name = wikip.name
wiki = wikip.wiki
@page = wiki.paged(@name, @path)
sha1 = params[:sha1]
sha2 = params[:sha2]
commit = commit_message
commit[:message] = "Revert commit #{sha1.chars.take(7).join}"
if wiki.revert_page(@page, sha1, sha2, commit)
redirect to("/#{@page.escaped_url_path}")
else
sha2, sha1 = sha1, "#{sha1}^" if !sha2
@versions = [sha1, sha2]
diffs = wiki.repo.diff(@versions.first, @versions.last, @page.path)
@diff = diffs.first
@message = "The patch does not apply."
mustache :compare
end
end
post '/preview' do
forbid unless @allow_editing
wiki = wiki_new
@name = params[:page] || "Preview"
@page = wiki.preview_page(@name, params[:content], params[:format])
@content = @page.formatted_data
@toc_content = wiki.universal_toc ? @page.toc_data : nil
@mathjax = wiki.mathjax
@h1_title = wiki.h1_title
@editable = false
@bar_side = wiki.bar_side
@allow_uploads = wiki.allow_uploads
mustache :page
end
get '/livepreview/' do
wiki = wiki_new
@mathjax = wiki.mathjax
mustache :livepreview, { :layout => false }
end
get '/history/*' do
@page = wiki_page(params[:splat].first).page
@page_num = [params[:page].to_i, 1].max
unless @page.nil?
@versions = @page.versions :page => @page_num
mustache :history
else
redirect to("/")
end
end
get '/latest_changes' do
@wiki = wiki_new
max_count = settings.wiki_options.fetch(:latest_changes_count, 10)
@versions = @wiki.latest_changes({:max_count => max_count})
mustache :latest_changes
end
post '/compare/*' do
@file = encodeURIComponent(params[:splat].first)
@versions = params[:versions] || []
if @versions.size < 2
redirect to("/history/#{@file}")
else
redirect to("/compare/%s/%s...%s" % [
@file,
@versions.last,
@versions.first]
)
end
end
get %r{
/compare/ # match any URL beginning with /compare/
(.+) # extract the full path (including any directories)
/ # match the final slash
([^.]+) # match the first SHA1
\.{2,3} # match .. or ...
(.+) # match the second SHA1
}x do |path, start_version, end_version|
wikip = wiki_page(path)
@path = wikip.path
@name = wikip.name
@versions = [start_version, end_version]
wiki = wikip.wiki
@page = wikip.page
diffs = wiki.repo.diff(@versions.first, @versions.last, @page.path)
@diff = diffs.first
mustache :compare
end
get %r{/(.+?)/([0-9a-f]{40})} do
file_path = params[:captures][0]
version = params[:captures][1]
wikip = wiki_page(file_path, file_path, version)
name = wikip.name
path = wikip.path
if page = wikip.page
@page = page
@name = name
@content = page.formatted_data
@version = version
@bar_side = wikip.wiki.bar_side
mustache :page
elsif file = wikip.wiki.file("#{file_path}", version, true)
show_file(file)
else
halt 404
end
end
get '/search' do
@query = params[:q] || ''
wiki = wiki_new
# Sort wiki search results by count (desc) and then by name (asc)
@results = wiki.search(@query).sort { |a, b| (a[:count] <=> b[:count]).nonzero? || b[:name] <=> a[:name] }.reverse
@name = @query
mustache :search
end
get %r{
/pages # match any URL beginning with /pages
(?: # begin an optional non-capturing group
/(.+) # capture any path after the "/pages" excluding the leading slash
)? # end the optional non-capturing group
}x do |path|
@path = extract_path(path) if path
wiki_options = settings.wiki_options.merge({ :page_file_dir => @path })
wiki = Gollum::Wiki.new(settings.gollum_path, wiki_options)
@results = wiki.pages
@results += wiki.files if settings.wiki_options[:show_all]
@results = @results.sort_by { |p| p.name.downcase } # Sort Results alphabetically, fixes 922
@ref = wiki.ref
mustache :pages
end
get '/fileview' do
wiki = wiki_new
options = settings.wiki_options
content = wiki.pages
# if showing all files include wiki.files
content += wiki.files if options[:show_all]
# must pass wiki_options to FileView
# --show-all and --collapse-tree can be set.
@results = Gollum::FileView.new(content, options).render_files
@ref = wiki.ref
mustache :file_view, { :layout => false }
end
get '/*' do
show_page_or_file(params[:splat].first)
end
def show_page_or_file(fullpath)
wiki = wiki_new
name = extract_name(fullpath) || wiki.index_page
path = extract_path(fullpath) || '/'
if page = wiki.paged(name, path, exact = true)
@page = page
@name = name
@content = page.formatted_data
@upload_dest = find_upload_dest(path)
# Extensions and layout data
@editable = true
@page_exists = !page.last_version.nil?
@toc_content = wiki.universal_toc ? @page.toc_data : nil
@mathjax = wiki.mathjax
@h1_title = wiki.h1_title
@bar_side = wiki.bar_side
@allow_uploads = wiki.allow_uploads
mustache :page
elsif file = wiki.file(fullpath, wiki.ref, true)
show_file(file)
else
not_found unless @allow_editing
page_path = [path, name].compact.join('/')
redirect to("/create/#{clean_url(encodeURIComponent(page_path))}")
end
end
def show_file(file)
return unless file
if file.on_disk?
send_file file.on_disk_path, :disposition => 'inline'
else
content_type file.mime_type
file.raw_data
end
end
def update_wiki_page(wiki, page, content, commit, name = nil, format = nil)
return if !page ||
((!content || page.raw_data == content) && page.format == format)
name ||= page.name
format = (format || page.format).to_sym
content ||= page.raw_data
wiki.update_page(page, name, format, content.to_s, commit)
end
private
# Options parameter to Gollum::Committer#initialize
# :message - The String commit message.
# :name - The String author full name.
# :email - The String email address.
# message is sourced from the incoming request parameters
# author details are sourced from the session, to be populated by rack middleware ahead of us
def commit_message
msg = (params[:message].nil? or params[:message].empty?) ? "[no message]" : params[:message]
commit_message = { :message => msg }
author_parameters = session['gollum.author']
commit_message.merge! author_parameters unless author_parameters.nil?
commit_message
end
def find_upload_dest(path)
settings.wiki_options[:allow_uploads] ?
(settings.wiki_options[:per_page_uploads] ?
"#{path}/#{@name}".sub(/^\/\//, '') : 'uploads'
) : ''
end
end
end
-78
View File
@@ -1,78 +0,0 @@
module Gollum
class BlobEntry
# Gets the String SHA for this blob.
attr_reader :sha
# Gets the full path String for this blob.
attr_reader :path
# Gets the Fixnum size of this blob.
attr_reader :size
def initialize(sha, path, size = nil)
@sha = sha
@path = path
@size = size
@dir = @name = @blob = nil
end
# Gets the normalized directory path String for this blob.
def dir
@dir ||= self.class.normalize_dir(::File.dirname(@path))
end
# Gets the file base name String for this blob.
def name
@name ||= ::File.basename(@path)
end
# Gets a Grit::Blob instance for this blob.
#
# repo - Grit::Repo instance for the Grit::Blob.
#
# Returns an unbaked Grit::Blob instance.
def blob(repo)
@blob ||= Grit::Blob.create(repo,
:id => @sha, :name => name, :size => @size)
end
# Gets a Page instance for this blob.
#
# wiki - Gollum::Wiki instance for the Gollum::Page
#
# Returns a Gollum::Page instance.
def page(wiki, commit)
blob = self.blob(wiki.repo)
page = wiki.page_class.new(wiki).populate(blob, self.dir)
page.version = commit
page
end
def inspect
%(#<Gollum::BlobEntry #{@sha} #{@path}>)
end
# Normalizes a given directory name for searching through tree paths.
# Ensures that a directory begins with a slash, or
#
# normalize_dir("") # => ""
# normalize_dir(".") # => ""
# normalize_dir("foo") # => "/foo"
# normalize_dir("/foo/") # => "/foo"
# normalize_dir("/") # => ""
# normalize_dir("c:/") # => ""
#
# dir - String directory name.
#
# Returns a normalized String directory name, or nil if no directory
# is given.
def self.normalize_dir(dir)
return '' if dir =~ /^.:\/$/
if dir
dir = ::File.expand_path(dir, '/')
dir = '' if dir == '/'
end
dir
end
end
end
-217
View File
@@ -1,217 +0,0 @@
module Gollum
# Responsible for handling the commit process for a Wiki. It sets up the
# Git index, provides methods for modifying the tree, and stores callbacks
# to be fired after the commit has been made. This is specifically
# designed to handle multiple updated pages in a single commit.
class Committer
# Gets the instance of the Gollum::Wiki that is being updated.
attr_reader :wiki
# Gets a Hash of commit options.
attr_reader :options
# Initializes the Committer.
#
# wiki - The Gollum::Wiki instance that is being updated.
# options - The commit Hash details:
# :message - The String commit message.
# :name - The String author full name.
# :email - The String email address.
# :parent - Optional Grit::Commit parent to this update.
# :tree - Optional String SHA of the tree to create the
# index from.
# :committer - Optional Gollum::Committer instance. If provided,
# assume that this operation is part of batch of
# updates and the commit happens later.
#
# Returns the Committer instance.
def initialize(wiki, options = {})
@wiki = wiki
@options = options
@callbacks = []
end
# Public: References the Git index for this commit.
#
# Returns a Grit::Index.
def index
@index ||= begin
idx = @wiki.repo.index
if tree = options[:tree]
idx.read_tree(tree)
elsif parent = parents.first
idx.read_tree(parent.tree.id)
end
idx
end
end
# Public: The committer for this commit.
#
# Returns a Grit::Actor.
def actor
@actor ||= begin
@options[:name] = @wiki.default_committer_name if @options[:name].to_s.empty?
@options[:email] = @wiki.default_committer_email if @options[:email].to_s.empty?
Grit::Actor.new(@options[:name], @options[:email])
end
end
# Public: The parent commits to this pending commit.
#
# Returns an array of Grit::Commit instances.
def parents
@parents ||= begin
arr = [@options[:parent] || @wiki.repo.commit('master')]
arr.flatten!
arr.compact!
arr
end
end
# Adds a page to the given Index.
#
# dir - The String subdirectory of the Gollum::Page without any
# prefix or suffix slashes (e.g. "foo/bar").
# name - The String Gollum::Page name.
# format - The Symbol Gollum::Page format.
# data - The String wiki data to store in the tree map.
# allow_same_ext - A Boolean determining if the tree map allows the same
# filename with the same extension.
#
# Raises Gollum::DuplicatePageError if a matching filename already exists.
# This way, pages are not inadvertently overwritten.
#
# Returns nothing (modifies the Index in place).
def add_to_index(dir, name, format, data, allow_same_ext = false)
path = @wiki.page_file_name(name, format)
dir = '/' if dir.strip.empty?
fullpath = ::File.join(*[@wiki.page_file_dir, dir, path].compact)
fullpath = fullpath[1..-1] if fullpath =~ /^\//
if index.current_tree && tree = index.current_tree / dir
downpath = path.downcase.sub(/\.\w+$/, '')
tree.blobs.each do |blob|
next if page_path_scheduled_for_deletion?(index.tree, fullpath)
file = blob.name.downcase.sub(/\.\w+$/, '')
file_ext = ::File.extname(blob.name).sub(/^\./, '')
if downpath == file && !(allow_same_ext && file_ext == ext)
raise DuplicatePageError.new(dir, blob.name, path)
end
end
end
index.add(fullpath, @wiki.normalize(data))
end
# Update the given file in the repository's working directory if there
# is a working directory present.
#
# dir - The String directory in which the file lives.
# name - The String name of the page (may be in human format).
# format - The Symbol format of the page.
#
# Returns nothing.
def update_working_dir(dir, name, format)
unless @wiki.repo.bare
if @wiki.page_file_dir
dir = dir.size.zero? ? @wiki.page_file_dir : File.join(dir, @wiki.page_file_dir)
end
path =
if dir == ''
@wiki.page_file_name(name, format)
else
::File.join(dir, @wiki.page_file_name(name, format))
end
Dir.chdir(::File.join(@wiki.repo.path, '..')) do
if file_path_scheduled_for_deletion?(index.tree, path)
@wiki.repo.git.rm({'f' => true}, '--', path)
else
@wiki.repo.git.checkout({}, 'HEAD', '--', path)
end
end
end
end
# Writes the commit to Git and runs the after_commit callbacks.
#
# Returns the String SHA1 of the new commit.
def commit
sha1 = index.commit(@options[:message], parents, actor)
@callbacks.each do |cb|
cb.call(self, sha1)
end
sha1
end
# Adds a callback to be fired after a commit.
#
# block - A block that expects this Committer instance and the created
# commit's SHA1 as the arguments.
#
# Returns nothing.
def after_commit(&block)
@callbacks << block
end
# Determine if a given page (regardless of format) is scheduled to be
# deleted in the next commit for the given Index.
#
# map - The Hash map:
# key - The String directory or filename.
# val - The Hash submap or the String contents of the file.
# path - The String path of the page file. This may include the format
# extension in which case it will be ignored.
#
# Returns the Boolean response.
def page_path_scheduled_for_deletion?(map, path)
parts = path.split('/')
if parts.size == 1
deletions = map.keys.select { |k| !map[k] }
downfile = parts.first.downcase.sub(/\.\w+$/, '')
deletions.any? { |d| d.downcase.sub(/\.\w+$/, '') == downfile }
else
part = parts.shift
if rest = map[part]
page_path_scheduled_for_deletion?(rest, parts.join('/'))
else
false
end
end
end
# Determine if a given file is scheduled to be deleted in the next commit
# for the given Index.
#
# map - The Hash map:
# key - The String directory or filename.
# val - The Hash submap or the String contents of the file.
# path - The String path of the file including extension.
#
# Returns the Boolean response.
def file_path_scheduled_for_deletion?(map, path)
parts = path.split('/')
if parts.size == 1
deletions = map.keys.select { |k| !map[k] }
deletions.any? { |d| d == parts.first }
else
part = parts.shift
if rest = map[part]
file_path_scheduled_for_deletion?(rest, parts.join('/'))
else
false
end
end
end
# Proxies methods t
def method_missing(name, *args)
index.send(name, *args)
end
end
end
-64
View File
@@ -1,64 +0,0 @@
module Gollum
class File
Wiki.file_class = self
# Public: Initialize a file.
#
# wiki - The Gollum::Wiki in question.
#
# Returns a newly initialized Gollum::File.
def initialize(wiki)
@wiki = wiki
@blob = nil
@path = nil
end
# Public: The on-disk filename of the file.
#
# Returns the String name.
def name
@blob && @blob.name
end
# Public: The raw contents of the page.
#
# Returns the String data.
def raw_data
@blob && @blob.data
end
# Public: The Grit::Commit version of the file.
attr_reader :version
# Public: The String path of the file.
attr_reader :path
# Public: The String mime type of the file.
def mime_type
@blob.mime_type
end
#########################################################################
#
# Internal Methods
#
#########################################################################
# Find a file in the given Gollum repo.
#
# name - The full String path.
# version - The String version ID to find.
#
# Returns a Gollum::File or nil if the file could not be found.
def find(name, version)
checked = name.downcase
map = @wiki.tree_map_for(version)
if entry = map.detect { |entry| entry.path.downcase == checked }
@path = name
@blob = entry.blob(@wiki.repo)
@version = version.is_a?(Grit::Commit) ? version : @wiki.commit_for(version)
self
end
end
end
end
-205
View File
@@ -1,205 +0,0 @@
require 'cgi'
require 'sinatra'
require 'gollum'
require 'mustache/sinatra'
require 'gollum/frontend/views/layout'
require 'gollum/frontend/views/editable'
module Precious
class App < Sinatra::Base
register Mustache::Sinatra
dir = File.dirname(File.expand_path(__FILE__))
# We want to serve public assets for now
set :public, "#{dir}/public"
set :static, true
set :mustache, {
# Tell mustache where the Views constant lives
:namespace => Precious,
# Mustache templates live here
:templates => "#{dir}/templates",
# Tell mustache where the views are
:views => "#{dir}/views"
}
# Sinatra error handling
configure :development, :staging do
enable :show_exceptions, :dump_errors
disable :raise_errors, :clean_trace
end
configure :test do
enable :logging, :raise_errors, :dump_errors
end
get '/' do
show_page_or_file('Home')
end
get '/edit/*' do
@name = params[:splat].first
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
if page = wiki.page(@name)
@page = page
@content = page.raw_data
mustache :edit
else
mustache :create
end
end
post '/edit/*' do
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
page = wiki.page(params[:splat].first)
name = params[:rename] || page.name
committer = Gollum::Committer.new(wiki, commit_message)
commit = {:committer => committer}
update_wiki_page(wiki, page, params[:content], commit, name,
params[:format])
update_wiki_page(wiki, page.footer, params[:footer], commit) if params[:footer]
update_wiki_page(wiki, page.sidebar, params[:sidebar], commit) if params[:sidebar]
committer.commit
redirect "/#{CGI.escape(Gollum::Page.cname(name))}"
end
post '/create' do
name = params[:page]
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
format = params[:format].intern
begin
wiki.write_page(name, format, params[:content], commit_message)
redirect "/#{CGI.escape(name)}"
rescue Gollum::DuplicatePageError => e
@message = "Duplicate page: #{e.message}"
mustache :error
end
end
post '/revert/:page/*' do
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
@name = params[:page]
@page = wiki.page(@name)
shas = params[:splat].first.split("/")
sha1 = shas.shift
sha2 = shas.shift
if wiki.revert_page(@page, sha1, sha2, commit_message)
redirect "/#{CGI.escape(@name)}"
else
sha2, sha1 = sha1, "#{sha1}^" if !sha2
@versions = [sha1, sha2]
diffs = wiki.repo.diff(@versions.first, @versions.last, @page.path)
@diff = diffs.first
@message = "The patch does not apply."
mustache :compare
end
end
post '/preview' do
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
@name = "Preview"
@page = wiki.preview_page(@name, params[:content], params[:format])
@content = @page.formatted_data
mustache :page
end
get '/history/:name' do
@name = params[:name]
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
@page = wiki.page(@name)
@page_num = [params[:page].to_i, 1].max
@versions = @page.versions :page => @page_num
mustache :history
end
post '/compare/:name' do
@versions = params[:versions] || []
if @versions.size < 2
redirect "/history/#{CGI.escape(params[:name])}"
else
redirect "/compare/%s/%s...%s" % [
CGI.escape(params[:name]),
@versions.last,
@versions.first]
end
end
get '/compare/:name/:version_list' do
@name = params[:name]
@versions = params[:version_list].split(/\.{2,3}/)
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
@page = wiki.page(@name)
diffs = wiki.repo.diff(@versions.first, @versions.last, @page.path)
@diff = diffs.first
mustache :compare
end
get %r{^/(javascript|css|images)} do
halt 404
end
get %r{/(.+?)/([0-9a-f]{40})} do
name = params[:captures][0]
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
if page = wiki.page(name, params[:captures][1])
@page = page
@name = name
@content = page.formatted_data
mustache :page
else
halt 404
end
end
get '/search' do
@query = params[:q]
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
@results = wiki.search @query
@name = @query
mustache :search
end
get '/*' do
show_page_or_file(params[:splat].first)
end
def show_page_or_file(name)
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
if page = wiki.page(name)
@page = page
@name = name
@content = page.formatted_data
mustache :page
elsif file = wiki.file(name)
content_type file.mime_type
file.raw_data
else
@name = name
mustache :create
end
end
def update_wiki_page(wiki, page, content, commit_message, name = nil, format = nil)
return if !page ||
((!content || page.raw_data == content) && page.format == format)
name ||= page.name
format = (format || page.format).to_sym
content ||= page.raw_data
wiki.update_page(page, name, format, content.to_s, commit_message)
end
def commit_message
{ :message => params[:message] }
end
end
end
-665
View File
@@ -1,665 +0,0 @@
/*
gollum.css
A basic stylesheet for Gollum
*/
/* @section core */
body, html {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 10px; /* -> 1em */
margin: 0;
padding: 0;
}
#wiki-wrapper {
margin: 0 auto;
overflow: visible;
width: 80%;
}
a:link {
color: #4183c4;
text-decoration: none;
}
a:hover, a:visited {
color: #4183c4;
text-decoration: underline;
}
/* @section head */
#head {
border-bottom: 1px solid #ccc;
margin: 4.5em 0 0.5em;
padding: 0.5em 0;
overflow: hidden;
}
#head h1 {
font-size: 3.3em;
float: left;
line-height: normal;
margin: 0;
padding: 0.08em 0 0 0;
width: 50%;
}
#head ul.actions {
float: right;
}
/* @section content */
#wiki-content {
height: 1%;
overflow: visible;
}
#wiki-content .wrap {
height: 1%;
overflow: auto;
}
/* @section comments */
#wiki-body #inline-comment {
display: none; /* todo */
}
/* @section body */
#wiki-body {
display: block;
float: left;
margin-right: 3%;
width: 100%;
}
.has-rightbar #wiki-body {
width: 68%;
}
/* @section rightbar */
#wiki-rightbar {
background-color: #f7f7f7;
border: 1px solid #ddd;
font-size: 13px;
float: right;
padding: 7px;
width: 25%;
border-radius: 0.5em;
-moz-border-radius: 0.5em;
-webkit-border-radius: 0.5em;
}
#wiki-rightbar p {
margin: 13px 0 0;
}
#wiki-rightbar > p:first-child {
margin-top: 0;
}
#wiki-rightbar p.parent {
border-bottom: 1px solid #bbb;
font-weight: bold;
margin: 0 0 0.5em 0;
padding: 0 0 0.5em 0;
text-shadow: 0 1px 0 #fff;
}
/* Back arrow */
#wiki-rightbar p.parent:before {
color: #666;
content: "← ";
}
#wiki-rightbar h3 {
font-size: 1.2em;
color: #333;
margin: 1.2em 0 0;
padding: 0;
text-shadow: 0 1px 0 #fff;
}
#wiki-rightbar ul {
margin: 0.5em 0 1em;
padding: 0;
}
#wiki-rightbar ul li {
color: #bbb;
margin: 0 0 0 1em;
padding: 0;
line-height: 1.75em;
list-style-position: inside;
list-style-type: round;
}
#wiki-rightbar #nav ul li a {
font-weight: bold;
text-shadow: 0 1px 0 #fff;
}
/* @section footer */
#wiki-footer {
clear: both;
margin: 2em 0 5em;
}
.has-rightbar #wiki-footer {
width: 70%;
}
#wiki-footer #footer-content {
background-color: #f7f7f7;
border: 1px solid #ddd;
font-size: 1.2em;
line-height: 1.5em;
margin-top: 1.5em;
padding: 1em;
border-radius: 0.5em;
-moz-border-radius: 0.5em;
-webkit-border-radius: 0.5em;
}
#wiki-footer #footer-content h3 {
font-size: 1.2em;
color: #333;
margin: 0;
padding: 0 0 0.2em;
text-shadow: 0 1px 0 #fff;
}
#wiki-footer #footer-content p {
margin: 0.5em 0 0;
padding: 0;
}
#wiki-footer #footer-content ul.links {
margin: 0.5em 0 0;
overflow: hidden;
padding: 0;
}
#wiki-footer #footer-content ul.links li {
color: #999;
float: left;
list-style-position: inside;
list-style-type: square;
padding: 0;
margin-left: 0.75em;
}
#wiki-footer #footer-content ul.links li a {
font-weight: bold;
text-shadow: 0 1px 0 #fff;
}
#wiki-footer #footer-content ul.links li:first-child {
list-style-type: none;
margin: 0;
}
.ff #wiki-footer #footer-content ul.links li:first-child {
margin: 0 -0.75em 0 0;
}
/* @section page-footer */
.page #footer {
border-top: 1px solid #ccc;
margin: 1em 0 7em;
}
#footer p#last-edit {
font-size: 1.2em;
line-height: 1.6em;
color: #999;
margin: 0.9em 0;
}
#footer p#last-edit span.username {
font-weight: bold;
}
/* @section history */
.history h1 {
color: #999;
font-weight: normal;
}
.history h1 strong {
color: #000;
font-weight: bold;
}
#wiki-history {
margin-top: 3em;
}
#wiki-history fieldset {
border: 0;
margin: 2em 0;
padding: 0;
}
#wiki-history table, #wiki-history tbody {
border-collapse: collapse;
padding: 0;
margin: 0;
width: 100%;
}
#wiki-history table tr {
padding: 0;
margin: 0;
}
#wiki-history table tr {
background-color: #ebf2f6;
}
#wiki-history table tr td {
border: 1px solid #c0dce9;
font-size: 1.2em;
line-height: 1.6em;
margin: 0;
padding: 0.3em 0.7em;
}
#wiki-history table tr td.checkbox {
min-width: 2em;
padding: 0.3em;
}
#wiki-history table tr td.checkbox input {
cursor: pointer;
display: block;
padding-right: 0;
padding-top: 0.4em;
margin-right: -0.2em;
}
#wiki-history table tr:nth-child(2n),
#wiki-history table tr.alt-row {
background-color: #f3f7fa;
}
#wiki-history table tr.selected {
background-color: #ffffea !important;
z-index: 100;
}
#wiki-history table tr td.commit-name {
border-left: 0;
}
#wiki-history table tr td.commit-name span.time-elapsed {
color: #999;
}
#wiki-history table tr td.author {
width: 20%;
}
#wiki-history table tr td.author a {
color: #000;
font-weight: bold;
}
#wiki-history table tr td.author a span.username {
display: block;
padding-top: 3px;
}
#wiki-history table tr td img {
background-color: #fff;
border: 1px solid #999;
display: block;
float: left;
height: 18px;
overflow: hidden;
margin: 0 0.5em 0 0;
width: 18px;
padding: 2px;
}
#wiki-history table tr td.commit-name a {
font-size: 0.9em;
font-family: 'Monaco', 'Andale Mono', Consolas, 'Courier New', monospace;
padding: 0 0.2em;
}
.history #wiki-history ul.actions li,
.history #footer ul.actions li {
margin: 0 0.6em 0 0;
}
/* @section edit */
.edit h1 {
color: #999;
font-weight: normal;
}
.edit h1 strong {
color: #000;
font-weight: bold;
}
/* @section search */
.results h1 {
color: #999;
font-weight: normal;
}
.results h1 strong {
color: #000;
font-weight: bold;
}
.results #results {
border-bottom: 1px solid #ccc;
margin-bottom: 2em;
padding-bottom: 2em;
}
.results #results ul {
margin: 2em 0 0 0;
padding: 0;
}
.results #results ul li {
font-size: 1.2em;
line-height: 1.6em;
list-style-position: outside;
padding: 0.2em 0;
}
.results #results ul li span.count {
color: #999;
}
.results p#no-results {
font-size: 1.2em;
line-height: 1.6em;
margin-top: 2em;
}
.results #footer ul.actions li {
margin: 0 1em 0 0;
}
/* @section compare */
.compare h1 {
color: #999;
font-weight: normal;
}
.compare h1 strong {
color: #000;
font-weight: bold;
}
.compare #compare-content {
margin-top: 3em;
}
.compare .data {
border: 1px solid #ddd;
margin-top: 1em;
overflow: auto;
}
.compare .data pre {
margin: 0;
padding: 0;
}
.compare .data pre div {
padding: 0 0 0 1em;
}
.compare .data tr td {
font-family: "Consolas", "Monaco", "Andale Mono", "Courier New", monospace;
font-size: 1.2em;
line-height: 1.8em;
margin: 0;
padding: 0;
}
.compare .data td.line_numbers {
background: #f7f7f7;
border-right: 1px solid #999;
color: #999;
padding: 0 0 0 0.5em;
}
.compare #compare-content ul.actions li,
.compare #footer ul.actions li {
margin-left: 0;
margin-right: 0.6em;
}
/* @control syntax */
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic }
.highlight .err { color: #a61717; background-color: #e3d2d2 }
.highlight .k { font-weight: bold }
.highlight .o { font-weight: bold }
.highlight .cm { color: #999988; font-style: italic }
.highlight .cp { color: #999999; font-weight: bold }
.highlight .c1 { color: #999988; font-style: italic }
.highlight .cs { color: #999999; font-weight: bold; font-style: italic }
.highlight .gd { color: #000000; background-color: #ffdddd }
.highlight .gd .x { color: #000000; background-color: #ffaaaa }
.highlight .ge { font-style: italic }
.highlight .gr { color: #aa0000 }
.highlight .gh { color: #999999 }
.highlight .gi { color: #000000; background-color: #ddffdd }
.highlight .gi .x { color: #000000; background-color: #aaffaa }
.highlight .gc { color: #999; background-color: #EAF2F5 }
.highlight .go { color: #888888 }
.highlight .gp { color: #555555 }
.highlight .gs { font-weight: bold }
.highlight .gu { color: #aaaaaa }
.highlight .gt { color: #aa0000 }
/* @control minibutton */
ul.actions {
display: block;
list-style-type: none;
overflow: hidden;
padding: 0;
}
ul.actions li {
float: left;
font-size: 1.2em;
margin-left: 0.6em;
}
.minibutton a {
background-color: #f7f7f7;
border: 1px solid #d4d4d4;
color: #333;
display: block;
font-weight: bold;
margin: 0;
padding: 0.4em 1em;
height: 1.4em;
text-shadow: 0 1px 0 #fff;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
background: -moz-linear-gradient(top, #f4f4f4, #ececec);
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
#search-submit {
background-color: #f7f7f7;
border: 1px solid #d4d4d4;
color: #333;
display: block;
font-weight: bold;
margin: 0;
padding: 0.4em 1em;
text-shadow: 0 1px 0 #fff;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
background: -moz-linear-gradient(top, #f4f4f4, #ececec);
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
.minibutton a:hover,
#search-submit:hover {
background: #3072b3;
border-color: #518cc6 #518cc6 #2a65a0;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
text-decoration: none;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#599bdc', endColorstr='#3072b3');
background: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3));
background: -moz-linear-gradient(top, #599bdc, #3072b3);
}
.minibutton a:visited {
text-decoration: none;
}
/* @special error */
#wiki-wrapper.error {
height: 1px;
position: absolute;
overflow: visible;
top: 50%;
width: 100%;
}
#error {
background-color: #f9f9f9;
border: 1px solid #e4e4e4;
left: 50%;
overflow: hidden;
padding: 2%;
margin: -10% 0 0 -35%;
position: absolute;
width: 70%;
border-radius: 0.5em;
-moz-border-radius: 0.5em;
-webkit-border-radius: 0.5em;
}
#error h1 {
font-size: 3em;
line-height: normal;
margin: 0;
padding: 0;
}
#error p {
font-size: 1.2em;
line-height: 1.6em;
margin: 1em 0 0.5em;
padding: 0;
}
/* @control searchbar */
#head #searchbar {
float: right;
margin: 1em 0 0 0;
padding: 0;
overflow: hidden;
}
#head #searchbar #searchbar-fauxtext {
background: #fff;
border: 1px solid #d4d4d4;
overflow: hidden;
border-radius: 0.3em;
-moz-border-radius: 0.3em;
-webkit-border-radius: 0.3em;
}
#head #searchbar #searchbar-fauxtext input#search-query {
border: none;
color: #000;
float: left;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1.2em;
height: 1.8em;
-webkit-focus-ring: none;
}
.ff #head #searchbar #searchbar-fauxtext input#search-query {
padding: 0.2em 0 0.2em 0.5em;
}
.ie #head #searchbar #searchbar-fauxtext input#search-query {
padding: 0.4em 0 0 0.5em;
}
#head #searchbar #searchbar-fauxtext input#search-query.ph {
color: #999;
}
#head #searchbar #searchbar-fauxtext #search-submit {
border: 0;
border-left: 1px solid #d4d4d4;
cursor: pointer;
margin: 0 !important;
padding: 0;
float: right;
font-size: 1.2em;
border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
-webkit-border-radius: 0 3px 3px 0;
}
#head #searchbar #searchbar-fauxtext #search-submit span {
background-image: url(/images/icon-sprite.png);
background-position: -431px -1px;
background-repeat: no-repeat;
display: block;
height: 2em;
overflow: hidden;
text-indent: -5000px;
width: 28px;
}
.ff #head #searchbar #searchbar-fauxtext #search-submit span,
.ie #head #searchbar #searchbar-fauxtext #search-submit span {
height: 2.2em;
}
#head #searchbar #searchbar-fauxtext #search-submit:hover span {
background-position: -431px -28px;
padding: 0;
}
#MathJax_Message {
display: none;
}
-316
View File
@@ -1,316 +0,0 @@
/*
Gollum v3 Template
*/
#template {
font-size: 13px;
line-height: 23px;
margin-bottom: 40px;
}
/* Link Colors */
a.absent {
color: #c00;
}
/* Primary Body Copy */
#template p {
margin: 16px 0 0;
padding: 0;
}
/* ReST first graf in nested list */
#template * li p.first {
display: inline-block;
}
/* Headings */
#template h1, #template h2, #template h3,
#template h4, #template h5, #template h6 {
margin: 0;
padding: 0;
}
#template h1 {
border-top: 4px solid #ccc;
font-size: 32px;
line-height: normal;
padding: 10px 0 0;
margin: 30px 0 0;
}
#template h2 {
border-top: 4px solid #ccc;
font-size: 22px;
line-height: normal;
margin: 22px 0 0;
padding: 7px 0 0;
}
#template h3 {
font-size: 16px;
line-height: 26px;
padding: 26px 0 0;
}
#template h4 {
font-size: 14px;
line-height: 26px;
padding: 18px 0 4px;
font-weight: bold;
text-transform: uppercase;
}
#template h5 {
font-size: 13px;
line-height: 26px;
margin-bottom: -19px;
padding: 14px 0 0;
font-weight: bold;
text-transform: uppercase;
}
#template h6 {
color: #666;
font-size: 14px;
line-height: 26px;
margin-bottom: -19px;
padding: 18px 0 0;
font-weight: normal;
font-variant: italic;
}
#template hr {
background-color: #ccc;
color: #ccc;
border: 2px solid #ccc;
margin: 20px 0;
padding: 0;
}
/* Border Reset for headers with horizontal rules */
#template > h2:first-child,
#template > h1:first-child {
border: 0;
margin: 12px 0 0;
padding: 10px 0 0;
}
/* Lists, Blockquotes & Such */
#template ul,
#template ol {
margin: 0;
padding: 20px 0 0;
list-style-position: inside;
}
/* Nested Lists */
#template ul li ul,
#template ol li ol,
#template ul li ol,
#template ol li ul,
#template ul ul,
#template ol ol {
padding: 0 0 0 14px;
}
#template dl {
margin: 0;
padding: 20px 0 0;
}
#template dl dt {
font-size: 14px;
font-weight: bold;
line-height: normal;
margin: 0;
padding: 20px 0 0;
}
#template dl dt:first-child {
padding: 0;
}
#template dl dd {
font-size: 13px;
margin: 0;
padding: 3px 0 0;
}
/* Tables */
#template table {
border-collapse: collapse;
margin: 20px 0 0;
padding: 0;
}
#template table * tr {
border-top: 1px solid #ccc;
background-color: #fff;
margin: 0;
padding: 0;
}
#template table * tr:nth-child(2n) {
background-color: #f8f8f8;
}
#template table * tr th,
#template table * tr td {
border: 1px solid #ccc;
text-align: left;
margin: 0;
padding: 6px 13px;
}
/* Images & Stuff */
#template img {
max-width: 100%;
}
/* Gollum Image Tags */
/* Framed */
#template span.frame {
display: block;
overflow: hidden;
}
#template span.frame > span {
border: 1px solid #ddd;
display: block;
float: left;
overflow: hidden;
margin: 13px 0 0;
padding: 7px;
width: auto;
}
#template span.frame span img {
display: block;
float: left;
}
#template span.frame span span {
clear: both;
color: #333;
display: block;
padding: 5px 0 0;
}
#template span.align-center {
display: block;
overflow: hidden;
clear: both;
}
#template span.align-center > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: center;
}
#template span.align-center span img {
margin: 0 auto;
text-align: center;
}
#template span.align-right {
display: block;
overflow: hidden;
clear: both;
}
#template span.align-right > span {
display: block;
overflow: hidden;
margin: 13px 0 0;
text-align: right;
}
#template span.align-right span img {
margin: 0;
text-align: right;
}
#template span.float-left {
display: block;
margin-right: 13px;
overflow: hidden;
float: left;
}
#template span.float-left span {
margin: 13px 0 0;
}
#template span.float-right {
display: block;
margin-left: 13px;
overflow: hidden;
float: right;
}
#template span.float-right > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: right;
}
/* Code */
#template code, #template tt {
background-color: #f8f8f8;
border: 1px solid #dedede;
font-size: 13px;
padding: 1px 5px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
#template .highlight pre, #template pre {
background-color: #f8f8f8;
border: 1px solid #ccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
#template pre code, #template pre tt {
background-color: transparent;
border: none;
}
#template .highlight { background: #ffffff; }
#template .highlight .c { color: #999988; font-style: italic }
#template .highlight .err { color: #a61717; background-color: #e3d2d2 }
#template .highlight .k { font-weight: bold }
#template .highlight .o { font-weight: bold }
#template .highlight .cm { color: #999988; font-style: italic }
#template .highlight .cp { color: #999999; font-weight: bold }
#template .highlight .c1 { color: #999988; font-style: italic }
#template .highlight .cs { color: #999999; font-weight: bold; font-style: italic }
#template .highlight .gd { color: #000000; background-color: #ffdddd }
#template .highlight .gd .x { color: #000000; background-color: #ffaaaa }
#template .highlight .ge { font-style: italic }
#template .highlight .gr { color: #aa0000 }
#template .highlight .gh { color: #999999 }
#template .highlight .gi { color: #000000; background-color: #ddffdd }
#template .highlight .gi .x { color: #000000; background-color: #aaffaa }
#template .highlight .gc { color: #999; background-color: #EAF2F5 }
#template .highlight .go { color: #888888 }
#template .highlight .gp { color: #555555 }
#template .highlight .gs { font-weight: bold }
#template .highlight .gu { color: #aaaaaa }
#template .highlight .gt { color: #aa0000 }
File diff suppressed because one or more lines are too long
@@ -1,18 +0,0 @@
/*
* ../SourceForge/trunk/mathjax/config/MMLorHTML.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['(function(c){var i="1.0";var g=','MathJax.Hub','.Insert({prefer:{MSIE:"MML",Firefox:"MML",Opera:"HTML",other:"HTML"}},(',1,'.config.MMLorHTML||{}));var e={Firefox:3,Opera:9.52,MSIE:6,Chrome:0.3,Safari:2,Konqueror:4};var h=(c','.Browser','.version==="0.0"||','c.Browser.versionAtLeast','(e[c',5,']||0));var b;try{new ActiveXObject("MathPlayer.Factory.1");b=true}catch(d){b=false}var f=(c',5,'.isFirefox&&',7,'("1.5"))||(c',5,'.isMSIE&&b)||(c',5,'.isOpera&&',7,'("9.52"));var a=(g.prefer&&typeof(g.prefer)==="object"?g.prefer[',1,5,']||g.prefer.other||"HTML":g.prefer);if(h||f){if(f&&(a==="MML"||!h)){','c.config.jax.unshift("output/','NativeMML")}else{',24,'HTML-CSS")}}else{c.PreProcess','.disabled=true;','c.prepareScripts',28,'MathJax.Message.Set("Your browser does not support MathJax",null,4000);c.Startup.signal.Post("MathJax not supported")}})(',1,');MathJax.Ajax.loadComplete("[MathJax]/config/MMLorHTML.js");']
]);
@@ -1,590 +0,0 @@
/*************************************************************
*
* MathJax/config/MathJax.js
*
* This configuration file is loaded when there is no explicit
* configuration script in the <script> tag that loads MathJax.js
*
* Use it to customize the MathJax settings. See comments below.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-10 Design Science, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Config({
//
// A comma-separated list of configuration files to load
// when MathJax starts up. E.g., to define local macros, etc.
// The default directory is the MathJax/config directory.
//
// Example: config: ["local/local.js"],
// Example: config: ["local/local.js","MMLtoHTML.js"],
//
config: [],
//
// A comma-separated list of CSS stylesheet files to be loaded
// when MathJax starts up. The default directory is the
// MathJax/config directory.
//
// Example: styleSheets: ["MathJax.css"],
//
styleSheets: [],
//
// Styles to be defined dynamically at startup time.
//
// Example:
// styles: {
// ".MathJax .merror": {
// color: "blue",
// "background-color": "green"
// }
// },
//
styles: {},
//
// A comma-separated list of input and output jax to initialize at startup.
// Their main code is loaded only when they are actually used, so it is not
// inefficient to include jax that may not actually be used on the page. These
// are found in the MathJax/jax directory.
//
jax: ["input/TeX","output/HTML-CSS"],
//
// A comma-separated list of extensions to load at startup. The default
// directory is MathJax/extensions.
//
// Example: extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
//
extensions: ["tex2jax.js"],
//
// Patterns to remove from before and after math script tags. If you are not
// using one of the preprocessors (e.g., tex2jax), you need to insert something
// extra into your HTML file in order to avoid a bug in Internet Explorer. IE
// removes spaces from the DOM that it thinks are redundent, and since a SCRIPT
// tag usually doesn't add content to the page, if there is a space before and after
// a MathJax SCRIPT tag, IE will remove the first space. When MathJax inserts
// the typeset mathematics, this means there will be no space before it and the
// preceeding text. In order to avoid this, you should include some "guard characters"
// before or after the math SCRIPT tag; define the patterns you want to use below.
// Note that these are used as regular expressions, so you will need to quote
// special characters. Furthermore, since they are javascript strings, you must
// quote javascript special characters as well. So to obtain a backslash, you must
// use \\ (doubled for javascript). For example, "\\[" is the pattern \[ in the
// regular expression. That means that if you want an actual backslash in your
// guard characters, you need to use "\\\\" in order to get \\ in the regular
// expression, and \ in the actual text. If both preJax and postJax are defined,
// both must be present in order to be removed.
//
// See also the preRemoveClass comments below.
//
// Example:
// preJax: "\\\\\\\\", // makes a double backslash the preJax text
// or
// preJax: "\\[\\[", // jax scripts must be enclosed in double brackets
// postJax: "\\]\\]",
//
preJax: null,
postJax: null,
//
// The CSS class for a math preview to be removed preceeding a MathJax
// SCRIPT tag. If the tag just before the MathJax SCRIPT tag is of this
// class, its contents are removed when MathJax processes the SCRIPT
// tag. This allows you to include a math preview in a form that will
// be displayed prior to MathJax performing its typesetting. It also
// avoids the Internet Explorer space-removal bug, and can be used in
// place of preJax and postJax if that is more convenient.
//
// For example
//
// <span class="MathJax_Preview">[math]</span><script type="math/tex">...</script>
//
// would display "[math]" in place of the math until MathJax is able to typeset it.
//
preRemoveClass: "MathJax_Preview",
//
// This value controls whether the "Processing Math: nn%" message are displayed
// in the lower left-hand corner. Set to "false" to prevent those messages (though
// file loading and other messages will still be shown).
//
showProcessingMessages: true,
//
// This value controls the verbosity of the messages in the lower left-hand corner.
// Set it to "none" to eliminate all messages, or set it to "simple" to show
// "Loading..." and "Processing..." rather than showing the full file name and the
// percentage of the mathematics processed.
//
messageStyle: "normal",
//
// These two parameters control the alignment and shifting of displayed equations.
// The first can be "left", "center", or "right", and determines the alignment of
// displayed equations. When the alignment is not "center", the second determines
// an indentation from the left or right side for the displayed equations.
//
displayAlign: "center",
displayIndent: "0em",
//
// Normally MathJax will perform its starup commands (loading of
// configuration, styles, jax, and so on) as soon as it can. If you
// expect to be doing additional configuration on the page, however, you
// may want to have it wait until the page's onload hander is called. If so,
// set this to "onload".
//
delayStartupUntil: "none",
//
// Normally MathJax will typeset the mathematics on the page as soon as
// the page is loaded. If you want to delay that process, in which case
// you will need to call MathJax.Hub.Typeset() yourself by hand, set
// this value to true.
//
skipStartupTypeset: false,
//============================================================================
//
// These parameters control the tex2jax preprocessor (when you have included
// "tex2jax.js" in the extensions list above).
//
tex2jax: {
//
// The Id of the element to be processed (defaults to full document)
//
element: null,
//
// The delimiters that surround in-line math expressions. The first in each
// pair is the initial delimiter and the second is the terminal delimiter.
// Comment out any that you don't want, but be sure there is no extra
// comma at the end of the last item in the list -- some browsers won't
// be able to handle that.
//
inlineMath: [
// ['$','$'], // uncomment this for standard TeX math delimiters
['\\(','\\)']
],
//
// The delimiters that surround displayed math expressions. The first in each
// pair is the initial delimiter and the second is the terminal delimiter.
// Comment out any that you don't want, but be sure there is no extra
// comma at the end of the last item in the list -- some browsers won't
// be able to handle that.
//
displayMath: [
['$$','$$'],
['\\[','\\]']
],
//
// This array lists the names of the tags whose contents should not be
// processed by tex2jax (other than to look for ignore/process classes
// as listed below). You can add to (or remove from) this list to prevent
// MathJax from processing mathematics in specific contexts.
//
skipTags: ["script","noscript","style","textarea","pre","code"],
//
// This is the class name used to mark elements whose contents should
// not be processed by tex2jax (other than to look for the
// processClass pattern below). Note that this is a regular
// expression, and so you need to be sure to quote any regexp special
// characters. The pattern is automatically preceeded by '(^| )(' and
// followed by ')( |$)', so your pattern will have to match full words
// in the class name. Assigning an element this class name will
// prevent `tex2jax` from processing its contents.
//
ignoreClass: "tex2jax_ignore",
//
// This is the class name used to mark elements whose contents SHOULD
// be processed by tex2jax. This is used to turn on processing within
// tags that have been marked as ignored or skipped above. Note that
// this is a regular expression, and so you need to be sure to quote
// any regexp special characters. The pattern is automatically
// preceeded by '(^| )(' and followed by ')( |$)', so your pattern
// will have to match full words in the class name. Use this to
// restart processing within an element that has been marked as
// ignored above.
//
processClass: "tex2jax_process",
//
// Set to "true" to allow \$ to produce a dollar without starting in-line
// math mode. If you uncomment the ['$','$'] line above, you should change
// this to true so that you can insert plain dollar signs into your documents
//
processEscapes: false,
//
// Controls whether tex2jax processes LaTeX environments outside of math
// mode. Set to "false" to prevent processing of environments except within
// math mode.
//
processEnvironments: true,
//
// Controls whether tex2jax inserts MathJax_Preview spans to make a
// preview available, and what preview to use, when it locates in-line
// and display mathetics on the page. The default is "TeX", which
// means use the TeX code as the preview (until it is processed by
// MathJax). Set to "none" to prevent the previews from being
// inserted (the math will simply disappear until it is typeset). Set
// to an array containing the description of an HTML snippet in order
// to use the same preview for all equations on the page (e.g., you
// could have it say "[math]" or load an image).
//
// E.g., preview: ["[math]"],
// or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
//
preview: "TeX"
},
//============================================================================
//
// These parameters control the mml2jax preprocessor (when you have included
// "mml2jax.js" in the extensions list above).
//
mml2jax: {
//
// The Id of the element to be processed (defaults to full document)
//
element: null,
//
// Controls whether mml2jax inserts MathJax_Preview spans to make a
// preview available, and what preview to use, whrn it locates
// mathematics on the page. The default is "alttext", which means use
// the <math> tag's alttext attribute as the preview (until it is
// processed by MathJax), if the tag has one. Set to "none" to
// prevent the previews from being inserted (the math will simply
// disappear until it is typeset). Set to an array containing the
// description of an HTML snippet in order to use the same preview for
// all equations on the page (e.g., you could have it say "[math]" or
// load an image).
//
// E.g., preview: ["[math]"],
// or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
//
preview: "alttext"
},
//============================================================================
//
// These parameters control the jsMath2jax preprocessor (when you have included
// "jsMath2jax.js" in the extensions list above).
//
jsMath2jax: {
//
// The Id of the element to be processed (defaults to full document)
//
element: null,
//
// Controls whether jsMath2jax inserts MathJax_Preview spans to make a
// preview available, and what preview to use, when it locates
// mathematics on the page. The default is "TeX", which means use the
// TeX code as the preview (until it is processed by MathJax). Set to
// "none" to prevent the previews from being inserted (the math will
// simply disappear until it is typeset). Set to an array containing
// the description of an HTML snippet in order to use the same preview
// for all equations on the page (e.g., you could have it say "[math]"
// or load an image).
//
// E.g., preview: ["[math]"],
// or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
//
preview: "TeX"
},
//============================================================================
//
// These parameters control the TeX input jax.
//
TeX: {
//
// This specifies the side on which \tag{} macros will place the tags.
// Set to "left" to place on the left-hand side.
//
TagSide: "right",
//
// This is the amound of indentation (from right or left) for the tags.
//
TagIndent: ".8em",
//
// This is the width to use for the multline environment
//
MultLineWidth: "85%",
//
// List of macros to define. These are of the form
// name: value
// where 'value' is the replacement text for the macro \name.
// The 'value' can also be [value,n] where 'value' is the replacement
// text and 'n' is the number of parameters for the macro.
// Note that backslashes must be doubled in the replacement string.
//
// E.g.,
//
// Macros: {
// RR: '{\\bf R}',
// bold: ['{\\bf #1}', 1]
// }
//
Macros: {}
},
//============================================================================
//
// These parameters control the MathML inupt jax.
//
MathML: {
//
// This specifies whether to use TeX spacing or MathML spacing when the
// HTML-CSS output jax is used.
//
useMathMLspacing: false
},
//============================================================================
//
// These parameters control the HTML-CSS output jax.
//
"HTML-CSS": {
//
// This controls the global scaling of mathematics as compared to the
// surrounding text. Values between 100 and 133 are usually good choices.
//
scale: 100,
//
// This is a list of the fonts to look for on a user's computer in
// preference to using MathJax's web-based fonts. These must
// correspond to directories available in the jax/output/HTML-CSS/fonts
// directory, where MathJax stores data about the characters available
// in the fonts. Set this to ["TeX"], for example, to prevent the
// use of the STIX fonts, or set it to an empty list, [], if
// you want to force MathJax to use web-based or image fonts.
//
availableFonts: ["STIX","TeX"],
//
// This is the preferred font to use when more than one of those
// listed above is available.
//
preferredFont: "TeX",
//
// This is the web-based font to use when none of the fonts listed
// above are available on the user's computer. Note that currently
// only the TeX font is available in a web-based form. Set this to
//
// webFont: null,
//
// if you want to prevent the use of web-based fonts.
//
webFont: "TeX",
//
// This is the font to use for image fallback mode (when none of the
// fonts listed above are available and the browser doesn't support
// web-fonts via the @font-face CSS directive). Note that currently
// only the TeX font is available as an image font. Set this to
//
// imageFont: null,
//
// if you want to prevent the use of image fonts (e.g., you have not
// installed the image fonts on your server). In this case, only
// browsers that support web-based fonts will be able to view your pages
// without having the fonts installed on the client computer. The browsers
// that support web-based fonts include: IE6 and later, Chrome, Safari3.1
// and above, Firefox3.5 and later, and Opera10 and later. Note that
// Firefox3.0 is NOT on this list, so without image fonts, FF3.0 users
// will be required to to download and install either the STIX fonts or the
// MathJax TeX fonts.
//
imageFont: "TeX",
//
// This controls whether the MathJax contextual menu will be available
// on the mathematics in the page. If true, then right-clicking (on
// the PC) or control-clicking (on the Mac) will produce a MathJax
// menu that allows you to get the source of the mathematics in
// various formats, change the size of the mathematics relative to the
// surrounding text, and get information about MathJax.
//
// Set this to false to disable the menu. When true, the MathMenu
// items below configure the actions of the menu.
//
showMathMenu: true,
//
// This allows you to define or modify the styles used to display
// various math elements created by MathJax.
//
// Example:
// styles: {
// ".MathJax_Preview": {
// "font-size": "80%", // preview uses a smaller font
// color: "red" // and is in red
// }
// }
//
styles: {},
//
// Configuration for <maction> tooltips
// (see also the #MathJax_Tooltip CSS in MathJax/jax/output/HTML-CSS/config.js,
// which can be overriden using the styles values above).
//
tooltip: {
delayPost: 600, // milliseconds delay before tooltip is posted after mouseover
delayClear: 600, // milliseconds delay before tooltip is cleared after mouseout
offsetX: 10, offsetY: 5 // pixels to offset tooltip from mouse position
}
},
//============================================================================
//
// These parameters control the NativeMML output jax.
//
NativeMML: {
//
// This controls the global scaling of mathematics as compared to the
// surrounding text. Values between 100 and 133 are usually good choices.
//
scale: 100,
//
// This controls whether the MathJax contextual menu will be available
// on the mathematics in the page. If true, then right-clicking (on
// the PC) or control-clicking (on the Mac) will produce a MathJax
// menu that allows you to get the source of the mathematics in
// various formats, change the size of the mathematics relative to the
// surrounding text, and get information about MathJax.
//
// Set this to false to disable the menu. When true, the MathMenu
// items below configure the actions of the menu.
//
// There is a separate setting for MSIE, since the code to handle that
// is a bit delicate; if it turns out to have unexpected consequences,
// you can turn it off without turing off other browser support.
//
showMathMenu: true,
showMathMenuMSIE: true,
//
// This allows you to define or modify the styles used to display
// various math elements created by MathJax.
//
// Example:
// styles: {
// ".MathJax_MathML": {
// color: "red" // MathML is in red
// }
// }
//
styles: {}
},
//============================================================================
//
// These parameters control the contextual menus that are available on the
// mathematics within the page (provided the showMathMenu value is true above).
//
MathMenu: {
//
// This is the hover delay for the display of submenus in the
// contextual menu. When the mouse is still over a submenu label for
// this long, the menu will appear. (The menu also will appear if you
// click on the label.) It is in milliseconds.
//
delay: 400,
//
// This is the URL for the MathJax Help menu item.
//
helpURL: "http://www.mathjax.org/help/user/",
//
// These control whether the "Math Renderer", "Font Preferences",
// and "Contextual Menu" submenus will be displayed or not.
//
showRenderer: true,
showFontMenu: false,
showContext: false,
//
// These are the settings for the Show Source window. The initial
// width and height will be reset after the source is shown in an
// attempt to make the window fit the output better.
//
windowSettings: {
status: "no", toolbar: "no", locationbar: "no", menubar: "no",
directories: "no", personalbar: "no", resizable: "yes", scrollbars: "yes",
width: 100, height: 50
},
//
// This allows you to change the CSS that controls the menu
// appearance. See the extensions/MathMenu.js file for details
// of the default settings.
//
styles: {}
},
//============================================================================
//
// These parameters control the MMLorHTML configuration file.
// NOTE: if you add MMLorHTML.js to the config array above,
// you must REMOVE the output jax from the jax array.
//
MMLorHTML: {
//
// The output jax that is to be preferred when both are possible
// (set to "MML" for native MathML, "HTML" for MathJax's HTML-CSS output jax).
//
prefer: {
MSIE: "MML",
Firefox: "MML",
Opera: "HTML",
other: "HTML"
}
}
});
MathJax.Ajax.loadComplete("[MathJax]/config/MathJax.js");
@@ -1,37 +0,0 @@
/*************************************************************
*
* MathJax/config/local/local.js
*
* Include changes and configuration local to your installation
* in this file. For example, common macros can be defined here
* (see below). To use this file, add "local/local.js" to the
* config array in MathJax.js or your MathJax.Hub.Config() call.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009 Design Science, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var TEX = MathJax.InputJax.TeX;
// place macros here. E.g.:
// TEX.Macro("R","{\\bf R}");
// TEX.Macro("op","\\mathop{\\rm #1}",1); // a macro with 1 parameter
});
MathJax.Ajax.loadComplete("[MathJax]/config/local/local.js");
@@ -1,4 +0,0 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: fedf9ba9a5b2ef65b82b1fa1eea24e52
tags: fbb0d17656682115ca4d033fb2f83ba1
@@ -1,173 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS Style Objects &mdash; MathJax v1.0 documentation</title>
<link rel="stylesheet" href="_static/mj.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="MathJax v1.0 documentation" href="index.html" />
<link rel="next" title="Glossary" href="glossary.html" />
<link rel="prev" title="Describing HTML snippets" href="HTML-snippets.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="glossary.html" title="Glossary"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="HTML-snippets.html" title="Describing HTML snippets"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="css-style-objects">
<span id="id1"></span><h1>CSS Style Objects<a class="headerlink" href="#css-style-objects" title="Permalink to this headline"></a></h1>
<p>Many MathJax components allow you to specify CSS styles that control
the look of the elements they create. These are described using CSS
style objects, which are JavaScript objects that represent standard
CSS declarations. The main CSS style object is a collection of
<cite>name:value</cite> pairs where the <cite>name</cite> is the CSS selector that is being
defined, and the <cite>value</cite> is an object that gives the style for that
selector. Most often, the selector will need to be enclosed in
quotation marks, as it will contain special characters, so you would
need to use <tt class="docutils literal"><span class="pre">&quot;#myID&quot;</span></tt> rather than just <tt class="docutils literal"><span class="pre">#myID</span></tt> and <tt class="docutils literal"><span class="pre">&quot;ul</span> <span class="pre">li&quot;</span></tt>
rather than just <tt class="docutils literal"><span class="pre">ul</span> <span class="pre">li</span></tt>.</p>
<p>The value used to define the CSS style can either be a string
containing the CSS definition, or a javascript object that is itself a
collection of <cite>name:value</cite> pairs, where the <cite>name</cite> is the attribute
being defined and <cite>value</cite> is the value that attibute should be given.
Note that, since this is a JavaScript object, the pairs are separated
by commas (not semi-colons) and the values are enclosed in quotation
marks. If the name contains dashes, it should be enclosed in
quotation marks as well.</p>
<p>For example, <tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/config.js</span></tt> includes the following
declaration:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">styles</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;.MathJax .merror&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;background-color&quot;</span><span class="o">:</span> <span class="s2">&quot;#FFFF88&quot;</span><span class="p">,</span>
<span class="nx">color</span><span class="o">:</span> <span class="s2">&quot;#CC0000&quot;</span><span class="p">,</span>
<span class="nx">border</span><span class="o">:</span> <span class="s2">&quot;1px solid #CC0000&quot;</span><span class="p">,</span>
<span class="nx">padding</span><span class="o">:</span> <span class="s2">&quot;1px 3px&quot;</span><span class="p">,</span>
<span class="s2">&quot;font-family&quot;</span><span class="o">:</span> <span class="s2">&quot;serif&quot;</span><span class="p">,</span>
<span class="s2">&quot;font-style&quot;</span><span class="o">:</span> <span class="s2">&quot;normal&quot;</span><span class="p">,</span>
<span class="s2">&quot;font-size&quot;</span><span class="o">:</span> <span class="s2">&quot;90%&quot;</span>
<span class="p">},</span>
<span class="s2">&quot;.MathJax_Preview&quot;</span><span class="o">:</span> <span class="p">{</span><span class="nx">color</span><span class="o">:</span> <span class="s2">&quot;#888888&quot;</span><span class="p">},</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This defines two CSS styles, one for the selector <tt class="docutils literal"><span class="pre">.MathJax</span>
<span class="pre">.merror</span></tt>, which specifies a background color, foreground color,
border, and so on, and a second for <tt class="docutils literal"><span class="pre">.MathJax_Preview</span></tt> that sets its
color.</p>
<p>You can add as many such definitions to a <tt class="docutils literal"><span class="pre">styles</span></tt> object as you
wish. Note, however, that since this is a JavaScript object, the
selectors must be unique (e.g., you can&#8217;t use two definitions for
<tt class="docutils literal"><span class="pre">&quot;img&quot;</span></tt>, for example, as only the last one would be saved). If you
need to use more than one entry for a single selector, you can add
comments like <tt class="docutils literal"><span class="pre">/*</span> <span class="pre">1</span> <span class="pre">*/</span></tt> and <tt class="docutils literal"><span class="pre">/*</span> <span class="pre">2</span> <span class="pre">*/</span></tt> to the selector to make them
unique.</p>
<p>It is possible to include selectors like <tt class="docutils literal"><span class="pre">&quot;&#64;media</span> <span class="pre">print&quot;</span></tt>, in which
case the value is a CSS style object. For example:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">styles</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;@media print&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;.MathJax .merror&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;background-color&quot;</span><span class="o">:</span> <span class="s2">&quot;white&quot;</span><span class="p">,</span>
<span class="nx">border</span><span class="o">:</span> <span class="mi">0</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>The various extensions and output processors include more examples of
CSS style objects, so see the code for those files for additional
samples. In particular, the <tt class="docutils literal"><span class="pre">extensions/MathMenu.js</span></tt>,
<tt class="docutils literal"><span class="pre">extensions/MathZoom.js</span></tt>, <tt class="docutils literal"><span class="pre">extensions/FontWarnsing.js</span></tt>, and
<tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/jax.js</span></tt> files include such definitions.</p>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="HTML-snippets.html"
title="previous chapter">Describing HTML snippets</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="glossary.html"
title="next chapter">Glossary</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/CSS-styles.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="glossary.html" title="Glossary"
>next</a> |</li>
<li class="right" >
<a href="HTML-snippets.html" title="Describing HTML snippets"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2010 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0b2.
</div>
</body>
</html>
@@ -1,170 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Describing HTML snippets &mdash; MathJax v1.0 documentation</title>
<link rel="stylesheet" href="_static/mj.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="MathJax v1.0 documentation" href="index.html" />
<link rel="next" title="CSS Style Objects" href="CSS-styles.html" />
<link rel="prev" title="Converting to MathJax from jsMath" href="jsMath.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="CSS-styles.html" title="CSS Style Objects"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="jsMath.html" title="Converting to MathJax from jsMath"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="describing-html-snippets">
<span id="html-snippets"></span><h1>Describing HTML snippets<a class="headerlink" href="#describing-html-snippets" title="Permalink to this headline"></a></h1>
<p>A number of MathJax configuration options allow you to specify an HTML
snippet using a JavaScript object. This lets you include HTML in your
configutation files even though they are not HTML files themselves.
The format is fairly simple, but flexible enough to let you represent
complicated HTML trees.</p>
<p>An HTML snippet is an array consisting of a series elements that formt
he HTML tree. Those elements are one of two things: either a string,
which represents text to be included in the snippet, or an array,
which represents an HTML tag to be included. In the latter case, the
array consists of three items: a string that is the tag name (e.g.,
&#8220;img&#8221;), an optional object that gives attributes for the tag (as
described below), and an optional HTML snippet array that gives the
contents of the tag.</p>
<p>When attributes are provided, they are given as <cite>name:value</cite> pairs,
with the <cite>name</cite> giving the attribute name, and <cite>value</cite> giving its
value. For example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[[</span><span class="s2">&quot;img&quot;</span><span class="p">,{</span><span class="nx">src</span><span class="o">:</span><span class="s2">&quot;/images/mypic.jpg&quot;</span><span class="p">}]]</span>
</pre></div>
</div>
<p>represents an HTML snippet that includes one element: an <tt class="docutils literal"><span class="pre">&lt;img&gt;</span></tt> tag
with <tt class="docutils literal"><span class="pre">src</span></tt> set to <tt class="docutils literal"><span class="pre">/images/mypic.jpg</span></tt>. That is, this is
equivalent to</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;img</span> <span class="na">src=</span><span class="s">&quot;/images/mypic.jpg&quot;</span><span class="nt">&gt;</span>
</pre></div>
</div>
<p>Note that the snippet has two sets of square brackets. The outermost
one is for the array that holds the snippet, and the innermost set is
because the first (and only) element in the snippet is a tag, not
text. Note that the code <tt class="docutils literal"><span class="pre">[&quot;img&quot;,{src:&quot;/images/mypic.jpg&quot;}]</span></tt>
is invalid as an HTML snippet. It would represent a snippet that
starts with &#8220;img&#8221; as text in the snippet (not a tag), but the second
item is neither a string nor an array, and so is illegal. This is a
common mistake that should be avoided.</p>
<p>A more complex example is the following:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[</span>
<span class="s2">&quot;Please read the &quot;</span><span class="p">,</span>
<span class="p">[</span><span class="s2">&quot;a&quot;</span><span class="p">,{</span><span class="nx">href</span><span class="o">:</span><span class="s2">&quot;instructions.html&quot;</span><span class="p">},[</span><span class="s2">&quot;instructions&quot;</span><span class="p">]],</span>
<span class="s2">&quot; carefully before proceeding&quot;</span>
<span class="p">]</span>
</pre></div>
</div>
<p>which is equivalent to</p>
<div class="highlight-html"><div class="highlight"><pre>please read the <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">&quot;instructions.html&quot;</span><span class="nt">&gt;</span>instructions<span class="nt">&lt;/a&gt;</span> carefully
before proceeding.
</pre></div>
</div>
<p>A final example shows how to set style attributes on an object:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[[</span><span class="s2">&quot;span&quot;</span><span class="p">,</span>
<span class="p">{</span>
<span class="nx">id</span><span class="o">:</span><span class="s2">&quot;mySpan&quot;</span><span class="p">,</span>
<span class="nx">style</span><span class="o">:</span> <span class="p">{</span><span class="nx">color</span><span class="o">:</span><span class="s2">&quot;red&quot;</span><span class="p">,</span> <span class="s2">&quot;font-weight&quot;</span><span class="o">:</span><span class="s2">&quot;bold&quot;</span><span class="p">}</span>
<span class="p">},</span>
<span class="p">[</span><span class="s2">&quot; This is bold text shown in red &quot;</span><span class="p">]</span>
<span class="p">]]</span>
</pre></div>
</div>
<p>which is equivalent to</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;span</span> <span class="na">id=</span><span class="s">&quot;mySpan&quot;</span> <span class="na">style=</span><span class="s">&quot;color: red; font-weight: bold;&quot;</span><span class="nt">&gt;</span>
This is bold text shown in red
<span class="nt">&lt;/span&gt;</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="jsMath.html"
title="previous chapter">Converting to MathJax from jsMath</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="CSS-styles.html"
title="next chapter">CSS Style Objects</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/HTML-snippets.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="CSS-styles.html" title="CSS Style Objects"
>next</a> |</li>
<li class="right" >
<a href="jsMath.html" title="Converting to MathJax from jsMath"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2010 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0b2.
</div>
</body>
</html>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

@@ -1,79 +0,0 @@
.. _css-style-objects:
*****************
CSS Style Objects
*****************
Many MathJax components allow you to specify CSS styles that control
the look of the elements they create. These are described using CSS
style objects, which are JavaScript objects that represent standard
CSS declarations. The main CSS style object is a collection of
`name:value` pairs where the `name` is the CSS selector that is being
defined, and the `value` is an object that gives the style for that
selector. Most often, the selector will need to be enclosed in
quotation marks, as it will contain special characters, so you would
need to use ``"#myID"`` rather than just ``#myID`` and ``"ul li"``
rather than just ``ul li``.
The value used to define the CSS style can either be a string
containing the CSS definition, or a javascript object that is itself a
collection of `name:value` pairs, where the `name` is the attribute
being defined and `value` is the value that attibute should be given.
Note that, since this is a JavaScript object, the pairs are separated
by commas (not semi-colons) and the values are enclosed in quotation
marks. If the name contains dashes, it should be enclosed in
quotation marks as well.
For example, ``jax/output/HTML-CSS/config.js`` includes the following
declaration:
.. code-block:: javascript
styles: {
".MathJax .merror": {
"background-color": "#FFFF88",
color: "#CC0000",
border: "1px solid #CC0000",
padding: "1px 3px",
"font-family": "serif",
"font-style": "normal",
"font-size": "90%"
},
".MathJax_Preview": {color: "#888888"},
}
This defines two CSS styles, one for the selector ``.MathJax
.merror``, which specifies a background color, foreground color,
border, and so on, and a second for ``.MathJax_Preview`` that sets its
color.
You can add as many such definitions to a ``styles`` object as you
wish. Note, however, that since this is a JavaScript object, the
selectors must be unique (e.g., you can't use two definitions for
``"img"``, for example, as only the last one would be saved). If you
need to use more than one entry for a single selector, you can add
comments like ``/* 1 */`` and ``/* 2 */`` to the selector to make them
unique.
It is possible to include selectors like ``"@media print"``, in which
case the value is a CSS style object. For example:
.. code-block:: javascript
styles: {
"@media print": {
".MathJax .merror": {
"background-color": "white",
border: 0
}
}
}
The various extensions and output processors include more examples of
CSS style objects, so see the code for those files for additional
samples. In particular, the ``extensions/MathMenu.js``,
``extensions/MathZoom.js``, ``extensions/FontWarnsing.js``, and
``jax/output/HTML-CSS/jax.js`` files include such definitions.
@@ -1,83 +0,0 @@
.. _html-snippets:
************************
Describing HTML snippets
************************
A number of MathJax configuration options allow you to specify an HTML
snippet using a JavaScript object. This lets you include HTML in your
configutation files even though they are not HTML files themselves.
The format is fairly simple, but flexible enough to let you represent
complicated HTML trees.
An HTML snippet is an array consisting of a series elements that formt
he HTML tree. Those elements are one of two things: either a string,
which represents text to be included in the snippet, or an array,
which represents an HTML tag to be included. In the latter case, the
array consists of three items: a string that is the tag name (e.g.,
"img"), an optional object that gives attributes for the tag (as
described below), and an optional HTML snippet array that gives the
contents of the tag.
When attributes are provided, they are given as `name:value` pairs,
with the `name` giving the attribute name, and `value` giving its
value. For example
.. code-block:: javascript
[["img",{src:"/images/mypic.jpg"}]]
represents an HTML snippet that includes one element: an ``<img>`` tag
with ``src`` set to ``/images/mypic.jpg``. That is, this is
equivalent to
.. code-block:: html
<img src="/images/mypic.jpg">
Note that the snippet has two sets of square brackets. The outermost
one is for the array that holds the snippet, and the innermost set is
because the first (and only) element in the snippet is a tag, not
text. Note that the code ``["img",{src:"/images/mypic.jpg"}]``
is invalid as an HTML snippet. It would represent a snippet that
starts with "img" as text in the snippet (not a tag), but the second
item is neither a string nor an array, and so is illegal. This is a
common mistake that should be avoided.
A more complex example is the following:
.. code-block:: javascript
[
"Please read the ",
["a",{href:"instructions.html"},["instructions"]],
" carefully before proceeding"
]
which is equivalent to
.. code-block:: html
please read the <a href="instructions.html">instructions</a> carefully
before proceeding.
A final example shows how to set style attributes on an object:
.. code-block:: javascript
[["span",
{
id:"mySpan",
style: {color:"red", "font-weight":"bold"}
},
[" This is bold text shown in red "]
]]
which is equivalent to
.. code-block:: html
<span id="mySpan" style="color: red; font-weight: bold;">
This is bold text shown in red
</span>
@@ -1,196 +0,0 @@
.. _api-ajax:
***********************
The MathJax.Ajax Object
***********************
The `MathJax.Ajax` structure holds the data and functions for handling
loading of external modules. Modules are loaded only once, even if
called for in several places. The loading of files is asynchronous,
and so the code that requests an external module will continue to run
even when that module has not completed loading, so it is important to
be aware of the timing issues this may cause. Similarly, creating or
loading stylesheets is an asynchronous action. In particular, all
actions that rely on the file or stylesheet having been loaded must be
delayed until after the file has been downloaded completely. This is
the reason for the large number of routines that take callback
functions.
Any operation that could cause the loading of a file or stylesheet
must be synchronized with the rest of the code via such callbacks.
Since processing any mathematics might cause files to be loaded (e.g.,
little-used markup might be implemented in an extension that is loaded
only when that markup is used), any code that dynamically typesets
mathematics will need to be structured to use callbacks to guarantee
that the mathematics has been completely processed before the code
tries to use it. See the :ref:`Synchronizing with MathJax <synchronization>`
documentation for details on how to do this properly.
Properties
==========
.. describe:: timeout
Number of milliseconds to wait for a file to load before
it is considered to have failed to load.
*Default:* 20 seconds
.. describe:: STATUS.OK
The value used to indicate that a file load has occurred
successfully.
.. describe:: STATUS.ERROR
The value used to indicate that a file load has caused an error or
a timeout to occur.
.. describe:: loaded
An object containing the names of the files that have been loaded (or
requested) so far. ``MathJax.Ajax.loaded["file"]`` will be
non-``null`` when the file has been loaded, with the value being
the ``MathJax.Ajax.STATUS`` value of the load attempt.
.. describe:: loading
An object containing the files that are currently loading, the
callbacks that are to be run when they load or timeout, and
additional internal data.
Methods
=======
.. method:: Require(file[,callback])
Loads the given file if it hasn't been already. The file must be a
JavaScript file or a CSS stylesheet; i.e., it must end in ``.js``
or ``.css``. Alternatively, it can be an object with a single
`key:value` pair where the `key` is one of ``js`` or ``css`` and
the `value` is the file of that type to be loaded (this makes it
possible to have the file be created by a CGI script, for example,
or to use a ``data::`` URL). The file must be relative to the
MathJax home directory and can not contain ``../`` file path
components.
When the file is completely loaded and run, the `callback`, if
provided, will be executed passing it the status of the file load.
If there was an error while loading the file, or if the file fails
to load within the time limit given by ``MathJax.Ajax.timout``,
the status will be ``MathJax.Ajax.STATUS.ERROR`` otherwise it
will be ``MathJax.Ajax.STATUS.OK``. If the file is already
loaded, the callback will be called immediately and the file will
not be loaded again.
:Parameters:
- **file** --- name of the file to be loaded
- **callback** --- the callback specification
:Returns: the callback object
.. method:: Load(file[,callback])
Used internally to load a given file without checking if it
already has been loaded, or where it is to be found.
:Parameters:
- **file** --- name of the file to be loaded
- **callback** --- the callback specification
:Returns: the callback object
.. method:: loadComplete(file)
Called from within the loaded files to inform MathJax that the
file has been completely loaded and initialized. The `file`
parameter is the name of the file that has been loaded. This
routine will cause any callback functions registered for the file
or included in the :meth:``MathJax.Ajax.Require()`` calls to be
executed, passing them the status or the load
(`MathJax.Ajax.STATUS.OK`` or ``MathJax.Ajax.STATUS.ERROR``) as
their last parameter.
:Parameters:
- **file** --- name of the file that has been loaded
:Returns: ``null``
.. method:: loadTimeout(file)
Called when the timeout period is over and the file hasn't loaded.
This indicates an error condition, and the
:meth:`MathJax.Ajax.loadError()` method will be executed, then the
file's callback will be run with ``MathJax.Ajax.STATUS.ERROR`` as
its parameter.
:Parameters:
- **file** --- name of the file that timed out
:Returns: ``null``
.. method:: loadError(file)
The default error handler called when a file fails to load. It
puts a warning message into the MathJax message box on screen.
:Parameters:
- **file** --- the name of the file that failed to load
:Returns: ``null``
.. method:: loadHook(file,callback)
Registers a callback to be executed when the given file is
loaded. The file load operation need to be started when this
method is called, so it can be used to register a hook for a file
that may be loaded in the future.
:Parameters:
- **file** --- the name of the file to wait for
- **callback** --- the callback specification
:Returns: the callback object
.. method:: Styles(styles[,callback])
Creates a stylesheet from the given style data. `styles` can
either be a string containing a stylesheet definition, or an
object containing a :ref:`CSS Style Object <css-style-objects>`.
For example:
.. code-block:: javascript
MathJax.Ajax.Styles("body {font-family: serif; font-style: italic}");
and
.. code-block:: javascript
MathJax.Ajax.Styles({
body: {
"font-family": "serif",
"font-style": "italic"
}
});
both set the body font family and style.
The callback routine is called when the stylesheet has been
created and is available for use.
:Parameters:
- **styles** --- CSS style object for the styles to set
- **callback** --- the callback specification
:Returns: the callback object
.. note::
Internet Explorer has a limit of 32 dynamically created
stylesheets, so it is best to combine your styles into one
large group rather than making several smaller calls.
.. method:: fileURL(file)
Returns a complete URL to a file (replacing ``[MathJax]`` with the
actual root URL location).
:Parameters:
- **file** --- the file name possibly including ``[MathJax]``
:Returns: the full URL for the file
@@ -1,259 +0,0 @@
.. _api-callback:
**************************
The MathJax.Callback Class
**************************
The ``MathJax.Callback`` object is one of the key mechanisms used by
MathJax to synchronize its actions with those that occur
asynchronously, like loading files and stylesheets. A `Callback`
object is used to tie the execution of a function to the completion of
an asynchronous action. See :ref:`Synchronizing with MathJax
<synchronization>` for more details, and :ref:`Using Callbacks
<using-callbacks>` in particular for examples of how to specify and
use MathJax `Callback` objects.
Specifying a callback
---------------------
When a method includes a callback as one of its arguments, that
callback can be specified in a number of different ways, depending on
the functionality that is required of the callback. The easiest case
is to simply provide a function to be called, but it is also possible
to include data to pass to the function when it is executed, and even
the object that will be used as the javascript `this` object when the
function is called.
Most functions that take callbacks as arguments accept a `callback
specification` rather than an actual callback object, though you can
use the :meth:`MathJax.Callback` function to convert a callback
specification into a Callback object if needed.
A callback specification is any one of the following:
.. describe:: fn
A function that is to be called when the callback is executed.
No additional data is passed to it (other that what it is
called with at the time the callback is executed), and `this`
will be the window object.
.. describe:: [fn]
An array containing a function to be called when the callback
is executed (as above).
.. describe:: [fn, data...]
An array containing a function together with data to be passed
to that function when the callback is executed; `this` is still
the window object. For example,
.. code-block:: javascript
[function (x,y) {return x+y}, 2, 3]
would specify a callback that would pass ``2`` and ``3`` to
the given function, and it would return their sum, ``5``, when
the callback is executed.
.. describe:: [object, fn]
An array containing an object to use as `this` and a function to
call for the callback. For example,
.. code-block:: javascript
[{x:'foo', y:'bar'}, function () {this.x}]
would produce a callback that returns the string ``"foo"``
when it is called.
.. describe:: [object, fn, data...]
Similar to the previous case, but with data that is passed to
the function as well.
..describe:: ["method", object]
Here, `object` is an object that has a method called `method`, and
the callback will execute that method (with the object as
`this`) when it is called. For example,
.. code-block:: javascript
["length",[1,2,3,4]]
would call the `length` method on the array ``[1,2,3,4]`` when
the callback is called, returning ``4``.
.. describe:: ["method", object, data...]
Similar to the previous case, but with data that is passed to
the method. E.g.,
.. code-block:: javascript
["slice",[1,2,3,4],1,3]
would perform the equivalent of ``[1,2,3,4].slice(1,3)``,
which returns the array ``[2,3]`` as a result.
.. describe:: {hook: fn, data: [...], object: this}
Here the data for the callback are given in an associative
array of `key:value` pairs. The value of `hook` is the
function to call, the value of `data` is an array of the
arguments to pass to the function, and the value of `object`
is the object to use as `this` in the function call. The
specification need not include all three `key:value` pairs; any
that are missing get default values (a function that does
nothing, an empty array, and the window object, respectively).
.. describe:: "string"
This specifies a callback where the string is executed via an
``eval()`` statement. The code is run in the global context,
so any variables or functions created by the string become
part of the global namespace. The return value is the value of
the last statement executed in the string.
Executing a Callback Object
===========================
The `Callback` object is itself a function, and calling that function
executes the callback. You can pass the callback additional
parameters, just as you can any function, and these will be added to
the callback function's argument list following any data that was
supplied at the time the callback was created. For example
.. code-block:: javascript
var f = function (x,y) {return x + " and " +y}
var cb = MathJax.Callback([f, "foo"]);
var result = cb("bar"); // sets result to "foo and bar"
Usually, the callback is not executed by the code that creates it (as
it is in the example above), but by some other code that runs at a
later time at the completion of some other activity (say the loading
of a file), or in response to a user action. For example:
.. code-block:: javascript
function f(x) {alert("x contains "+x)};
function DelayedX(time) {
var x = "hi";
setTimeout(MathJax.Callback([f, x], time);
}
The ``DelayedX`` function arranges for the function ``f`` to be called at
a later time, passing it the value of a local variable, ``x``. Normally,
this would require the use of a closure, but that is not needed when a
`MathJax.Callback` object is used.
Callback Object Properties
--------------------------
.. describe:: hook
The function to be called when the callback is executed.
.. describe:: data
An array containing the arguments to pass to the callback
function when it is executed.
.. describe:: object
The object to use as `this` during the call to the callback
function.
.. describe:: called
Set to ``true`` after the callback has been called, and undefined
otherwise. A callback will not be exectued a second time unless
the callback's :meth:`reset()` method is called first, or its
``autoReset`` property is set to ``true``.
.. describe:: autoReset
Set this to ``true`` if you want to be able to call the callback
more than once. (This is the case for signal listeners, for example).
.. describe:: isCallback
Always set to ``true`` (used to detect if an object is a callback
or not).
Callback Object Methods
-----------------------
.. method:: reset()
Clears the callback's `called` property.
MathJax.Callback Methods
------------------------
.. method:: Delay(time[, callback])
Waits for the specified time (given in milliseconds) and then
performs the callback. It returns the Callback object (or a blank
one if none was supplied). The returned callback structure has a
`timeout` property set to the result of the ``setTimeout()`` call
that was used to perform the wait so that you can cancel the wait,
if needed. Thus :meth:`MathJax.Callback.Delay()` can be used to
start a timeout delay that executes the callback if an action
doesn't occur within the given time (and if the action does occur,
the timeout can be canceled). Since
:meth:`MathJax.Callback.Delay()` returns a callback structure, it
can be used in a callback queue to insert a delay between queued
commands.
:Parameters:
- **time** --- the amount of time to wait
- **callback** --- the callback specification
:Returns: the callback object
.. method:: executeHooks(hooks[, data[,reset]])
Calls each callback in the `hooks` array (or the single hook if it
is not an array), passing it the arguments stored in the data
array. It `reset` is ``true``, then the callback's
:meth:`reset()` method will be called before each hook is
executed. If any of the hooks returns a `Callback` object, then
it collects those callbacks and returns a new callback that will
execute when all the ones returned by the hooks have been
completed. Otherwise, :meth:`MathJax.Callback.executeHooks()`
returns ``null``.
:Parameters:
- **hooks** --- array of hooks to be called, or a hook
- **data** --- array of arguments to pass to each hook in turn
- **reset** --- ``true`` if the :meth:`reset()` method should be called
:Returns: callback that waits for all the hooks to complete, or ``null``
.. method:: Queue([callback,...])
Creates a `MathJax.CallBack.Queue` object and pushes the given
callbacks into the queue. See :ref:`Using Queues <using-queues>`
for more details about MathJax queues.
:Parameters:
- **callback** --- one or more callback specifications
:Returns: the `Queue` object
.. method:: Signal(name)
Looks for a named signal, creates it if it doesn't already exist,
and returns the signal object. See
:ref:`Using Signals <using-signals>` for more details.
:Parameters:
- **name** --- name of the signal to get or create
:Returns: the `Signal` object
@@ -1,122 +0,0 @@
.. _api-element-jax:
****************************
The MathJax.ElementJax Class
****************************
The element jax is the bridge between the input and output jax, and
contains the data produced by the input jax needed by the output jax
to display the results. It is tied to the individual ``<script>`` tag
that produced it, and is the object used by JavaScript programs to
interact with the mathematics on the page.
An element jax is stored in the ``jax.js`` file in a subdirectory of
the ``jax/element`` directory, with the subdirectory name being the
name of the element jax. Currently, there is only one element jax
class, the `mml` element jax, and it is stored in ``jax/element/mml``.
The `MathJax.ElementJax` class is a subclass of the :ref:`MathJax Jax
<api-jax>` class, and inherits the properties and methods of that
class. Those listed below are the additional or overridden ones from
that class.
Class Properties
================
.. describe:: name
The name of the jax.
.. describe:: version
The version number of the jax.
.. describe:: directory
The directory where the jax files are stored (e.g., ``"[MathJax]/jax/element/mml"``);
Instance Properties
===================
.. describe:: inputJax
A reference to the input jax that created the element.
.. describe:: outputJax
A reference to the output jax that has processed this element.
.. describe:: inputID
The DOM `id` of the ``<script>`` tag that generated this element
(if it doesn't have one initially, the MathJax hub will supply
one). Note that this is not a reference to the element itself;
that element will have a reference to this element jax, and if
`inputID` were a reference back, that would cause a reference
loop, which some browsers would not free properly during trash
collection, thus causing a memory leak.
.. describe:: originalText
A string indicating the original input text that was processed for
this element.
.. describe:: mimeType
The MIME-type of the element jax (`jax/mml` in the case of an
`mml` element jax).
Other data specific to the element jax subclass may also appear here.
Methods
=======
.. Method:: Text(text[,callback])
Sets the input text for this element to the given text and
reprocesses the mathematics. (I.e., update the equation to the
new one given by `text`). When the processing is complete, the
`callback`, if any, is called.
:Parameters:
- **text** --- the new mathematic source string for the element
- **callback** --- the callback specification
:Returns: the callback object
.. Method:: Reprocess([callback])
:noindex:
Remove the output and produce it again. This may be necessary if
there are changes to the CSS styles that would affect the layout
of the mathematics, for example. The `callback`, if any, is
called when the process completes.
:Parameters:
- **callback** --- the callback specification
:Returns: the callback object
.. Method:: Remove()
:noindex:
Removes the output for this element from the web page (but does
not remove the original ``<script>``). The ``<script>`` will be
considered unprocessed, and the next call to
:meth:`MathJax.hub.Typeset()` will re-display it.
:Returns: ``null``
.. Method:: SourceElement()
Returns a reference to the original ``<script>`` DOM element
associated to this element jax.
:Returns: the ``<script>`` element
Output jax may add new methods to the base element jax class to
perform exporting to other formats. For example, a MathML output jax
could add ``toMathML()``, or an accessibility output jax could add
``toAudible()``. These could be made available via the MathJax
contextual menu.
@@ -1,122 +0,0 @@
.. _api-html:
***********************
The MathJax.HTML Object
***********************
The ``MathJax.HTML`` object provides routines for creating HTML
elements and adding them to the page, and int particular, it contains
the code that processes MathJax's :ref:`HTML snippets <html-snippets>`
and turns them into actual DOM objects. It also implements the
methods used to manage the cookies used by MathJax.
Properties
==========
.. describe:: Cookie.prefix: "mjx"
The prefix used for names of cookies stored by MathJax.
.. describe:: Cookie.expires: 365
The expiration time (in days) for cookies created by MathJax.
Methods
=======
.. method:: Element(type[,attributes[,contents]])
Creates a DOM element of the given type. If `attributes` is
non-``null``, it is an object that contains `key:value` pairs of
attributes to set for the newly created element. If `contents` is
non-``null``, it is an :ref:`HTML snippet <html-snippets>` that
describes the contents to create for the element. For example
.. code-block:: javascript
var div = MathJax.HTML.Element(
"div",
{id: "MathDiv", style:{border:"1px solid", padding:"5px"}},
["Here is math: $x+1$",["br"],"and a display $$x+1\\over x-1$$"]
);
:Parameters:
- **type** --- node type to be created
- **attributes** --- object specifying attributes to set
- **contents** --- HTML snippet representing contents of node
:Returns: the DOM element created
.. method:: addElement(parent,type[,attributes[,content]])
Creates a DOM element and appends it to the `parent` node
provided. It is equivalent to
.. code-block:: javascript
parent.appendChild(MathJax.HTML.Element(type,attributes,content))
:Parameters:
- **parent** --- the node where the element will be added
- **attributes** --- object specifying attributes to set
- **contents** --- HTML snippet representing contents of node
:Returns: the DOM element created
.. method:: TextNode(text)
Creates a DOM text node with the given text as its content.
:Parameters:
- **text** --- the text for the node
:Returns: the new text node
.. method:: addText(parent,text)
Creates a DOM text node with the given text and appends it to the
`parent` node.
:Parameters:
- **parent** --- the node where the text will be added
- **text** --- the text for the new node
:Returns: the new text node
.. describe:: Cookie.Set(name,data)
Creates a MathJax cookie using the ``MathJax.HTML.Cookie.prefix``
and the `name` as the cookie name, and the `key:value` pairs in
the `data` object as the data for the cookie. For example,
.. code-block:: javascript
MathJax.HTML.Cookie.Set("test",{x:42, y:"It Works!"});
will create a cookie named "mjx:test" that stores the values of
``x`` and ``y`` provided in the `data` object. This data can be
retrieved using the :meth:`MathJax.HTML.Cookie.Get()` method
discussed below.
:Parameters:
- **name** --- the name that identifies the coookie
- **data** --- object containing the data to store in the cookie
:Returns: ``null``
.. describe:: Cookie.Get(name[,obj])
Looks up the data for the cookie named `name` and merges the data
into the given `obj` object, or returns a new object containing
the data. For instance, given the cookie stored by the example
above,
.. code-block:: javascript
var data = MathJax.HTML.Cookie.Get("test");
would set ``data`` to ``{x:42, y:"It Works!"}``, while
.. code-block:: javascript
var data = {x:10, z:"Safe"};
MathJax.HTML.Cookie.Get("test",data);
would leave ``data`` as ``{x:42, y:"It Works!", z:"Safe"}``.
@@ -1,330 +0,0 @@
.. _api-hub:
**********************
The MathJax.Hub Object
**********************
The MathJax Hub, `MathJax.Hub`, is the main control structure for
MathJax. It is where input and output :term:`jax` are tied together,
and it is what handles processing of the MathJax ``<script>`` tags.
Processing of the mathematics on the page may require external files
to be loaded (when the mathematics includes less common functionality,
for example, that is defined in an extension file), and since file
loading is asynchronous, a number of the methods below may return
before their actions are completed. For this reason, they include
callback functions that are called when the action completes. These
can be used to synchronize actions that require the mathematics to be
completed before those action occur. See the :ref:`Using Callbacks
<using-callbacks>` documentation for more details.
Properties
==========
.. describe:: config: { ... }
This holds the configuration parameters for MathJax. Set these
values using :meth:`MathJax.Hub.Config()` described below. The
options and their default values are given in the :ref:`Core
Options <configure-hub>` reference page.
.. describe:: processUpdateTime: 500
The minimum time (in milliseconds) between updates of the
"Processing Math" message.
.. describe:: signal
The hub processing signal (tied to the
:meth:`MathJax.Hub.Register.MessageHook()` method).
.. describe:: Browser
The name of the browser as determined by MathJax. It will be one
of ``Firefox``, ``Safari``, ``Chrome``, ``Opera``, ``MSIE``,
``Konqueror``, or ``unkown``. This is actually an object with
additional properties and methods concerning the browser:
.. describe:: version
The browser version number, e.g., ``"4.0"``
.. describe:: isMac and isPC
These are boolean values that indicate whether the browser is
running on a Macintosh computer or a Windows computer. They
will both be ``false`` for a Linux computer
.. describe:: isForefox, isSafari, isChrome, isOpera, isMSIE, isKonqueror
These are ``true`` when the browser is the indicated one, and
``false`` otherwise.
.. describe:: versionAtLeast(version)
This tests whether the browser version is at least that given
in the `version` string. Note that you can not simply do a
numeric comparison, as version 4.10 should be considered later
than 4.9, for example. Similarly, 4.10 is different from 4.1,
for instance.
.. describe:: Select(choices)
This lets you perform browser-specific functions. Here,
`choices` is an object whose properties are the names of the
browsers and whose values are the functions to be performed.
Each function is passed one parameter, which is the
``MathJax.Hub.Browser`` object. You do not need to include
every browser as one of your choices (only those for which you
need to do special processing. For example:
.. code-block:: javascript
MathJax.Hub.Browser.Select(
MSIE: function (browser) {
if (browser.versionAtLeast("8.0")) {... do version 8 stuff ... }
... do general MSIE stuff ...
},
Firefox: function (browser) {
if (browser.isMac) {... do Mac stuff ... }
... do general Firefox stuff
}
);
Methods
=======
.. Method:: Config(options)
Sets the configuration options (stored in ``MathJax.Hub.config``)
to the values stored in the `options` object. See
:ref:`Configuring MathJax <configuration>` for details on how this
is used and the options that you can set.
:Parameters:
- **options** --- object containing options to be set
:Returns: ``null``
.. describe:: Register.PreProcessor(callback)
Used by preprocessors to register themselves with MathJax so that
they will be called during the :meth:`MathJax.Hub.PreProcess()`
action.
:Parameters:
- **callback** --- the callback specification for the preprocessor
:Returns: ``null``
.. describe:: Register.MessageHook(type,callback)
Registers a listener for a particular message being sent to the
hub processing signal (where `PreProcessing`, `Processing`, and
`New Math` messages are sent). When the message equals the
`type`, the `callback` will be called with the message as its
parameter.
:Parameters:
- **type** --- a string indicating the message to look for
- **callback** --- a callback specification
:Returns: ``null``
.. describe:: Register.StartupHook(type,callback)
Registers a listener for a particular message being sent to the
startup signal (where initialization and component startup
messages are sent). When the message equals the `type`, the
`callback will be called with the message as its parameter.
See the :ref:`Using Signals <using-signals>` dcocumentation for
more details.
:Parameters:
- **type** --- a string indicating the message to look for
- **callback** --- a callback specification
:Returns: ``null``
.. describe:: Register.LoadHook(file,callback)
Registers a callback to be called when a particular file is
completely loaded and processed. (The callback is called when the
file makes its :meth:`MathJax.Ajax.loadComplete()` call.) The
`file` should be the complete file name, e.g.,
``"[MathJax]/config/MathJax.js"``.
:Parameters:
- **file** --- the name of the file to wait for
- **callback** --- a callback specification
:Returns: the callback object
.. Method:: Queue(callback,...)
:noindex:
Pushes the given callbacks onto the main MathJax command queue.
This synchronizes the commands with MathJax so that they will be
performed in the proper order even when some run asynchronously.
See :ref:`Using Queues <using-queues>` for more details about how
to use queues, and the MathJax queue in particular. You may
supply as many `callback` specifications in one call to the
:meth:`Queue()` method as you wish.
:Parameters:
- **callback** --- a callback specification
:Returns: the callback object for the last callback added to the queue
.. Method:: Typeset([element[,callback]])
Calls the preprocessors on the given element, and then typesets
any math elements within the element. If no `element` is
provided, the whole document is processed. The `element` is
either the DOM `id` of the element, or a reference to the DOM
element itself. The `callback` is called when the process is
complete. See the :ref:`Modifying Math <typeset-math>` section
for details of how to use this method properly.
:Parameters:
- **element** --- the element whose math is to be typeset
- **callback** --- the callback specification
:Returns: the callback object
.. method:: PreProcess([element[,callback]])
Calls the loaded preprocessors on the entire document, or on the
given DOM element. The `element` is either the DOM `id` of the
element, or a reference to the DOM element itself. The `callback`
is called when the processing is complete.
:Parameters:
- **element** --- the element to be preprocessed
- **callback** --- the callback specification
:Returns: the callback object
.. method:: Process([element[,callback]])
Scans either the entire document or a given DOM `element` for
MathJax ``<script>`` tags and processes the math those tags
contain. The `element` is either the DOM `id` of the element to
scan, or a reference to the DOM element itself. The `callback` is
called when the processing is complete.
:Parameters:
- **element** --- the element to be processed
- **callback** --- the callback specification
:Returns: the callback object
.. method:: Update([element[,callback]])
Scans either the entire document or a given DOM element for
mathematics that has changed since the last time it was processed,
or is new, and typesets the mathematics they contain. The
`element` is either the DOM `id` of the element to scan, or a
reference to the DOM element itself. The `callback` is called
when the processing is complete.
:Parameters:
- **element** --- the element to be updated
- **callback** --- the callback specification
:Returns: the callback object
.. method:: Reprocess([element[,callback]])
Removes any typeset mathematics from the document or DOM
element, and then processes the mathematics again,
re-typesetting everything. This may be necessary, for example, if
the CSS styles have changed and those changes would affect the
mathematics. The `element` is either the DOM `id` of the element
to scan, or a reference to the DOM element itself. The `callback`
is called when the processing is complete.
:Parameters:
- **element** --- the element to be reprocessed
- **callback** --- the callback specification
:Returns: the callback object
.. method:: getAllJax([element])
Returns a list of all the element jax in the document or a
specific DOM element. The `element` is either the DOM `id` of the
element, or a reference to the DOM element itself.
:Parameters:
- **element** --- the element to be searched
:Returns: array of `element jax` objects
.. method:: getJaxByType(type[,element])
Returns a list of all the element jax of a given MIME-type in the
document or a specific DOM element. The `element` is either the
DOM `id` of the element to search, or a reference to the DOM
element itself.
:Parameters:
- **type** --- MIME-type of `element jax` to find
- **element** --- the element to be searched
:Returns: array of `element jax` objects
.. method:: getJaxByInputType(type[,element])
Returns a list of all the element jax associated with input
``<script>`` tags with the given MIME-type within the given DOM
element or the whole document. The `element` is either the DOM
`id` of the element to search, or a reference to the DOM element
itself.
:Parameters:
- **type** --- MIME-type of input (e.g., ``"math/tex"``)
- **element** --- the element to be searched
:Returns: array of `element jax` objects
.. method:: getJaxFor(element)
Returns the element jax associated with a given DOM
element. If the element does not have an associated element jax,
``null`` is returned. The `element` is either the DOM `id` of the
element, or a reference to the DOM element itself.
:Parameters:
- **element** --- the element whose element jax is required
:Returns: `element jax` object or ``null``
.. method:: isJax(element)
Returns ``0`` if the element is not a ``<script>`` that can be
processed by MathJax or the result of an output jax, returns ``-1``
if element is an unprocessed ``<script>`` tag that could be
handled by MathJax, and returns ``1`` if element is a processed
``<script>`` tag or an element that is the result of an output jax.
:Parameters:
- **element** --- the element to inspect
:Returns: integer (-1, 0, 1)
.. Method:: Insert(dst,src)
Inserts data from the `src` object into the `dst` object. The
`key:value` pairs in `src` are (recursively) copied into `dst`, so
that if `value` is itself an object, its contents is copied into
the corresponding object in `dst`. That is, objects within `src`
are merged into the corresponding objects in `dst` (they don't
replace them).
:Parameters:
- **dst** --- the destination object
- **src** --- the source object
:Returns: the modified destination object
.. Method:: formatError(script,error)
This is called when an internal error occurs during the processing
of a math element (i.e., an error in the MathJax code itself).
The `script` is a reference to the ``<script>`` tag where the
error occurred, and `error` is the ``Error`` object for the error.
The default action is to insert an HTML snippet at the location of
the script, but this routine can be overriden durring MathJax
configuration in order to perform some other action.
``MathJax.Hub.lastError`` holds the ``error`` value of the last
error on the page.
:Parameters:
- **script** --- the ``<script>`` tag causing the error
- **error** --- the ``Error`` object for the error
:Returns: ``null``
@@ -1,44 +0,0 @@
.. _mathjax-api:
===============
The MathJax API
===============
The following links document the various components that make up
MathJax. These are implemented as JavaScript objects contained within
the single global variable, ``MathJax``. Although JavaScript includes
an objects with some inheritance capabilities, they do not constitute
a full object-oriented programming model, so MathJax implements
its own object library. This means there is an ambiguity when we
speak of an "object", as it could be either a native JavaScript
object, or a MathJax object. We will use `Object` (capitalized) or
`MathJax.Object` for, when the distinction is important.
You may also want to view the :ref:`advanced topics <advanced-topics>`
on the main MathJax documentation page.
.. toctree::
:maxdepth: 1
The MathJax variable <variable>
The MathJax.Hub object <hub>
The MathJax.Ajax object <ajax>
The MathJax.Message object <message>
The MathJax.HTML object <html>
The MathJax.CallBack class <callback>
The MathJax.CallBack.Queue class <queue>
The MathJax.CallBack.Signal class <signal>
.. toctree::
:maxdepth: 1
The MathJax.InputJax class <inputjax>
The MathJax.OutputJax class <outputjax>
The MathJax.ElementJax class <elementjax>
The base Jax class <jax>
.. toctree::
:maxdepth: 1
The MathJax Object-Oriented Programming Model <object>
@@ -1,86 +0,0 @@
.. _api-input-jax:
**************************
The MathJax.InputJax Class
**************************
Input jax are the components of MathJax that translate
mathematics from its original format (like :term:`TeX` or
:term:`MathML`) to the MathJax internal format (an `element jax`).
An input jax is stored as a pair of files in a subdirectory of the
``jax/input`` directory, with the subdirectory name being the name of
the input jax. For example, the TeX input jax is stored in
`jax/input/TeX`. The first file, ``config.js``, is loaded when
MathJax is being loaded and configured, and is indicated by listing
the input jax directory in the `jax` array of the MathJax
configuration. The ``config.js`` file creates a subclass of the
`MathJax.InputJax` object for the new input jax and registers that
with MathJax, along with the MIME-type that will be used to indicate
the mathematics that is to be processed by the input jax.
The main body of the input jax is stored in the second file,
``jax.js``, which is loaded when the input jax is first called on to
translate some mathematics. This file augments the original input jax
subclass with the additional methods needed to do the translation.
MathJax calls the input jax's :meth:`Translate()` method when it needs
the input jax to translate the contents of a math ``<script>`` tag.
The `MathJax.InputJax` class is a subclass of the :ref:`MathJax Jax
<api-jax>` class, and inherits the properties and methods of that
class. Those listed below are the additional or overridden ones from
that class.
Properties
==========
.. describe:: name
The name of the jax.
.. describe:: version
The version number of the jax.
.. describe:: directory
The directory where the jax files are stored (e.g., ``"[MathJax]/jax/input/TeX"``);
Methods
=======
.. Method:: Translate(script)
:noindex:
This is the main routine called by MathJax when a ``<script>`` of
the appropriate type is found. The default :meth:`Translate()`
method simply loads the ``jax.js`` file and returns that callback
for that load function so that MathJax will know when to try
the :meth:`Translate()` action again. When the ``jax.js`` file
loads, it should override the default :meth:`Translate()` with its
own version that does the actual translation; that way, when the
second Translate call is made, it will be to the actual
translation routine rather than the default loader.
The translation process should include the creation of an
:ref:`Element Jax <api-element-jax>` that stores the data needed
for this element.
:Parameters:
- **script** --- the ``<script>`` element to be translated
:Returns: the `element jax` resulting from the translation
.. Method:: Register(mimetype)
:noindex:
This registers the MIME-type associated with this input jax so
that MathJax knows to call this input jax when it sees a
``<script>`` of that type. An input jax can register more than
one type, but it will be responsible for distinguishing elements
of the various types from one another.
:Parameters:
- **mimetype** --- the MIME-type of the input this jax processes
:Returns: ``null``

Some files were not shown because too many files have changed in this diff Show More