This repository was archived by the owner on Oct 23, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +28
-18
lines changed
_themes/sphinx_italia_theme Expand file tree Collapse file tree 7 files changed +28
-18
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ version: 2
33jobs :
44 build :
55 docker :
6- - image : circleci/python:3.6.1
6+ - image : circleci/python:2.7
77
88 working_directory : ~/design-doc
99
1414 - run :
1515 name : install sphinx
1616 command : |
17- python3 -m venv .venv
17+ virtualenv .venv
1818 source .venv/bin/activate
1919 pip install -q sphinx
2020
Original file line number Diff line number Diff line change 4444 < a href ="https://teamdigitale.governo.it/ " title ="Team Digitale "> Team Digitale</ a >
4545 </ div > <!--/sh__institutional-->
4646 < div class ="sh__tabs ">
47- < ul class ="sh__tabsul ">
47+ < ul class ="sh__tabsul ">
4848 < li class ="delimiter "> < a href ="https://pianotriennale-ict.italia.it "> Piano Triennale</ a > </ li >
49- < li class =""> < a href ="https://developers.italia.it/ "> Developers</ a > </ li >
50- < li class ="delimiter "> < a href ="https://designers.italia.it "> Designers</ a > </ li >
51- < li class =""> < a href ="https://forum.developers. italia.it/ "> Forum</ a > </ li >
49+ < li class =""> < a href ="https://developers.italia.it/ "> Developers</ a > </ li >
50+ < li class ="delimiter "> < a href ="https://designers.italia.it "> Designers</ a > </ li >
51+ < li class =""> < a href ="https://forum.italia.it/ "> Forum</ a > </ li >
5252 < li class ="current "> < a href ="https://docs.developers.italia.it/ "> Docs</ a > </ li >
5353 < li class =""> < a href ="https://github.com/italia/ "> Github</ a > </ li >
5454 </ ul >
@@ -96,10 +96,9 @@ <h2 class="branding--title">
9696 {% if theme_logo_only %}
9797 {% else %}
9898 < h1 class ="project-title "> < a href ="{{ pathto(master_doc) }} " > {{ project }} </ a >
99- {% if theme_display_version %} {%- set nav_version = version %} {% if READTHEDOCS and current_version %} {%- set nav_version = current_version
100- %}{% endif %}
101- {% if nav_version %}
102- < span class ="version "> {{ nav_version }}</ span >
99+ {% if theme_display_version %} {%- set nav_version = version %} {% if READTHEDOCS and current_version != 'stable' %} {%- set nav_version = current_version %} {% endif %}
100+ {% if nav_version %}
101+ < br /> < small > versione: </ small > < span class ="version "> {{ nav_version }}</ span >
103102 </ h1 >
104103 {% endif %} {% endif %} {% endif %} {% include "searchbox.html" %} {% endblock %}
105104 </ div >
Original file line number Diff line number Diff line change 2121 </ li >
2222 < li class ="pushy-link delimiter ">
2323 < span class ="pushy_subtitle "> GLI STRUMENTI</ span >
24- < a href ="https://forum.developers. italia.it/ "> Forum</ a >
24+ < a href ="https://forum.italia.it/ "> Forum</ a >
2525 </ li >
2626 < li class ="pushy-link delimiter current ">
2727 < a href ="https://docs.developers.italia.it/ "> Docs</ a >
3939<!-- Your Content -->
4040< div id ="container ">
4141 <!-- Menu Button -->
42-
43- </ div >
42+
43+ </ div >
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
22# -*- coding: utf-8 -*-
33
4+ import sys
5+ import os
6+ sys .path .append ('./versioning' )
7+ from github_releases import get_latest_release
8+
49# -- PROJECT Variables ----------------------------------------------------
510settings_project_name = 'Linee guida di design per i servizi web della PA'
611settings_copyright_copyleft = 'CC-BY 3.0 - Agenzia per l\' Italia Digitale'
712settings_editor_name = 'AgID - Agenzia per l\' Italia Digitale'
8- settings_doc_version = '1'
9- settings_doc_release = '1.0'
13+ settings_doc_version = get_latest_release ( 'italia' , 'design-doc' )
14+ settings_doc_release = settings_doc_version
1015settings_basename = 'LineeGuidaWebPA'
1116settings_file_name = 'Linee-Guida-Web-PA'
1217
13- import sys
14- import os
15-
1618# Add any Sphinx extension module names here, as strings. They can be
1719# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
1820# ones.
Original file line number Diff line number Diff line change 1+ from urllib2 import urlopen
2+ import json
3+
4+ def get_latest_release (owner , repo ):
5+ url = "https://api.github.com/repos/%s/%s/releases/latest" % (owner , repo )
6+ response = urlopen (url )
7+ string = response .read ().decode ('utf-8' )
8+ json_obj = json .loads (string )
9+ return (json_obj ['tag_name' ])
You can’t perform that action at this time.
0 commit comments