Skip to content
Open
Show file tree
Hide file tree
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
11 changes: 3 additions & 8 deletions .github/actions/build-website/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,17 @@ name: Build website
runs:
using: composite
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v5
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.12'
cache: 'pip'

- name: Install dependencies
shell: bash
run: |
pip install -r requirements.txt

- name: Install old base theme
shell: bash
run: |
nikola theme -i bootstrap3

- name: Build website
shell: bash
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ on:

jobs:
publish-website:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Checkout repo
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Build website
uses: ./.github/actions/build-website
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Build website
uses: ./.github/actions/build-website

- name: Setup Pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@v6

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v5
with:
path: output

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
__pycache__/
cache/
output/
.doit.db
.doit.db.db
nik
state_data.json
Expand Down
85 changes: 61 additions & 24 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,22 @@
("/pages/maillists/", "Mail Lists"),
("/pages/irc/", "IRC Channel"),
("https://stackoverflow.com/questions/tagged/wxpython", "StackOverflow"),
("/pages/how-to-submit-issue/", "How to report issues"),
("/pages/how-to-submit-issue/", "How to Report Issues"),
),
"Support"),

((("/pages/contributor-guide", "Contributor Guide"),
("/pages/changes/", "Full Changelog"),
("/pages/maillists/", "wxPython-dev mail list"),
("https://wxpython.org/Phoenix/docs/html/","Docs built daily"),
("http://buildbot.wxpython.org/", "Buildbot"),
((("/pages/contributor-guide", "Contributor Guide"),
("/pages/changes/", "Full Changelog"),
# ("/pages/maillists/", "wxPython-dev Mail List"),
("https://wxpython.org/Phoenix/docs/html/", "Daily Built Docs"),
("https://github.com/wxWidgets/Phoenix/actions", "GitHub Dev Builds"),
),
"Developers"),

((('/blog/', 'wxForty-Two Blog'),
('/pages/about-42/', 'About 42'),
('/archive.html', 'Archive'),
('/categories/', 'Tags')
('/tags/', 'Tags')
),
'Blog'),

Expand All @@ -146,12 +146,47 @@
# although themes may not always support them. (translatable)
# (Bootstrap 4: right-side of navbar, Bootblog 4: right side of title)
NAVIGATION_ALT_LINKS = {
DEFAULT_LANG: ()
# The wxpy-theme uses these for the sidebar
DEFAULT_LANG: (
((
("/pages/overview/#hello-world", "fa-solid fa-child-reaching", "Hello World"),
("https://docs.wxpython.org/", "fa-solid fa-code", "API Reference"),
("https://wiki.wxpython.org/", "fa-solid fa-book-atlas", "wxPython Wiki"),
("https://github.com/wxWidgets/Phoenix/issues/", "fa-solid fa-bug", "Report a Bug"),
("https://github.com/wxWidgets/Phoenix/", "fa-brands fa-github", "GitHub Repository"),
("https://discuss.wxpython.org/", "fa-solid fa-comments", "Discuss wxPython"),
# ("https://groups.google.com/forum/#!forum/wxpython-users/", "fa-solid fa-envelope", "wxPython-users"),
# ("https://groups.google.com/forum/#!forum/wxpython-dev/", "fa-solid fa-envelope", "wxPython-dev"),
),
"Quick Links"),

((
("https://wxwidgets.org/", "fa-solid fa-cubes", "wxWidgets"),
("https://github.com/wxFormBuilder/wxFormBuilder/", "fa-solid fa-cube", "wxFormBuilder"),
("https://wxglade.sourceforge.net/", "fa-solid fa-cube", "wxGlade"),
),
'More wx Goodies'),

((
("https://www.wxwidgets.org/blog/", "fa-solid fa-star", "wxWidgets Blog"),
("https://www.blog.pythonlibrary.org/", "fa-solid fa-star", "Mouse vs. Python"),
("https://www.findmyelectric.com/", "fa-solid fa-star", "Find My Electrics"),
),
'Friends of wxPython'),

((
("/news.xml", "fa-solid fa-rss", "News Feed"),
("/blog.xml", "fa-solid fa-rss", "Blog Feed"),
("/tags/", "fa-solid fa-tag", "Tags"),
("/archive.html", "fa-solid fa-tag", "Archive"),
),
'Follow Us'),
),
}


# Name of the theme to use.
#THEME = "bootstrap3"
#THEME = "bootstrap4"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 or 5?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nikola provides a base-theme that uses bootstrap 4. The custom wxPython theme (now) overwrites it with bootstrap 5.

#THEME = "material-theme"
#THEME = "custom"
THEME = "wxpy-theme"
Expand All @@ -160,7 +195,7 @@
# A theme color. In default themes, it might be displayed by some browsers as
# the browser UI color (eg. Chrome on Android). Other themes might also use it
# as an accent color (the default ones don't). Must be a HEX value.
THEME_COLOR = '#5670d4'
THEME_COLOR = '#04519b'

# Theme configuration. Fully theme-dependent. (translatable)
# Samples for bootblog4 (enabled) and bootstrap4 (commented) follow.
Expand Down Expand Up @@ -283,6 +318,7 @@
# Used by babel.dates, CLDR style: http://cldr.unicode.org/translation/date-time-1/date-time
# You can also use 'full', 'long', 'medium', or 'short'
# DATE_FORMAT = 'yyyy-MM-dd HH:mm'
DATE_FORMAT = 'yyyy-MM-dd'

# Date format used to display post dates, if local dates are used. (translatable)
# Used by Luxon: https://moment.github.io/luxon/docs/manual/formatting
Expand Down Expand Up @@ -378,7 +414,7 @@
# Nikola supports logo display. If you have one, you can put the URL here.
# Final output is <img src="LOGO_URL" id="logo" alt="BLOG_TITLE">.
# The URL may be relative to the site root.
#LOGO_URL = '/images/phoenix_main.png'
LOGO_URL = '/images/header-logo.png'

# When linking posts to social media, Nikola provides Open Graph metadata
# which is used to show a nice preview. This includes an image preview
Expand All @@ -402,7 +438,7 @@
# output / TRANSLATION[lang] / TAG_PATH / tag.html (list of posts for a tag)
# output / TRANSLATION[lang] / TAG_PATH / tag RSS_EXTENSION (RSS feed for a tag)
# (translatable)
# TAG_PATH = "categories"
TAG_PATH = "tags"

# By default, the list of tags is stored in
# output / TRANSLATION[lang] / TAG_PATH / index.html
Expand Down Expand Up @@ -1017,8 +1053,8 @@
# A small copyright notice for the page footer (in HTML).
# (translatable)
CONTENT_FOOTER = 'Contents &copy; {date} {author} - ' \
'Powered by <a href="https://getnikola.com" rel="nofollow">Nikola</a>, '\
'<a href="https://python.org" rel="nofollow">Python</a> and Magic. '\
'Powered by <a class="footer-link" href="https://getnikola.com" rel="nofollow">Nikola</a>, '\
'<a class="footer-link" href="https://www.python.org" rel="nofollow">Python</a> and Magic. '\
'{license}'

# Things that will be passed to CONTENT_FOOTER.format(). This is done
Expand Down Expand Up @@ -1281,14 +1317,14 @@
SEARCH_FORM = """
<!-- Google custom search -->
<form method="get" action="https://www.google.com/search"
class="navbar-form navbar-right" role="search">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-primary btn-xs">
<span class="glyphicon glyphicon-search"></span>
</button>
<input type="hidden" name="sitesearch" value="%s">
class="navbar-form navbar-right pb-lg-0 pb-3 role="search">
<div class="input-group">
<input type="text" class="form-control-sm flex-grow-1 searchbar" name="q" placeholder="Search" aria-label="Search" aria-describedby="button-addon2">
<button class="btn btn-sm btn-primary" type="submit" aria-label="Submit Search" id="button-addon2">
<i class="fa-solid fa-magnifying-glass"></i>
</button>
</div>
<input type="hidden" name="sitesearch" value="%s">
</form>
<!-- End of custom search -->
""" % SITE_URL
Expand Down Expand Up @@ -1385,7 +1421,8 @@
# Bundle JS and CSS into single files to make site loading faster in a HTTP/1.1
# environment but is not recommended for HTTP/2.0 when caching is used.
# Defaults to True.
USE_BUNDLES = not USE_TEST_SITE
# WARNING: Using bundling with Boostrap v5 breaks dropdown-menus.
USE_BUNDLES = False

# Plugins you don't want to use. Be careful :-)
# DISABLED_PLUGINS = ["render_galleries"]
Expand Down Expand Up @@ -1446,7 +1483,7 @@
# Put in global_context things you want available on all your templates.
# It can be anything, data, functions, modules, etc.
GLOBAL_CONTEXT = {
'header_logo': '<img src="/images/header-logo.png" />'
'example': '/images/header-logo.png'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might understand later in the review, but is "example" expected here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nikola has a dedicated variable LOGO_URL that is now used.
I just left a dummy entry in GLOBAL_CONTEXT

}

# Add functions here and they will be called with template
Expand Down
Binary file added files/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified files/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions files/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed files/images/OSI-Approved-License-100x137.png
Binary file not shown.
Binary file added files/images/bookshelf/automate_boring.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/creating_gui.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/cython.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/effective_python.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/game_programming.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/high_performance.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/learning_python.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/mastering_matpotlib.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/python_101.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/python_201.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/python_cookbook_third.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/python_design_patterns.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/python_gui_programming.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/python_patterns.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/python_pocket.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/tkinter_programming.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/wxpython_2-8_cookbook.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/wxpython_cookbook.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/wxpython_in_action.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/images/bookshelf/wxpython_recipes.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified files/images/header-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading