Skip to content

Commit

Permalink
Add news article template and Postman API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mwvolo committed May 17, 2024
1 parent 2ff7e1b commit 3da1aee
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ Run the tests:
python3 manage.py test --settings=openstax.settings.test
```

## Postman API Testing
To test the API, use can request access to the OpenStax Postman account.
The collection is available [here](https://openstax.postman.co/workspace/CMS~2390e38a-b720-4734-a409-7d279139e1b2/overview).

SQLite Support
=======================
SQLite is supported as an alternative to PostgreSQL. In order to switch to SQLite, change the `DATABASES` setting
Expand Down
30 changes: 30 additions & 0 deletions pages/templates/news/news_article.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% load wagtailimages_tags wagtailcore_tags static %}

{% image page.promote_image original as promote_image %}

<html>
<head>

<title>{{ page.title }}</title>
<meta name="description" content="{{ page.search_description }}">
<link rel="canonical" href="{{page.get_full_url}}" />
<meta http-equiv="refresh">

<meta property="og:url" content="{{page.get_full_url}}" />
<meta property="og:type" content="article" />
<meta property="og:title" content="{{ page.title }}" />
<meta property="og:description" content="{{ page.search_description }}" />
<meta property="og:image" content="{{ promote_image.url }}" />
<meta property="og:image:alt" content="OpenStax: {{ page.title }}" />

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@OpenStax">
<meta name="twitter:title" content="{{ page.title }}">
<meta name="twitter:description" content="{{ page.search_description }}">
<meta name="twitter:image" content="{{ promote_image.url }}">
<meta name="twitter:image:alt" content="OpenStax">
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>

0 comments on commit 3da1aee

Please sign in to comment.