Coder Social home page Coder Social logo

paulpascal / cht-docs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from medic/cht-docs

0.0 1.0 0.0 101.36 MB

Documentation site for the Community Health Tookit

Home Page: https://docs.communityhealthtoolkit.org

Shell 5.69% HTML 87.03% SCSS 7.28%

cht-docs's Introduction

Documentation for the Community Health Toolkit

CHT Documentation Site Build

About

This repo contains documentation for the Community Health Toolkit (CHT), and how to build digital health applications with CHT Core. This repository powers the CHT documentation site at docs.communityhealthtoolkit.org.

The documentation is built using Markdown pages, which can be converted into a navigable website using a static-site-generator. The Hugo static-site-generator is being used with the Docsy theme. To maintain portability, content should be written in plain Markdown with limited use of HTML, custom shortcodes, and modifications to the theme. Contributions should align with the documentation style guide.

Build dependencies

The documentation site uses Hugo, and specifically uses features found in the extended version of Hugo, v0.76.0 and later. See .tool-versions for the currently used version

asdf is the recommended way to manage hugo and golang versions for local development.

After installing it run:

asdf plugin add golang
asdf plugin add hugo

Installing Hugo Manually

If using asdf fails you can try installing Hugo manually. To install, follow the installation instructions for your Operating System, and be sure to get the extended version. Most users will be able to simply install using their native package manager like brew, apt or snap.

Building the Documentation

  1. Clone the cht-docs repo
  2. From the command line, navigate to the local directory where you cloned the repo
  3. Type hugo server
  4. Preview your site in your browser at: http://localhost:1313/
  5. As you make changes to the site, your browser will automatically reload your local dev site so you can easily and quickly see your changes.

MacOS users getting errors when running hugo server, please see our Troubleshooting guide.

Link Checking [Optional]

We validate that all links on the docs site work (do not 404) using a tool called Muffet along with Actions. If you're creating a lot of new links, or editing a lot of existing links, you may optionally run Muffet locally before pushing your commits. Running Muffet locally can save time by exposing broken links before pushing a build since you can avoid waiting for the Action to run, finding you have a broken link, fixing it, and pushing a new change.

  1. Install Go as a prerequisite
  2. Install Muffet: go get -u github.com/raviqqe/muffet
    • If using asdf you need to reshim (asdf reshim golang)
  3. Ensure you've run hugo server so your local docs instance is reachable at http://localhost:1313/
  4. Test the links with the muffet.sh script. If you're in the root of this repo, that'd be: ./.github/scripts/muffet.sh

It should take about 60 seconds depending on your Internet connection. If Muffet returns no output, you have no broken links, congrats!

Note: The muffet.sh script here is the identical script we run on GitHub. If you simply run muffet http://localhost:1313 you will hit GitHub's rate limiting and get lots of 429's. Our script intentionally reduces concurrency and excludes some repetitive GitHub URLs.

Continuous Deployment

All changes to main branch run a GitHub action to first check for any broken links (per above) and then deploy to the documentation site: docs.communityhealthtoolkit.org

Upgrading dependencies

Hugo

The version of Hugo used to deploy the site is specified in .tool-versions.

(Note there is also a minimum version of Hugo required to deploy the site specified via module.hugoVersion in the config.toml file.)

See the Hugo Release Notes for documentation regarding what has changed in the new versions.

Docsy

The current version of Docsy is pinned in the go.mod file. To upgrade to a new version of Docsy, use the hugo mod get command as described in the Docsy documentation.

See the Docsy CHANGELOG for documentation regarding what has changed in the new versions.

cht-docs's People

Contributors

1yuv avatar abbyad avatar andrablaj avatar andy5995 avatar binokaryg avatar cescagarrett avatar craig-landry avatar dianabarsan avatar esthermmoturi avatar garethbowen avatar helizabetholsen avatar ireneachola avatar isaacholeman avatar jkuester avatar kennsippell avatar kitsao avatar latin-panda avatar m5r avatar maxdiz avatar michaelkohn avatar mrjones-plip avatar mrsarm avatar n-orlowski avatar newtewt avatar njogz avatar nomulex avatar nsitaula avatar phil-mwago avatar prjshrestha avatar smbuthia avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.