aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/views (follow)
Commit message (Collapse)AuthorAgeLines
* Clean up pragma intended for Python 3.10 removalGravatar Johannes Christ2023-07-27-3/+1
|
* Switch to ruff for lintingGravatar Johannes Christ2023-05-10-2/+1
|
* Support Hyperlinked Tag Group ReplacementGravatar Hassan Abouelela2022-08-23-3/+23
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Add Tag Group SupportGravatar Hassan Abouelela2022-08-14-16/+68
| | | | | | | Adds support for tag groups in content. This involves some modification to the routing, and templating. Signed-off-by: Hassan Abouelela <[email protected]>
* Clean Up Tag Link SubstitutionGravatar Hassan Abouelela2022-08-13-4/+3
| | | | | Co-authored-by: ChrisJL <[email protected]> Signed-off-by: Hassan Abouelela <[email protected]>
* Export Tag Model As Top Level Model ObjectGravatar Hassan Abouelela2022-08-13-1/+1
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Add Tag Page TemplateGravatar Hassan Abouelela2022-08-13-1/+58
| | | | | | Add a template for the tag page itself, and add a route to use it. Signed-off-by: Hassan Abouelela <[email protected]>
* Add Tags To Content ListingsGravatar Hassan Abouelela2022-08-13-5/+4
| | | | | | | Adds bot tags to the content page, as well as a model to go along with it. Signed-off-by: Hassan Abouelela <[email protected]>
* Bump flake8-bandit To v3Gravatar Hassan Abouelela2022-07-11-2/+2
| | | | | | | | | | | Bumps flake-bandit to v3 to fix an incompatibility with the bandit package. This also bumps flake8-annotations to a legally acceptable version, which introduces ANN401, which disallows `typing.Any` annotations (for the most part, refer to the docs). Signed-off-by: Hassan Abouelela <[email protected]>
* Fix misleading coverage report.Gravatar kosayoda2021-05-14-1/+3
| | | | | | | | | | Due to an optimization in CPython that is amended in 3.10, coverage.py is sometimes unable to determine the coverage of continue statements in branches. See: https://github.com/nedbat/coveragepy/issues/198 Adding a no-op like a print or an empty statement would solve the coverage issue, but I've opted to just ignore the line. This should be tested and the line removed when the site is updated to Python 3.10.
* Avoid duplicate entries for page and category.Gravatar kosayoda2021-04-14-1/+1
| | | | | | | | We have to add another check since `subarticles` is actually a list of dictionaries and not a dictionary, so key overriding does not work. We want the categories to take precedence over the pages in case of future feature expansion involving showing sub-sub-articles.
* Use metadata titles in Sub-Articles dropdown.Gravatar kosayoda2021-04-02-4/+11
| | | | | | This allows us to keep filenames (thus URLs) as concise as possible, while having a more descriptive entry in the Sub-Articles dropdown for category pages.
* Fix overriden PAGES_PATH in settings.py.Gravatar kosayoda2021-04-01-2/+2
| | | | | This was causing mysterious 404s because while migrating a feature to dewikification, the same variable would be placed in the settings file.
* Add a dropdown menu listing direct children.Gravatar kosayoda2021-04-01-0/+7
| | | | | This only shows when the page is also a category, since regular pages have no children and regular categories already list their children.
* Place category pages in the same directory as categories.Gravatar kosayoda2021-04-01-7/+4
|
* Allow adding a table of contents to a page.Gravatar kosayoda2021-03-29-0/+1
|
* Allow displaying a page at a category path.Gravatar kosayoda2021-03-29-19/+38
| | | | | | This is useful for our /contributing pages, which have a main contributing page at /contributing but project pages under the same path, /contributing/bot etc.
* Improve content page and listing metadata keys.Gravatar kosayoda2021-03-27-2/+3
| | | | | | | Make category `title` consistent with page `title`. Simplify `icon` key, since there is no benefit to defining the icon class and the icon separately. Allow overriding the `icon` for category entries just like page entries.
* Refactor content app tests.Gravatar kosayoda2021-03-25-1/+1
| | | | | | The tests uses pyfakefs to simulate a fake filesystem that is reused over the content app tests. Test coverage for the app is brought to 100%.
* Replace `markdown2` with `markdown` and `python-frontmatter`.Gravatar kosayoda2021-03-24-7/+8
| | | | | | This allows us to properly escape codeblocks within markdown, permalink to headers on a page, and decouples getting metadata from a file and getting generated HTML from the Markdown content.
* Simplify pathlib code and specify file encoding.Gravatar kosayoda2021-03-24-3/+2
|
* Improve variable and key names for page utils.Gravatar kosayoda2021-03-24-1/+1
|
* Refactor common HTML into a base template.Gravatar kosayoda2021-03-24-1/+6
|
* Improve phrasing and wording of documentation.Gravatar kosayoda2021-03-24-1/+1
|
* Simplify content app.Gravatar kosayoda2021-03-23-55/+25
| | | | | | | | | Rather than having two views for the base page and all other pages, all pages now use the same view. The view context handler is simplified to take advantage of pathlib features. The markdown folder is now /content/resources/* rather than /content/resources/content/*, as the latter is unnecessary nesting.
* Rename `articles` to `pages`.Gravatar kosayoda2021-03-23-18/+18
| | | | | | Articles was a good name, but we want an `articles` category in the future. `/pages/guides/` and `/pages/articles/` are clearer in name than `/articles/guides/` and `/articles/articles/`.
* Simplify relevant_links configuration in markdown.Gravatar kosayoda2021-03-23-6/+1
|
* Remove Github metadata feature.Gravatar kosayoda2021-03-23-1/+0
| | | | | This feature is still under implementation debate, so it will be further discussed in another issue and implemeneted in a future PR.
* Change views __init__.pyGravatar ks1292020-11-28-3/+2
|
* Update template name of articles indexGravatar ks1292020-11-28-6/+2
|
* Delete old article and category viewsGravatar ks1292020-11-28-59/+0
|
* Create view for showing articles and categoriesGravatar ks1292020-11-28-0/+75
|
* Port views to TemplateView for content appGravatar ks1292020-10-30-44/+40
|
* Implement fetching contributors and last modification date from GitHubGravatar ks1292020-10-06-1/+2
|
* Simplify relevant links generator empty values filteringGravatar ks1292020-10-06-11/+6
|
* Fix content app lintingGravatar ks1292020-10-05-7/+20
|
* Remove last modified field from articleGravatar ks1292020-10-05-14/+0
|
* Migrate content system from Python-Markdown to markdown2Gravatar ks1292020-10-05-6/+11
|
* Move from standard OS path actions to PathlibGravatar ks1292020-10-04-2/+3
|
* Change guides system to content systemGravatar ks1292020-10-04-0/+87
As this system will be used for more than just guides, I had to do some refactoring to match this system with plans. Basically now there isn't guides, but articles instead.