Skip to content

Commit

Permalink
docs: update docs for deployment
Browse files Browse the repository at this point in the history
* Update env var for organization logos.
* Update installation instructions.
  • Loading branch information
[email protected] authored and [email protected] committed Jul 23, 2024
1 parent 9e91340 commit 8f5e839
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
28 changes: 27 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ Environment Variables
* ``AUTHN_MINIMAL_HEADER`` - A boolean flag which hides the main menu, user menu, and logged-out
menu items when truthy. This is intended to be used in micro-frontends like
frontend-app-authentication in which these menus are considered distractions from the user's task.
* ``ENABLE_ORG_LOGO`` - A boolean flag to enable the display of the org logo on the center of the
header nav bar. Defaults to **false**

************
Installation
************

To install this header into your Open edX micro-frontend, run the following command in your MFE:

``npm i --save @edx/frontend-component-header``
``npm i --save @nauedu/frontend-component-header``

This will make the component available to be imported into your application.

Expand Down Expand Up @@ -73,6 +75,30 @@ Build a production distribution::

npm run build

***********
Publishing to npmjs.com
***********

Any changes to this library have to be pushed to npmjs.com to be reflected on the build.

Publish to npm::

npm publish


***********
Deploy in production
***********
To replace the default edx header with the new one, use one of the following instructions:

Add the necessary settings to the mfe_brand plugin::

RUN npm install '@edx/frontend-component-header@npm:@nauedu/frontend-component-header'

Alternatively, you can specify the version::

RUN npm install '@edx/frontend-component-header@npm:@nauedu/[email protected]'

.. |Build Status| image:: https://api.travis-ci.com/edx/frontend-component-header.svg?branch=master
:target: https://travis-ci.com/edx/frontend-component-header
.. |Codecov| image:: https://img.shields.io/codecov/c/github/edx/frontend-component-header
Expand Down
2 changes: 1 addition & 1 deletion src/learning-header/LearningHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LinkedLogo.propTypes = {
};

// this feature flag is not included on the frontend-platform, we have to get it directly from ENV
const enabledOrgLogo = !!process.env.ENABLED_ORG_LOGO || false;
const enabledOrgLogo = !!process.env.ENABLE_ORG_LOGO || false;

function LearningHeader({
courseOrg, courseTitle, intl, showUserDropdown,
Expand Down

0 comments on commit 8f5e839

Please sign in to comment.