-
Notifications
You must be signed in to change notification settings - Fork 995
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* create a blog * developer experience * try to fancy it * Fix blog rendering * Posts should have relative URLs * Fixup fix * Separate link to homepage from blog * Hide site_name from nav * Highlight index in nav * Properly render blog content * Fix typo * Remove author_gh_user * Remove .git volume * Move custom styles * Remove unnecessary volume * Remove test blog post * Add the mkdocs social plugin * Clean up formatting around authors and descriptions * Extend linting to blog * Write an actual blog post! * doin a blerg --------- Co-authored-by: Dustin Ingram <[email protected]>
- Loading branch information
Showing
23 changed files
with
1,292 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Click requires us to ensure we have a well configured environment to run | ||
# our click commands. So we'll set our environment to ensure our locale is | ||
# correct. | ||
export LC_ALL="${ENCODING:-en_US.UTF-8}" | ||
export LANG="${ENCODING:-en_US.UTF-8}" | ||
|
||
# Print all the following commands | ||
set -x | ||
|
||
mkdocs build -f docs/blog.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
user-site | ||
blog-site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
site_name: The Python Package Index | ||
site_description: The official blog of the Python Package Index | ||
docs_dir: blog | ||
site_dir: blog-site | ||
theme: | ||
name: material | ||
logo: assets/logo.png | ||
favicon: assets/favicon.ico | ||
homepage: https://pypi.org | ||
custom_dir: blog/overrides | ||
markdown_extensions: | ||
- footnotes | ||
extra_css: | ||
- stylesheets/extra.css | ||
plugins: | ||
- social | ||
- blogging: | ||
dirs: | ||
- posts | ||
template: blog/overrides/pypi-blog.html | ||
features: | ||
tags: | ||
index_page: tags.md | ||
insert: top | ||
locale: en # The locale for time localizations, default: system's locale | ||
time_format: '%Y-%m-%d %H:%M:%S' # The format used to display the time | ||
meta_time_format: '%Y-%m-%d %H:%M:%S' # The format used to parse the time from meta | ||
extra: | ||
homepage: https://pypi.org | ||
social: | ||
- icon: fontawesome/brands/github | ||
link: https://github.com/pypi | ||
- icon: fontawesome/brands/twitter | ||
link: https://twitter.com/pypi | ||
site_url: https://blog.pypi.org/ | ||
repo_url: https://github.com/pypi/warehouse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# PyPI Blog | ||
|
||
This blog is hosted at https://blog.pypi.org/ to provide a way for the PyPI | ||
Administrators to share new features, breaking changes, and curiosities with | ||
the community. | ||
|
||
Posts are written in [Markdown](https://www.markdownguide.org) and built using | ||
[mkdocs](https://www.mkdocs.org). | ||
|
||
The blog is built and deployed with [readthedocs.org](https://readthedocs.org/projects/blogpypiorg/). | ||
|
||
See our [`.readthedocs.yml`](../.readthedocs.yml) for configuration. | ||
|
||
## Setup | ||
|
||
After following the [installation instructions](https://warehouse.pypa.io/development/getting-started.html#detailed-installation-instructions) | ||
all the remaining commands take place in containers. | ||
|
||
The project can be previewed by running `docker compose up blog` from the | ||
base directory of your clone of pypa/warehouse. This will start a `mkdocs` | ||
development server that will live reload as you change the contents of this | ||
directory, including the `mkdocs.yml` configuration. |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
exclude_from_blog: true | ||
--- | ||
|
||
# The PyPI Blog | ||
|
||
{{ blog_content }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!-- | ||
Copyright (c) 2016-2023 Martin Donath <[email protected]> | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to | ||
deal in the Software without restriction, including without limitation the | ||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
sell copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
IN THE SOFTWARE. | ||
--> | ||
|
||
<!-- Tags --> | ||
{% if "material/tags" in config.plugins %} | ||
{% include "partials/tags.html" %} | ||
{% endif %} | ||
|
||
<!-- Actions --> | ||
{% include "partials/actions.html" %} | ||
|
||
<!-- | ||
Hack: check whether the content contains a h1 headline. If it doesn't, the | ||
page title (or respectively site name) is used as the main headline. | ||
--> | ||
{% if "\x3ch1" not in page.content %} | ||
<h1>{{ page.title | d(config.site_name, true)}}</h1> | ||
{% endif %} | ||
|
||
{% if "author" in page.meta %} | ||
by: <b>{{ page.meta["author"] + " · " if "publish_date" in page.meta else "" }}</b> | ||
{% endif %} | ||
{% if "publish_date" in page.meta %} | ||
<span>{{ page.meta["publish_date"] }}</span> | ||
{% endif %} | ||
|
||
<!-- Page content --> | ||
{{ page.content }} | ||
|
||
<!-- Source file information --> | ||
{% if page.meta and ( | ||
page.meta.git_revision_date_localized or | ||
page.meta.revision_date | ||
) %} | ||
{% include "partials/source-file.html" %} | ||
{% endif %} | ||
|
||
<!-- Was this page helpful? --> | ||
{% include "partials/feedback.html" %} | ||
|
||
<!-- Comment system --> | ||
{% include "partials/comments.html" %} |
Oops, something went wrong.
0fc1ca8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ha, I found the commenting system. This blog would benefit from an RSS feed, such as https://guts.github.io/mkdocs-rss-plugin/
Thanks.