-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Adding new page
-
Get an approval from Diana (diana@oppia.org) and Sean (sean@oppia.org) regarding the Page Title and the Page Meta tag content that will be used by the new page before creating a PR.
-
In the PR that introduces the new page, make sure that it handles the page title and meta tag changes. If it is a public user-facing page, the sitemap should also be updated.
-
For static pages, the HTML should contain
<title>
and<meta>
tags. Example:<title itemprop="name">Title of the page.</title> <meta charset="UTF-8"> <meta name="referrer" content="no-referrer"> <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=yes"> <meta name="description" content="Meta tag content goes here."> <meta itemprop="name" content="Title of the page."> <meta property="og:title" content="Title of the page."> <meta property="og:type" content="article"> <meta property="og:site_name" content="Oppia"> <meta property="og:description" content="Meta tag content goes here.">
-
For dynamic pages, follow this example:
-
-
In the PR description, explain the following in detail:
-
Is the page learner facing and public?
-
How can it be accessed i.e. the user journey to get to the new page?
-
A clear description of the contents of the page.
-
What is the page title and meta tag content that will be used in the new page?
-
Does the sitemap.xml need to be updated?
-
-
Add @dchen97 and @seanlip as reviewers for the PR.
- generic-page.import.ts — imports necessary for the page initialization
- generic-page.mainpage.html — the main HTML
- generic-page.module.ts — Angular module definition
When you're adding new HTML page (not directive HTML) that uses TypeScript you also need to add it to webpack.common.config.ts
:
- You need to define the TypeScript entry point for the page into
module.exports.entries
. - You need to add
new HtmlWebpackPlugin({…})
intomodule.exports.plugins
.
For example when adding pages/generic-page/generic-page.mainpage.html with asocciated TypeScript file pages/generic-page/generic-page.scripts.ts, you will need to add page: commonPrefix + '/pages/generic-page/generic-page.scripts.ts'
to module.exports.entries
and
new HtmlWebpackPlugin({
chunks: ['page'],
meta: { // if default meta is used this can be ommited
name: 'name',
description: 'description'
},
filename: 'generic-page.mainpage.html',
template: commonPrefix + '/pages/generic-page/generic-page.mainpage.html',
minify: htmlMinifyConfig,
inject: false
})
into module.exports.plugins
.
The new page should be added both to the .lighthouserc.js and .lighthouserc-accessibility.js. The page URL should be added to ci.collect.url
and in the .lighthouserc.js
{
'matchingUrlPattern': 'http://[^/]+/url',
'assertions': {
'uses-webp-images': [
'error', {'maxLength': 0, 'strategy': 'pessimistic'}
],
'uses-passive-event-listeners': ['error', {'minScore': 1}],
'deprecations': ['error', {'minScore': 1}]
}
}
into ci.collect.assert.assertMatrix
.
Have an idea for how to improve the wiki? Please help make our documentation better by following our instructions for contributing to the wiki.
Core documentation
Developing Oppia
- FAQs
- Installing Oppia
- Getting started with the codebase
- Making your first PR
- Learning resources for developers
- Codebase Overview
- Coding Guidelines
- Coding style guide
- Guidelines for creating new files
- How to add a new page
- How to write frontend type definitions
- How to write design docs
- Revert and Regression Policy
- Server errors and solutions
-
Debugging
- If your presubmit checks fail
- If CI checks fail on your PR
- Finding the commit that introduced a bug
- Interpreting GitHub Actions Results
- Debugging Docs
- Debugging datastore locally
- Debugging end-to-end tests
- Debugging backend tests
- Debugging frontend tests
- Debug frontend code
- Debugging custom ESLint check tests
- Debugging custom Pylint check tests
- Debugging Stories
- Guidelines for launching new features
- Guidelines for making an urgent fix (hotfix)
- Lint Checks
- Oppia's code owners and checks to be carried out by developers
- Privacy aware programming
- Backend Type Annotations
- Bytes and string handling in Python 3
- Guidelines for Developers with Write Access to oppia/oppia
- Testing
- Release Process
Developer Reference
- Oppiabot
- Frontend
- Backend
- Translations
- Webpack
- Third-party libraries
- Extension frameworks
- Oppia-ml Extension
- Mobile development
- Mobile device testing
- Performance testing
- Build process
- Team structure
- Triaging Process
- Playbooks
- Wiki
- Past Events