diff --git a/doc/usage/using_doc.rst b/doc/usage/using_doc.rst index 5be03cf..9fea8e6 100644 --- a/doc/usage/using_doc.rst +++ b/doc/usage/using_doc.rst @@ -3,19 +3,21 @@ Using the doc repository of your project In this section of the documentation, we are interested in the doc repository. -The doc repository is a simple Git repo, whose content will appear in 2 ways: +The doc repository is a simple Git repo. It can be displayed as a subfolder +of a project or as a dedicated Git repo. +Either way its content can be displayed in 2 ways: * inline under the `Docs` tab in Pagure: - * either https://pagure.io/docs// + * https://pagure.io/docs// or - * or https://pagure.io/docs/// + * https://pagure.io/docs/// * standalone: - * either https://docs.pagure.org// + * https://docs.pagure.org// or - * or https://docs.pagure.org/./ + * https://docs.pagure.org/./ By default the `Docs` tab in the project's menu is disabled, you @@ -23,11 +25,17 @@ will have to visit the project's settings page and turn it on in the ``Project options`` section. -The URL to the doc repository is: +The URL to clone the doc repo is: -* either https://pagure.io//docs/ +* https://pagure.io/docs//.git + + +To view the doc source files in the browser: + +* if the doc repo is kept in the project's sources, use the project's website + +* if the doc repo is a dedicated repo, use https://pagure.io// -* or https://pagure.io//docs/ Different file types can be used for your documentation in this repo: diff --git a/pagure/docs_server.py b/pagure/docs_server.py index b0eaeb3..3a8b89a 100644 --- a/pagure/docs_server.py +++ b/pagure/docs_server.py @@ -163,10 +163,10 @@ def view_docs(repo, username=None, namespace=None, filename=None): flask.abort( 404, flask.Markup( - 'No content found is the repository, you may want to read ' + 'No content found in the repository, you may want to read ' 'the ' - 'Using the doc repository of your project documentation' + 'Using the doc repository of your project documentation.' ) ) @@ -189,7 +189,7 @@ def view_docs(repo, username=None, namespace=None, filename=None): if not content: if not tree or not len(tree): - flask.abort(404, 'No content found is the repository') + flask.abort(404, 'No content found in the repository') html = '
  • ' for el in tree: name = el.name diff --git a/tests/test_pagure_flask_docs.py b/tests/test_pagure_flask_docs.py index b6608d0..57fa780 100644 --- a/tests/test_pagure_flask_docs.py +++ b/tests/test_pagure_flask_docs.py @@ -164,10 +164,10 @@ class PagureFlaskDocstests(tests.SimplePagureTest): output = self.app.get('/test/docs') self.assertEqual(output.status_code, 404) self.assertIn( - '

    No content found is the repository, you may want to read ' + '

    No content found in the repository, you may want to read ' 'the Using the doc repository of your project ' - 'documentation

    ', output.data) + 'documentation.

    ', output.data) def test_view_docs(self): """ Test the view_docs endpoint. """