If you'd like your site to be added to this list please create an issue with your website name and URL.
usa-external_link
Make sure all dependencies have been installed before moving on:
Clone this repo into your WordPress themes directory.
Install Composer dependencies:
# @ app/themes/nasapress or wp-content/themes/nasapress
$ composer install
Run yarn
from the theme directory to install dependencies. If you won't be making changes to the theme's static assets (css, javascript, images) then run yarn install --production
.
Update resources/assets/config.json
settings:
devUrl
should reflect your local development hostnamepublicPath
should reflect your WordPress folder structure (/wp-content/themes/nasapress
for non-Bedrock installs)Search the theme folder for todo-config
. These comments mark the locations where you'll likely need to make customizations for your site.
Create a menu and assign it to the 'Primary Navigation' location.
Install and activate the Yoast SEO plugin. Follow steps 1-5 in this guide to enable yoast breadcrumbs.
If you want to show related pages at the bottom of pages install and activate the YARPP plugin. On the plugin settings, you might see a message about 'consider titles' and 'consider bodies' being disabled due to InnoDB... If you are using MySQL 5.6 or greater, expand the message and click the 'Create FULLTEXT indices' button to enable them.
Under display options, select 'Pages', then click the Custom button and make sure 'You Might Also Like' is selected as the template file.
todo
todo
Although not technically a template the theme expects a static front page and styles it differently than the others. Use the following as a starting point for this page.
<div class="usa-overlay"></div>
<section class="usa-hero">
<div class="usa-grid">
<div class="usa-width-one-half">
<h1>Shaping the world of tomorrow</h1>
</div>
</div>
<div class="usa-grid">
<div class="usa-width-one-half">
<p class="usa-font-lead">By developing technologies that will enable further exploration of the universe and revolutionize air travel</p>
</div>
</div>
<div class="usa-grid">
<div class="usa-width-two-thirds">
<div class="video-container">
https://www.youtube.com/watch?v=5VHPanW6F4E
</div>
</div>
</div>
</section>
The landing page template features a large hero image with leading paragraph followed by text. Make sure your featured image is large enough to not pixellate too much at larger screen sizes.
The default template has no top hero section.
The default and landing page templates automatically convert h2, h3, and h4 tags into left 'in page' navigation. For shorter pages, this may not be desired, and can be turned off in the "On this page" settings on the edit page screen. In this section, you can also change which heading tags to convert to navigation.
A NASA Official can be added or changed on the edit page category screen. You can select from any users of your WordPress site.
themes/your-theme-name/ # → Root of your Sage based theme
├── app/ # → Theme PHP
│ ├── lib/App/ # → NASAPress functions
│ ├── lib/Sage/ # → Blade implementation, asset manifest
│ ├── admin.php # → Theme customizer setup
│ ├── filters.php # → Theme filters
│ ├── helpers.php # → Helper functions
│ └── setup.php # → Theme setup
├── composer.json # → Autoloading for `app/` files
├── composer.lock # → Composer lock file (never edit)
├── dist/ # → Built theme assets (never edit)
├── node_modules/ # → Node.js packages (never edit)
├── package.json # → Node.js dependencies and scripts
├── resources/ # → Theme assets and templates
│ ├── assets/ # → Front-end assets
│ │ ├── config.json # → Settings for compiled assets
│ │ ├── build/ # → Webpack and ESLint config
│ │ ├── fonts/ # → Theme fonts
│ │ ├── images/ # → Theme images
│ │ ├── scripts/ # → Theme JS
│ │ └── styles/ # → Theme stylesheets
│ ├── functions.php # → Composer autoloader, theme includes
│ ├── index.php # → Never manually edit
│ ├── screenshot.png # → Theme screenshot for WP admin
│ ├── style.css # → Theme meta information
│ └── views/ # → Theme templates
│ ├── layouts/ # → Base templates
│ └── partials/ # → Partial templates
└── vendor/ # → Composer packages (never edit)
yarn run start
— Compile assets when file changes are made, start Browsersync sessionyarn run build
— Compile and optimize the files in your assets directoryyarn run build:production
— Compile assets for productionMake site title customizable in wp-admin. Make right side of footer customizable in wp-admin.