hyprland-wiki icon indicating copy to clipboard operation
hyprland-wiki copied to clipboard

[Question] Offline Documentation

Open NikkSaan opened this issue 11 months ago • 3 comments

Is there any way to get an offline copy of the wiki for a specific hyprland version?

NikkSaan avatar Dec 29 '24 16:12 NikkSaan

git checkout ?

vaxerski avatar Dec 29 '24 18:12 vaxerski

How do I select a version?

↪ git checkout
main                                               (Local Branch)
origin/HEAD                                       (Remote Branch)
origin/aq                                         (Remote Branch)
origin/cursor                                     (Remote Branch)
origin/explicit                                   (Remote Branch)
origin/fixlinks                                   (Remote Branch)
origin/hextra                                     (Remote Branch)
origin/hyprpm                                     (Remote Branch)
origin/libinput                                   (Remote Branch)
origin/main                                       (Remote Branch)
origin/move-to-xdg                                (Remote Branch)
origin/nix                                        (Remote Branch)
origin/nix2                                       (Remote Branch)
origin/overhaul                                   (Remote Branch)
origin/pluginSystem                               (Remote Branch)
origin/pr34                                       (Remote Branch)
origin/revamp                                     (Remote Branch)
origin/seatetc                                    (Remote Branch)
origin/xwayland                                   (Remote Branch)
HEAD                                       (Unique Remote Branch)
…and 66 more rows

NikkSaan avatar Dec 30 '24 18:12 NikkSaan

look at the tree and locate the "add 0.xx.0 to the version selector" type commits

vaxerski avatar Dec 30 '24 18:12 vaxerski

For future reference: quick one liner to checkout a specific version. Only goes as back as version 37.

git log --follow --pretty=format:"%H | %ad | %s" --date=short -- pages/version-selector.md | fzf --delimiter='|' | awk -F'|' '{print $1}' | xargs git checkout

@fufexan worth mentioning this somewhere in version-selector / some other place or nah? If not, can be closed.

Bugg4 avatar Jul 23 '25 19:07 Bugg4

@fufexan worth mentioning this somewhere in version-selector / some other place or nah?

Sure, why not.

fufexan avatar Jul 24 '25 14:07 fufexan

Actually, I could probably merge that script with instructions to install and run Hugo + Hextra, as to have a complete guide to self-host a specific version of the wiki, also solving #1155

A dedicated page would be tidier in this case: Pages/self-hosting.md, and then I'd reference that in version-selector.md. Sound good?

Oh nvm, just saw #1171 lol, thank you 👌🏻 I'll just add the script then.

Bugg4 avatar Jul 24 '25 15:07 Bugg4

I think a more universal solution would be for the wiki page to provide a download link for a specific version in a pdf or a single file html.

NikkSaan avatar Jul 25 '25 21:07 NikkSaan

I think a more universal solution would be for the wiki page to provide a download link for a specific version in a pdf or a single file html.

After some consideration, I tend too agree. The problems I found with self hosting through checking out a specific commit of the git repo are the following:

  • Cannot go back to versions earlier than v0.37.0.
  • Versions earlier than v0.51.0 (backend introduction with #1171 ) would require "transplanting" older content from Pages/ into a newer backend, this, potentially:
    • Could break sections that use unsupported / older versions of shortcodes and / or shortcode features.
    • Doesn't stay true to the way the wiki was actually presented at the time. Which would be undesirable for archival purposes.
    • Could become an even bigger problem if in case the wiki switches backend / theme in the future.

So I'd be for providing a link to a zipped html folder, if that's possible

Bugg4 avatar Jul 27 '25 18:07 Bugg4

All the wiki versions provide a /sitemap.xml. That could be used with a script to download an entire version. This also allows going back to 0.16.

fufexan avatar Jul 28 '25 15:07 fufexan

All the wiki versions provide a /sitemap.xml. That could be used with a script to download an entire version. This also allows going back to 0.16.

Ohh nice, I'll see if I can arrange a script to dl a version using the sitemap then

Bugg4 avatar Jul 28 '25 16:07 Bugg4