Update your Docsy Git submodule or clone

Choose the procedure matching how your project vendors Docsy under themes/: submodule or clone.

Update your Docsy submodule

If you are using the Docsy theme as a submodule in your project, here’s how you update the submodule to the latest release:

  1. Navigate to the root of your local project, then update the submodule to the release tag that you are targeting, for example:

    git -C themes/docsy fetch --tags
    git -C themes/docsy checkout v0.17.0
    

    Stage the update now, before any project tooling re-syncs submodules (the parent repo’s staged gitlink is the durable pin; an unstaged checkout is reset to the old pin on the next git submodule update):

    git add themes/docsy
    

    If a pin file or other project tooling names the Docsy ref separately, update that source of truth too.

  2. Reinstall the theme’s runtime dependencies:

    npm run install:theme-deps --prefix themes/docsy
    

    Run npm run install:theme-deps, not npm install; for why, see the setup note.

  3. Commit the staged change to your project:

    git commit -m "Update Docsy theme to v0.17.0"
    
  4. Push the commit to your project repo.

Update your Docsy clone

If you cloned the Docsy theme into the themes folder in your project, update the clone to the release tag that you are targeting:

  1. Navigate to the root of your local project, then run:

    git -C themes/docsy fetch --tags
    git -C themes/docsy checkout v0.17.0
    

    Ensure that origin is set to https://github.com/google/docsy.git (git -C themes/docsy remote -v).

  2. Reinstall the theme’s runtime dependencies:

    npm run install:theme-deps --prefix themes/docsy
    

    As in the submodule procedure, run npm run install:theme-deps, not npm install.

  3. Persist the update to your project, the same way that your project already tracks the cloned theme: for example, commit the updated theme files to your project repository, or record the new tag where your build restores the clone from.

If you have local changes in the cloned theme, commit or stash them first: checking out a tag fails on uncommitted changes, and detaches HEAD from any local branch. After checking out the new tag, reapply your changes (for example, git stash pop, or rebase your branch onto the tag), resolving any conflicts.

After updating the theme, continue with the remaining update steps, starting with Review your theme overrides.