Update your Docsy Git submodule or clone
themes/ as a Git submodule or clone.Use the procedure matching how Docsy was installed in your project: submodule or clone.
To simplify future updates, consider switching to the Docsy NPM package or converting your site to Hugo Modules.
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:
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.16.0Reinstall the theme’s runtime dependencies:
npm run postinstall --prefix themes/docsyRun
npm run postinstall, notnpm install; for why, see the setup note.Add and then commit the change to your project:
git add themes/docsy git commit -m "Update Docsy theme to v0.16.0"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:
Navigate to the root of your local project, then run:
git -C themes/docsy fetch --tags git -C themes/docsy checkout v0.16.0Ensure that
originis set tohttps://github.com/google/docsy.git(git -C themes/docsy remote -v).Reinstall the theme’s runtime dependencies:
npm run postinstall --prefix themes/docsyAs in the submodule procedure, run
npm run postinstall, notnpm install.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.
Feedback
Cette page est-elle utile?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.