File tree Expand file tree Collapse file tree 19 files changed +212
-14
lines changed Expand file tree Collapse file tree 19 files changed +212
-14
lines changed Original file line number Diff line number Diff line change
1
+ assets /js /index.js
2
+ assets /js /jquery.min.js
3
+ assets /js /bpd.js
Original file line number Diff line number Diff line change
1
+ assets /js /jquery.min.js
2
+ assets /js /index.js
Original file line number Diff line number Diff line change
1
+ ---
2
+ layout: index
3
+ title: Comunidad de desarrolladores de Black Python.
4
+ lang: es
5
+ permalink: /es/
6
+ ---
Original file line number Diff line number Diff line change @@ -18,16 +18,16 @@ navigation:
18
18
url : /
19
19
fa : fa fa-home fa-fw
20
20
- text : About Us
21
- url : /about.html
21
+ url : /about/
22
22
fa : fa fa-info-circle fa-fw
23
23
- text : Events
24
- url : /events.html
24
+ url : /events/
25
25
fa : fa fa-calendar fa-fw
26
26
- text : Conferences
27
- url : /conferences.html
27
+ url : /conferences/
28
28
fa : fa fa-microphone fa-fw
29
29
- text : Community
30
- url : /community.html
30
+ url : /community/
31
31
fa : fa fa-users fa-fw
32
32
33
33
# Build settings
@@ -38,8 +38,14 @@ plugins:
38
38
- github-pages
39
39
- jemoji
40
40
- jekyll-feed
41
+ # - jekyll-seo-tag
42
+ # - jekyll-sitemap
41
43
42
44
exclude :
45
+ - bin
46
+ - CNAME
47
+ - CODE_OF_CONDUCT.md
48
+ - CONTRIBUTING.md
43
49
- README.md
44
50
- Gemfile*
45
51
- node_modules
@@ -55,3 +61,21 @@ exclude:
55
61
- venv
56
62
- .venv
57
63
# timezone: America/Toronto
64
+
65
+ permalink : " /:path/"
66
+
67
+ collections :
68
+ articles :
69
+ output : true
70
+ permalink : " /:path/"
71
+
72
+ defaults :
73
+ # - scope:
74
+ # path: ""
75
+ # values:
76
+ # image: /assets/images/cards/default.png
77
+ - scope :
78
+ path : " "
79
+ type : articles
80
+ values :
81
+ layout : article
Original file line number Diff line number Diff line change
1
+ # Each piece of content has YAML front matter with these properties:
2
+
3
+ lang :
4
+ type : String
5
+
6
+ layout :
7
+ type : String
8
+
9
+ title :
10
+ type : String
11
+ required : true
12
+
13
+ contents :
14
+ type : Array
15
+
16
+ description :
17
+ type : String
18
+
19
+ class :
20
+ type : String
21
+
22
+ order :
23
+ type : Integer
24
+
25
+ image : {}
26
+
27
+ related :
28
+ type : Array
29
+
30
+ untranslated :
31
+ type : TrueClass
32
+
33
+ redirect_from :
34
+ type : String
Original file line number Diff line number Diff line change
1
+ en :
2
+ locale_name : English
3
+ nav :
4
+ - Home
5
+ - About Us
6
+ - Events
7
+ - Conferences
8
+ - Community
9
+ index :
10
+ lead : Welcome to Black Python Developers Community.
11
+ article :
12
+ table_of_contents : Table of Contents
13
+ footer :
14
+ contribute :
15
+ heading : Contribute
16
+ description : Want to make a suggestion? This content is open source. Help us improve it.
17
+ button : Contribute
18
+ subscribe :
19
+ heading : Stay in touch
20
+ description : Be the first to hear about BPDevs's latest open source tips and resources.
21
+ label : Email Address
22
+ button : Subscribe
Original file line number Diff line number Diff line change
1
+ es :
2
+ locale_name : Español
3
+ nav :
4
+ - Inicio
5
+ - Acerca de
6
+ - Eventos
7
+ - Conferencias
8
+ - Comunidad
9
+ index :
10
+ lead : Bienvenidos a la Comunidad de desarrolladores de Black Python.
11
+ article :
12
+ table_of_contents : Tabla de contenidos
13
+ footer :
14
+ contribute :
15
+ heading : Contribuir
16
+ description : ¿Tienes alguna sugerencia? Este contenido es de código abierto. Ayúdanos a mejorarlo.
17
+ button : Contribuir
18
+ subscribe :
19
+ heading : Suscribirse para novedades
20
+ description : Sea el primero en enterarse de los últimos consejos y recursos de código abierto.
21
+ label : Dirección de correo
22
+ button : Suscribirse
Original file line number Diff line number Diff line change
1
+ {% assign t = site.data.locales[page.lang][page.lang] %}
1
2
< header class ="site-header " role ="banner ">
2
3
< h1 class ="site-title "> < a class ="logo-text " href ="/index.html "> BPDev</ a > </ h1 >
3
4
< nav class ="site-navigation ">
@@ -6,11 +7,27 @@ <h1 class="site-title"><a class="logo-text" href="/index.html">BPDev</a></h1>
6
7
{% for item in site.navigation %} {% assign current = nil %} {% if
7
8
page.url == item.url %} {% assign current = 'nav-current' %} {% endif %}
8
9
< li class ="menu-item {{ current }} " role ="menuitem ">
9
- < a class ="{{ current }} " href ="{{ item.url }} "
10
- > < i class ="{{ item.fa }} "> </ i > {{ item.text }}</ a
11
- >
10
+ < a class ="{{ current }} " href ="{{ item.url }} ">
11
+ < i class ="{{ item.fa }} "> </ i > {{ t.nav[forloop.index0] }}
12
+ </ a >
12
13
</ li >
13
- {% endfor %}
14
+ {% endfor %} {% if page.lang and site.data.locales.size > 1 %}
15
+ < li class ="menu-item " role ="menuitem ">
16
+ < div class ="">
17
+ < select id ="language " class ="form-select ">
18
+ {% assign locales = site.data.locales | sort %} {% for locale in
19
+ locales %} {% assign lang = locale[0] %} {% assign locale_name =
20
+ locale[1][lang].locale_name %} {% if page.lang == lang %}
21
+ < option value ="{{ lang }} " selected ="selected ">
22
+ {{ locale_name }}
23
+ </ option >
24
+ {% else %}
25
+ < option value ="{{ lang }} "> {{ locale_name }}</ option >
26
+ {% endif %} {% endfor %}
27
+ </ select >
28
+ </ div >
29
+ </ li >
30
+ {% endif %}
14
31
</ ul >
15
32
<!-- .menu -->
16
33
< button id ="menu-close " class ="menu-toggle ">
Original file line number Diff line number Diff line change
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {% assign t = site.data.locales[page.lang][page.lang] %}
6
+
7
+ < article class ="">
8
+ < div class =""> {{ content }}</ div >
9
+ </ article >
Original file line number Diff line number Diff line change 1
1
<!doctype html>
2
- < html lang ="en ">
2
+ < html lang ="{{ page.lang }} ">
3
3
< head >
4
4
< meta charset ="UTF-8 " />
5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1 " />
30
30
href ="{{ '/feed.xml' | prepend: site.baseurl | prepend: site.url }} "
31
31
/>
32
32
< link
33
- rel ="shortcut icon "
33
+ rel ="icon "
34
34
href ="https://github.com/BlackPythonDevs.png "
35
35
type ="image/png "
36
36
/>
37
+ {% if page.lang and page.untranslated != true and site.data.locales.size > 1
38
+ %} {% assign locales = site.data.locales | sort %} {% for locale in locales
39
+ %} {% assign lang = locale[0] %} {% assign page_lang_slash = page.lang |
40
+ append: '/' | prepend: '/' %} {% assign default_url = page.url | replace:
41
+ page_lang_slash, '/' %} {% if lang == "en" %}
42
+ < link
43
+ rel ="alternate "
44
+ hreflang ="en "
45
+ href ="{{ site.url }}{{ default_url }} "
46
+ />
47
+ < link
48
+ rel ="alternate "
49
+ hreflang ="x-default "
50
+ href ="{{ site.url }}{{ default_url }} "
51
+ />
52
+ {% else %}
53
+ < link
54
+ rel ="alternate "
55
+ hreflang ="{{ lang }} "
56
+ href ="{{ site.url }}/{{ lang }}{{ default_url }} "
57
+ />
58
+ {% endif %} {% endfor %} {% endif %}
37
59
</ head >
38
60
39
61
< body >
40
62
{% include header.html %}
41
63
< main role ="main "> {{ content }}</ main >
42
64
{% include footer.html %}
43
- < script src ="{{ '/assets/js/bpd .js' }} "> </ script >
65
+ < script src ="{{ '/assets/js/index .js' | relative_url }} "> </ script >
44
66
</ body >
45
67
</ html >
Original file line number Diff line number Diff line change
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {% assign t = site.data.locales[page.lang][page.lang] %} {% if page.title %} {%
6
+ assign header = page.title %} {% else %} {% assign header = site.title %} {%
7
+ endif %}
8
+ < h1 > {{ t.index.lead }}</ h1 >
Original file line number Diff line number Diff line change 1
1
---
2
2
layout : default
3
+ lang : en
3
4
title : About Us
4
5
---
5
6
Original file line number Diff line number Diff line change @@ -16,3 +16,22 @@ if (menuToggle) {
16
16
) ;
17
17
}
18
18
}
19
+
20
+ function loadLanguage ( lang ) {
21
+ base_pathname = window . location . pathname . replace (
22
+ / \/ [ a - z ] + ( [ _ - ] [ a - z ] + ) ? \/ / ,
23
+ "/" ,
24
+ ) ;
25
+ if ( lang === "en" ) {
26
+ url = base_pathname ;
27
+ } else {
28
+ url = "/" + lang + base_pathname ;
29
+ }
30
+ window . location . assign ( url ) ;
31
+ }
32
+
33
+ $ ( document ) . ready ( function ( ) {
34
+ $ ( "#language" ) . change ( function ( ) {
35
+ loadLanguage ( $ ( "#language option:selected" ) . val ( ) ) ;
36
+ } ) ;
37
+ } ) ;
Original file line number Diff line number Diff line change
1
+ -- -
2
+ -- -
3
+
4
+ { % include_relative jquery . min. js % }
5
+ { % include_relative bpd . js % }
Original file line number Diff line number Diff line change 1
1
---
2
2
layout : default
3
+ lang : en
3
4
title : Community
4
5
---
5
6
Original file line number Diff line number Diff line change 1
1
---
2
2
layout : default
3
+ lang : en
3
4
title : Conferences
4
5
---
5
6
Original file line number Diff line number Diff line change 1
1
---
2
2
layout : default
3
+ lang : en
3
4
title : Events
4
5
---
5
6
Original file line number Diff line number Diff line change 1
1
---
2
- layout: default
2
+ layout: index
3
+ lang: en
3
4
title: Home
4
5
---
5
-
6
- < h1 > Welcome to {{ site.title }}</ h1 >
You can’t perform that action at this time.
0 commit comments