Here's an example Sphinx doc:
https://github.com/django-tastypie/django-tastypie/blob/v0.13.2/docs/release_notes/v0.13.2.rst
I'd like commit SHA's, issue numbers, and #mentions to be hyperlinked. Anyway to do that automatically?
I'd suggest checking out the Sphinx Extension library at http://sphinxext-survey.readthedocs.org/en/latest/changelog-version-control.html.
Specifically, I believe these two extensions may provide you at least some of the support you're looking for (sans the #mentions).
https://pypi.python.org/pypi/sphinxcontrib-github
https://pypi.python.org/pypi/sphinxcontrib-issuetracker
Related
How can I search an issue on GitHub that contains keywords "java" AND ("python" OR "C++")? Is it possible to represent a search with these logical operators like OR/AND?
It turns out GitHub does not provide functions to achieve the searching logics like ANR/OR. The solution I figured out is to write a crawler that implements the searching logics.
Well, GitHub does not work like StackOverflow, but there are some ways to achieve what you want to accomplish. Start by using the type label, like this type:issue, then you can use the in qualifier, like this python in:title,body, which will search titles that contain the word python. Here is a more detailed (reference) of GitHub's Docs, which might help you with your issue.
I hope this helps you, but as much as I searched I could not find conditional search features on GitHub's search, but there are some pretty useful labels (qualifiers) that you can benefit from.
I'm looking for a solution that would allow us to have separate themes in the built docs through rtd, based on urls. The project is github-hosted, so we're using the Webhook integration there for rtd.
Basically, we'd like to have slug.readthedocs.io use a default, and have a custom domain through rtd, i.e. docs.ourdomain.org, use a theme styled to match our site.
on_rtd, it seems, is True whenever rtd builds the docs, so that's likely not useful, but please correct me if I'm wrong.
Perhaps multiple Webhooks? Some sphinx magic I haven't discovered yet?
Considering using branches or tags, but that just seems a bit much, and would, I believe, call for multiple project-naming on rtd. Though, again, please correct me if I'm wrong.
At the moment, we've implemented our site theming, and simply let that be in place for both, but ideally, we hope to have the slug.readthedocs.io site be more generic and in-line with the readthedocs.io feel.
At the moment, Read the Docs doesn't support multiple themes for a given repo/branch.
There are at least a couple of approaches available here.
1) Use branches to host alternative docs. Read The Docs has an example project illustrating this approach here:
Read the Docs Sphinx Theme Examples
-- [Github Repository]
2) Use sub-projects.
Neither of these really addresses the use case in my question directly, but they do offer a sort alternative approach to multiple themes.
I would like to use ReadTheDocs to host my Sphinx documentation. The project is hosted on github. I can connect to it just fine.
The particularity that I have is that the project contains 2 Sphinx documents (e.g. a programmer's manual and a user's manual). ReadTheDocs appears to be detecting both (there are two conf.py) and building both. However when it comes to displaying them, it displays the html for only one of them, as far as I can make it, the first one alphabetically.
So my questions are:
If both have been built, how do you get to see the other one?
Is there a way to use "subprojects" to specify the path to each conf.py and hence have clear URL to each document/manual? That would be the ideal solution.
Read the Docs does not support building two different sets of documentation from the same repository and same Read the Docs project. However, you could use sphinx-multiproject extension to achieve this.
You will need to define this extension in your requirements (see https://docs.readthedocs.io/en/stable/guides/specifying-dependencies.html) and then import your repository twice under Read the Docs --one time per set of documentation you want to host: mydocs-users and mydocs-developers, for example.
Note that this is the exact pattern that Read the Docs itself uses for its documentation:
User's documentation: https://docs.readthedocs.io/
Developer's documentation: https://dev.readthedocs.io/
The repository for both sets of documentation is the same (https://github.com/readthedocs/readthedocs.org/) but documentation generated on each of the projects is defined by that sphinx-multiproject extension. See https://github.com/readthedocs/readthedocs.org/blob/6bf0bede7b757f1e9458e29ba89b591389cae4d5/docs/conf.py#L48-L63
Be sure you follow the tutorial.
Usually you need an index (in conf.py it is referred as master_doc).
Then each file must be referenced, either in a toctree or a include, or a link, etc.
Look at examples on github (ie: the Sphinx-doc repository).
Is there a built-in way to add tags to content in a similar way as with WordPress when using ExpressionEngine?
No, there's not an EE native equivalent to WP's tags. For something similar you need to go into the 3rd party market. Here are a couple of options:
Tagger, free & actively maintained & supported (support requires a "developer" license of $50
Tag, commercial at ~$60
Of these two I've only used Tagger. It got the job done nicely but I can't compare it to "Tag" since I haven't used it. There's another one called Taggable but I don't believe it's actively maintained or updated any more. (I would like to it but StackOverflow won't let me add more than 2 links until my rep increases.)
I've used both Tag and Tagger, mentioned by Erik. I have found for my needs Tag is more that enough to do the job. Tagger adds some higher level functions, but I didn't find I needed them in most cases.
I'd probably go with one of the two add-ons already listed though, to be thorough, there is also Taggable which Erik did mentioned though, couldn't link to it:
https://github.com/jamierumbelow/taggable
I'm currently using Solr with Terms Component and Jquery Autosuggest which works quiet good. However, this construct is limited to one autosuggest word (it autocompletes only the first word). Is it possible to implement a Google like autosuggest with multiple words/terms so i can autocomplete multiple words?
I just wrote a blog post about different ways to make auto complete suggestions with Solr. It's basically a comparison of some different strategies, check it out, it might help.
If you want to make multiple terms suggestions, it turns out you should use, as already mentioned in the other answer you got, the Suggester component available in Solr starting from the 3.1 version. Since it has some limitations, you can also have a look at the ShingleFilterFactory, which generates token NGrams. It creates combination of tokens as a single token, that's useful to suggest multiple words.
You can also use SpellCheckComponent for better auto complete suggests.
See http://wiki.apache.org/solr/Suggester for details.
Edit:
Refer here for solr5 and above
Check this out, it might help
http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/
I worked out the same task, finally got solved using TermsComponent with multiple fields. check this link. http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-td3998559i20.html