Hinode logo
  • About 
  • Docs 
  • Components 
  • Guides 
  • Releases 
  •  
Docs
  • Getting Started
    • Introduction
    • Commands
    • Hosting and Deployment
    • Upgrading
    • Private Modules and Packages
    • Contribute
    • Troubleshooting
  • Content
    • Content Management
    • Content Organization
    • Typography
    • Links and Cross-References
    • Images and Figures
    • Tables
    • Icons
  • Configuration
    • Layout
    • Colors
    • Color Modes
    • Fonts
    • Languages
    • Navigation
    • Documentation
    • Analytics
    • Modules
    • Cookie Consent
    • Digital Asset Managers
  • Components
    • Abbr
    • Accordion
    • Alert
    • Animation
    • Args
    • Badge
    • Breadcrumb
    • Button
    • Button Group
    • Card
    • Card Group
    • Carousel
    • Collapse
    • Command Prompt
    • Docs
    • Example
    • File
    • Icon
    • Image
    • Ins
    • Kbd
    • Link
    • Map
    • Mark
    • Navbar
    • Navs and Tabs
    • Persona
    • Release
    • Spinner
    • Sub
    • Sup
    • Table
    • Timeline
    • Toast
    • Tooltip
    • Video
  • Advanced Settings
    • Overview
    • Styles
    • Scripts
    • Icons
    • Partial Development
    • Module Development
    • Server Headers
    • Server-Side Redirection
  • About
    • Credits
    • License
  • Getting Started
    • Introduction
    • Commands
    • Hosting and Deployment
    • Upgrading
    • Private Modules and Packages
    • Contribute
    • Troubleshooting
  • Content
    • Content Management
    • Content Organization
    • Typography
    • Links and Cross-References
    • Images and Figures
    • Tables
    • Icons
  • Configuration
    • Layout
    • Colors
    • Color Modes
    • Fonts
    • Languages
    • Navigation
    • Documentation
    • Analytics
    • Modules
    • Cookie Consent
    • Digital Asset Managers
  • Components
    • Abbr
    • Accordion
    • Alert
    • Animation
    • Args
    • Badge
    • Breadcrumb
    • Button
    • Button Group
    • Card
    • Card Group
    • Carousel
    • Collapse
    • Command Prompt
    • Docs
    • Example
    • File
    • Icon
    • Image
    • Ins
    • Kbd
    • Link
    • Map
    • Mark
    • Navbar
    • Navs and Tabs
    • Persona
    • Release
    • Spinner
    • Sub
    • Sup
    • Table
    • Timeline
    • Toast
    • Tooltip
    • Video
  • Advanced Settings
    • Overview
    • Styles
    • Scripts
    • Icons
    • Partial Development
    • Module Development
    • Server Headers
    • Server-Side Redirection
  • About
    • Credits
    • License

Commands

Share via
Hinode
Link copied to clipboard

Use npm commands to automate the build process and to keep track of dependencies.

On this page
Installing the Required Modules   Starting a Local Server   Generating a Web Site   Validating Linting Rules   Upgrading Dependencies  

Hinode supports Node Package Manager  to automate the build process and to keep track of dependencies. The package.json file in the repository root defines several commands to simplify local development and testing. The following paragraphs describe the main commands.

Installing the Required Modules  

You will need to install the required Hugo modules before starting a local server. The following command downloads the latest available version of the configured modules recursively, vendors the modules, and does some housekeeping of the module files.

npm run mod:update

Starting a Local Server  

Use the following command from the command prompt to start a local development server. The command removes any previous build artifacts in the public and resources folders. The command invokes the local web server from Hugo, which watches for changes in the key system files and configuration directory. By default the generated site is available at http://localhost:1313/ and is responsive to changes. This allows for interactive development and testing. When in development mode, the generated assets (such as javascripts and CSS files) are not minified to simplify debugging.

npm run start

Use the following command to mimic the site in production mode. In this setting, generated assets are minified and compliant with the Content Security Policy. Although Hugo’s web server is not meant to be run in a real production environment, it does allow validation of the site in an environment close to production.

npm run start:prod

Generating a Web Site  

Use the following command to generate the static site. The build artifacts are stored in the local public folder. You can deploy these files to your production server. The build command invokes mod:update prior to the build.

npm run build

Add the prefix debug to generate a site suitable for debugging. The build artifacts are not minified to simplify review and testing.

npm run build:debug

Validating Linting Rules  

Use the the following command to analyze the source code and to test for any stylistic errors. The lint command validates three types of files in the assets folder and content folder:

  • Javascript (assets/*.js) using Eslint  .
  • CSS and SASS (assets/scss/**/*.{css,sass,scss,sss,less}) using Stylelint  .
  • Markdown (*.md and content/**/*.md) using Markdownlint-Cli2  .

The basic configuration of these linting tools is defined in the repository root.

npm run lint

Be sure to adhere to the linting rules before submitting any code changes / Pull Requests to Hinode’s repository.

Upgrading Dependencies  

Use the following command to test for any available upgrades of used packages. The command runs npx to validate the dependencies and to upgrade the dependency versions in package.json.

npm run upgrade

Be sure to install the upgraded dependencies if needed:

npm install
• Fix commands visibility (cdb5d00)
On this page:
Installing the Required Modules   Starting a Local Server   Generating a Web Site   Validating Linting Rules   Upgrading Dependencies  
Commands
Commands
Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5.
Code licensed MIT, docs CC BY-NC 4.0
Currently v0.29.3
Privacy | Cookies
 
Links
Home 
About 
Docs 
Components 
Releases 
Guides
Getting Started 
Developing Modules 
Optimization 
Versioning 
Community
Issues   
Discussions   
Contribute 
Hinode
Code copied to clipboard