aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps
diff options
context:
space:
mode:
Diffstat (limited to 'pydis_site/apps')
-rw-r--r--pydis_site/apps/content/resources/_info.yml2
-rw-r--r--pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md10
-rw-r--r--pydis_site/apps/content/utils.py4
-rw-r--r--pydis_site/apps/content/views/page_category.py2
4 files changed, 9 insertions, 9 deletions
diff --git a/pydis_site/apps/content/resources/_info.yml b/pydis_site/apps/content/resources/_info.yml
index 4ccdd7e1..583cab18 100644
--- a/pydis_site/apps/content/resources/_info.yml
+++ b/pydis_site/apps/content/resources/_info.yml
@@ -1,2 +1,2 @@
name: Pages
-description: Guides, articles and pages hosted on the site.
+description: Guides, articles, and pages hosted on the site.
diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md b/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md
index ac663898..8967e7da 100644
--- a/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md
+++ b/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md
@@ -8,7 +8,7 @@ relevant_links:
Using Git: https://pythondiscord.com/pages/contributing/working-with-git/
---
-Pages, which include guides, articles and other static content are stored in markdown files in the `site` repository on Github.
+Pages, which include guides, articles, and other static content, are stored in markdown files in the `site` repository on Github.
If you are interested in writing or modifying pages seen here on the site, follow the steps below.
For further assistance and help with contributing pages, send a message to the `#dev-contrib` channel in the Discord server!
@@ -36,7 +36,7 @@ All the markdown files in this folder will then be under this category.
## Writing the Page
Files representing pages are in `.md` (Markdown) format, with all-lowercase filenames and spaces replaced with `-` characters.
-Each page must include required metadata, and optionally additional metadata to modify appearance of the page.
+Each page must include required metadata, and optionally additional metadata to modify the appearance of the page.
The metadata is written in YAML-like key-value pairs, and should be enclosed in triple dashes `---` *at the top of the markdown file*.
**Example:**
@@ -51,14 +51,14 @@ relevant_links:
Using Git: https://pythondiscord.com/pages/contributing/working-with-git/
---
-Pages, which include guides, articles and other static content...
+Pages, which include guides, articles, and other static content,...
```
You can learn more about Markdown metadata [here](https://github.com/trentm/python-markdown2/wiki/metadata).
### Required Fields
- **title:** Easily-readable title for your article.
-- **description:** Short, 1-2 line description that describes the page.
+- **description:** Short, 1-2 line description of the page's content.
### Optional Fields
- **icon_class:** Favicon class for the category entry for the page. Default: `fab`
@@ -67,7 +67,7 @@ You can learn more about Markdown metadata [here](https://github.com/trentm/pyth
## Extended Markdown
-Apart from standard markdown, certain additions are available:
+Apart from standard Markdown, certain additions are available:
### Tables
diff --git a/pydis_site/apps/content/utils.py b/pydis_site/apps/content/utils.py
index 17d7db81..6cb15581 100644
--- a/pydis_site/apps/content/utils.py
+++ b/pydis_site/apps/content/utils.py
@@ -15,7 +15,7 @@ def get_category(path: Path) -> Dict[str, str]:
def get_categories(path: Path) -> Dict[str, Dict]:
- """Get all categories information."""
+ """Get information for all categories."""
categories = {}
for name in path.iterdir():
@@ -38,7 +38,7 @@ def get_pages(path: Path) -> Dict[str, Dict]:
def get_page(path: Path) -> Dict[str, Union[str, Dict]]:
- """Get one specific page. When category is specified, get it from there."""
+ """Get one specific page."""
if not path.exists() or not path.is_file():
raise Http404("Page not found.")
diff --git a/pydis_site/apps/content/views/page_category.py b/pydis_site/apps/content/views/page_category.py
index 7e04e2f3..7e8fe07d 100644
--- a/pydis_site/apps/content/views/page_category.py
+++ b/pydis_site/apps/content/views/page_category.py
@@ -19,7 +19,7 @@ class PageOrCategoryView(TemplateView):
return super().dispatch(request, *args, **kwargs)
def get_template_names(self) -> t.List[str]:
- """Checks does this use page template or listing template."""
+ """Checks if the view uses the page template or listing template."""
if self.full_location.is_dir():
template_name = "content/listing.html"
elif self.full_location.with_suffix(".md").is_file():