Skip to content

Update hugo to 0.115.4 #649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -25,4 +25,4 @@ jobs:
branch: main
cname: numpy.org
repo: numpy/numpy.github.com
hugoVersion: extended_0.104.3
hugoVersion: extended_0.115.4
17 changes: 10 additions & 7 deletions config.yaml.in
Original file line number Diff line number Diff line change
@@ -27,21 +27,24 @@ languages:
title: NumPy
weight: 1
contentDir: content/en
< content/en/config.yaml >
< content/en/tabcontents.yaml >

include-files:
- content/en/config.yaml
- content/en/tabcontents.yaml

# Portuguese
pt:
title: NumPy
weight: 2
contentDir: content/pt
< content/pt/config.yaml >
< content/pt/tabcontents.yaml >
include-files:
- content/pt/config.yaml
- content/pt/tabcontents.yaml

# Japanese
ja:
title: NumPy
weight: 3
contentDir: content/ja
< content/ja/config.yaml >
< content/ja/tabcontents.yaml >
include-files:
- content/ja/config.yaml
- content/ja/tabcontents.yaml
98 changes: 49 additions & 49 deletions content/en/config.yaml
Original file line number Diff line number Diff line change
@@ -63,13 +63,13 @@ params:
text: The core of NumPy is well-optimized C code. Enjoy the flexibility of Python with the speed of compiled code.
- title: Easy to use
text: NumPy's high level syntax makes it accessible and productive for programmers from any background or experience level.

tabs:
title: ECOSYSTEM
section5: false

section5: false

navbar:
navbar:
- title: Install
url: /install
- title: Documentation
@@ -84,50 +84,50 @@ navbar:
url: /news
- title: Contribute
url: /contribute
footer:
logo: logo.svg
socialmediatitle: ""
socialmedia:
- link: https://github.com/numpy/numpy
icon: github
- link: https://www.youtube.com/channel/UCguIL9NZ7ybWK5WQ53qbHng
icon: youtube
- link: https://twitter.com/numpy_team
icon: twitter
quicklinks:
column1:
title: ""
links:
- text: Install
link: /install
- text: Documentation
link: https://numpy.org/doc/stable
- text: Learn
link: /learn
- text: Citing Numpy
link: /citing-numpy
- text: Roadmap
link: https://numpy.org/neps/roadmap.html
column2:
links:
- text: About us
link: /about
- text: Community
link: /community
- text: User surveys
link: /user-surveys
- text: Contribute
link: /contribute
- text: Code of conduct
link: /code-of-conduct
column3:
links:
- text: Get help
link: /gethelp
- text: Terms of use
link: /terms
- text: Privacy
link: /privacy
- text: Press kit
link: /press-kit

footer:
logo: logo.svg
socialmediatitle: ""
socialmedia:
- link: https://github.com/numpy/numpy
icon: github
- link: https://www.youtube.com/channel/UCguIL9NZ7ybWK5WQ53qbHng
icon: youtube
- link: https://twitter.com/numpy_team
icon: twitter
quicklinks:
column1:
title: ""
links:
- text: Install
link: /install
- text: Documentation
link: https://numpy.org/doc/stable
- text: Learn
link: /learn
- text: Citing Numpy
link: /citing-numpy
- text: Roadmap
link: https://numpy.org/neps/roadmap.html
column2:
links:
- text: About us
link: /about
- text: Community
link: /community
- text: User surveys
link: /user-surveys
- text: Contribute
link: /contribute
- text: Code of conduct
link: /code-of-conduct
column3:
links:
- text: Get help
link: /gethelp
- text: Terms of use
link: /terms
- text: Privacy
link: /privacy
- text: Press kit
link: /press-kit
361 changes: 181 additions & 180 deletions content/en/tabcontents.yaml

Large diffs are not rendered by default.

164 changes: 82 additions & 82 deletions content/ja/config.yaml
Original file line number Diff line number Diff line change
@@ -72,89 +72,89 @@ params:
tabs:
title: NumPyのエコシステム
section5: false
navbar:
-
title: インストール
url: /ja/install
-
title: ドキュメント
url: https://numpy.org/doc/stable
-
title: 学び方
url: /ja/learn
-
title: コミュニティ
url: /ja/community
-
title: 私達について
url: /ja/about
-
title: ニュース
url: /ja/news
-
title: NumPyに貢献する
url: /ja/contribute
footer:
logo: logo.svg
socialmediatitle: ""
socialmedia:
navbar:
-
link: https://github.com/numpy/numpy
icon: github
title: インストール
url: /ja/install
-
link: https://www.youtube.com/channel/UCguIL9NZ7ybWK5WQ53qbHng
icon: YouTube
title: ドキュメント
url: https://numpy.org/doc/stable
-
link: https://twitter.com/numpy_team
icon: twitter
quicklinks:
column1:
title: ""
links:
-
text: インストール
link: /ja/install
-
text: ドキュメント
link: https://numpy.org/doc/stable
-
text: 学び方
link: /ja/learn
-
text: 引用する
link: /ja/citing-numpy
-
text: ロードマップ
link: https://numpy.org/neps/roadmap.html
column2:
links:
-
text: 私達について
link: /ja/about
-
text: コミュニティ
link: /ja/community
-
text: ユーザーの調査
link: /ja/user-surveys
-
text: NumPyに貢献する
link: /ja/contribute
-
text: 行動規範
link: /ja/code-of-conduct
column3:
links:
-
text: サポートを得る方法
link: /ja/gethelp
-
text: 利用規約
link: /ja/terms
-
text: プライバシーポリシー
link: /ja/privacy
-
text: プレス用資料
link: /ja/press-kit
title: 学び方
url: /ja/learn
-
title: コミュニティ
url: /ja/community
-
title: 私達について
url: /ja/about
-
title: ニュース
url: /ja/news
-
title: NumPyに貢献する
url: /ja/contribute
footer:
logo: logo.svg
socialmediatitle: ""
socialmedia:
-
link: https://github.com/numpy/numpy
icon: github
-
link: https://www.youtube.com/channel/UCguIL9NZ7ybWK5WQ53qbHng
icon: YouTube
-
link: https://twitter.com/numpy_team
icon: twitter
quicklinks:
column1:
title: ""
links:
-
text: インストール
link: /ja/install
-
text: ドキュメント
link: https://numpy.org/doc/stable
-
text: 学び方
link: /ja/learn
-
text: 引用する
link: /ja/citing-numpy
-
text: ロードマップ
link: https://numpy.org/neps/roadmap.html
column2:
links:
-
text: 私達について
link: /ja/about
-
text: コミュニティ
link: /ja/community
-
text: ユーザーの調査
link: /ja/user-surveys
-
text: NumPyに貢献する
link: /ja/contribute
-
text: 行動規範
link: /ja/code-of-conduct
column3:
links:
-
text: サポートを得る方法
link: /ja/gethelp
-
text: 利用規約
link: /ja/terms
-
text: プライバシーポリシー
link: /ja/privacy
-
text: プレス用資料
link: /ja/press-kit

437 changes: 219 additions & 218 deletions content/ja/tabcontents.yaml

Large diffs are not rendered by default.

164 changes: 82 additions & 82 deletions content/pt/config.yaml
Original file line number Diff line number Diff line change
@@ -72,89 +72,89 @@ params:
tabs:
title: ECOSSISTEMA
section5: false
navbar:
-
title: Instalação
url: /pt/install
-
title: Documentação
url: https://numpy.org/doc/stable
-
title: Aprenda
url: /pt/learn
-
title: Comunidade
url: /pt/community
-
title: Sobre
url: /pt/about
-
title: Notícias
url: /pt/news
-
title: Contribuir
url: /contribute
footer:
logo: logo.svg
socialmediatitle: ""
socialmedia:
navbar:
-
link: https://github.com/numpy/numpy
icon: github
title: Instalação
url: /pt/install
-
link: https://www.youtube.com/channel/UCguIL9NZ7ybWK5WQ53qbHng
icon: youtube
title: Documentação
url: https://numpy.org/doc/stable
-
link: https://twitter.com/numpy_team
icon: twitter
quicklinks:
column1:
title: ""
links:
-
text: Instalação
link: /pt/install
-
text: Documentação
link: https://numpy.org/doc/stable
-
text: Aprenda
link: /pt/learn
-
text: Citando o Numpy
link: /pt/citing-numpy
-
text: Roadmap
link: https://numpy.org/neps/roadmap.html
column2:
links:
-
text: Sobre
link: /pt/about
-
text: Comunidade
link: /pt/community
-
text: Pesquisas de usuário
link: /pt/user-surveys
-
text: Contribuir
link: /pt/contribute
-
text: Código de Conduta
link: /pt/code-of-conduct
column3:
links:
-
text: Ajuda
link: /pt/gethelp
-
text: Termos de uso (EN)
link: /pt/terms
-
text: Privacidade
link: /pt/privacy
-
text: Kit de imprensa
link: /pt/press-kit
title: Aprenda
url: /pt/learn
-
title: Comunidade
url: /pt/community
-
title: Sobre
url: /pt/about
-
title: Notícias
url: /pt/news
-
title: Contribuir
url: /contribute
footer:
logo: logo.svg
socialmediatitle: ""
socialmedia:
-
link: https://github.com/numpy/numpy
icon: github
-
link: https://www.youtube.com/channel/UCguIL9NZ7ybWK5WQ53qbHng
icon: youtube
-
link: https://twitter.com/numpy_team
icon: twitter
quicklinks:
column1:
title: ""
links:
-
text: Instalação
link: /pt/install
-
text: Documentação
link: https://numpy.org/doc/stable
-
text: Aprenda
link: /pt/learn
-
text: Citando o Numpy
link: /pt/citing-numpy
-
text: Roadmap
link: https://numpy.org/neps/roadmap.html
column2:
links:
-
text: Sobre
link: /pt/about
-
text: Comunidade
link: /pt/community
-
text: Pesquisas de usuário
link: /pt/user-surveys
-
text: Contribuir
link: /pt/contribute
-
text: Código de Conduta
link: /pt/code-of-conduct
column3:
links:
-
text: Ajuda
link: /pt/gethelp
-
text: Termos de uso (EN)
link: /pt/terms
-
text: Privacidade
link: /pt/privacy
-
text: Kit de imprensa
link: /pt/press-kit

437 changes: 219 additions & 218 deletions content/pt/tabcontents.yaml

Large diffs are not rendered by default.

54 changes: 38 additions & 16 deletions gen_config.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,45 @@
import os
import re
import yaml


with open('config.yaml.in', 'r', encoding='utf-8') as templ:
lines = templ.readlines()
config = yaml.load(
open("config.yaml.in", "r", encoding="utf-8"), Loader=yaml.SafeLoader
)

pattern = re.compile('< content\/\w\w\/\w*.yaml >')
with open('config.yaml', 'w', encoding='utf-8') as f:
for line in lines:
match = pattern.search(line)
if match:
with open(match.group()[2:-2], 'r', encoding='utf-8') as f2:
for f2_line in f2.readlines():
# indent to get correct yaml formatting
f.write(' ' + f2_line)
elif line.startswith('disableLanguages'):
if os.environ.get('NUMPYORG_WITH_TRANSLATIONS'):
line = "#" + line

f.write(line)
def merge_dicts(d1, d2):
for key, value in d2.items():
if key in d1:
if isinstance(value, list):
d1[key].extend(value)
elif isinstance(value, dict):
merge_dicts(d1[key], value)
else:
f.write(line)
d1[key] = value

return d1


def include_files(d):
external = {}
for key, val in d.items():
if isinstance(val, dict):
d[key] = include_files(val)
elif key == "include-files":
for otherfile in val:
external_data = yaml.load(
open(otherfile, "r", encoding="utf-8"), Loader=yaml.SafeLoader
)
external = merge_dicts(external, external_data)

d.pop("include-files", None)
return {**d, **external}


config = include_files(config)
if os.environ.get("NUMPYORG_WITH_TRANSLATIONS"):
del config["disableLanguages"]


yaml.dump(config, open('config.yaml', 'w', encoding='utf-8'), sort_keys=False)
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Settings in the [build] context are global and are applied to all contexts
# unless otherwise overridden by more specific contexts.
[build.environment]
PYTHON_VERSION = "3.8"
PYTHON_VERSION = "3.8" # netlify currently only support 2.7 and 3.8
# Same Hugo version as in .github/workflows/gh-pages.yml
HUGO_VERSION = "0.104.3"
HUGO_VERSION = "0.115.4"

# Here is another way to define context specific environment variables.
[context.deploy-preview.environment]