PR#1176 Add static page hosting

Proposed 7 months ago by farhaan
Modified 5 hours ago
From forks/farhaan/pagure pagure_pages  into pagure master

As @ryanlerch suggested introducing the documentation link
in the header and removed the Doc tab from the project.

file changed

 1 @@ -67,6 +67,14 @@ 

 2               </div>

 3             {% endif %}

 4           </h2>

 5 +         {% if config['DOC_APP_URL'] and repo and repo.settings.get('project_documentation', True) %}

 6 +         <div class="m-t-0">

 7 +             Documentation at

 8 +             <a href="{{ config['DOC_APP_URL'] }}{{ repo.fullname }}">

 9 +                     {{ config['DOC_APP_URL'] }}{{ repo.fullname }}

10 +             </a>

11 +         </div>

12 +         {% endif %}

13           {% if repo.is_fork %}

14           <div class="m-t-0">

15               Forked from

16 @@ -94,17 +102,6 @@

17               <span class="hidden-sm-down">Overview</span>

18           </a>

19         </li>

20 -         {% if config['DOC_APP_URL'] and repo and repo.settings.get('project_documentation', True) %}

21 -         <li class="nav-item" >

22 -           <a  {%

23 -             if select == 'docs' %}class="active nav-link" {%

24 -             else %}class="nav-link" {%

25 -             endif %}href="{{ url_for('.view_docs', username=username, repo=repo.name) }}">

26 -               <span class="oi hidden-md-up" data-glyph="book"></span>

27 -               <span class="hidden-sm-down">Docs</span>

28 -           </a>

29 -         </li>

30 -         {% endif %}

31   

32           <li class="nav-item{%

33               if repo_obj and repo_obj.is_empty %} disabled{% endif %}">

there is no need to remove the "docs" feature in order to implement a static hosting feature - these features are completely orthogonal - more about that here --> https://pagure.io/pagure/issue/469#comment-6064

furthermore this PR does not remove the docs feature but merely makes it inaccessible for any repo that may be using it

lastly the anchor URL does not appear to be what was suggested: (<project_name>.pagure.io)

{{ config['DOC_APP_URL'] }}{{ repo.fullname }}

it most likely should be using internals such as what was replaced

{{ url_for('.view_docs', username=username, repo=repo.name) }}
Changes summary
+8 -11
file changed