Compare commits
9 Commits
f5740ec6fe
...
ba81f25588
Author | SHA1 | Date | |
---|---|---|---|
|
ba81f25588 | ||
|
c8b8a9495d | ||
|
b0de003864 | ||
|
96340352f8 | ||
|
c05bda03b7 | ||
|
b52c17e487 | ||
|
34c5bcc623 | ||
|
77f0b8d041 | ||
|
31f60b125a |
5
.github/workflows/update.yml
vendored
@ -26,9 +26,12 @@ jobs:
|
||||
HM_RELEASE: release-23.11
|
||||
run: ./scripts/build_hm_options.sh
|
||||
|
||||
- name: Build Hugo
|
||||
run: nix run nixpkgs#hugo -- --minify
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_branch: pages-${{ github.ref_name }}
|
||||
publish_dir: .
|
||||
publish_dir: ./public
|
||||
|
5
.gitignore
vendored
@ -2,5 +2,6 @@
|
||||
.nix-gems
|
||||
.bundle
|
||||
result
|
||||
data/hm-options-release-23.11.json
|
||||
data/hm-options-master.json
|
||||
data/options-release-23.11.json
|
||||
data/options-master.json
|
||||
.hugo_build.lock
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
## Next version
|
||||
|
||||
- hugofication
|
||||
- keyboard (tab) navigation (thanks to github.com/hallundbaek)
|
||||
- better result sorting (thanks to github.com/hallundbaek)
|
||||
- style improvements
|
||||
|
@ -8,7 +8,7 @@ The new location is <a href="https://home-manager-options.extranix.com/">HOME-MA
|
||||
|
||||
Find [home manager](https://github.com/nix-community/home-manager) options quickly.
|
||||
|
||||
![](images/homemanageroptionsearch.gif)
|
||||
![](static/images/homemanageroptionsearch.gif)
|
||||
|
||||
## Contribute
|
||||
|
||||
|
54
config.yaml
Normal file
@ -0,0 +1,54 @@
|
||||
baseURL: https://home-manager-options.extranix.com/
|
||||
languageCode: en-us
|
||||
title: Home Manager - Option Search
|
||||
theme: extranix-options-search
|
||||
|
||||
params:
|
||||
|
||||
release_switch_title: Home Manager Release
|
||||
releases:
|
||||
- name: unstable
|
||||
value: master
|
||||
- name: 23.11
|
||||
value: release-23.11
|
||||
- name: 23.05
|
||||
value: release-23.05
|
||||
- name: 22.11
|
||||
value: release-22.11
|
||||
|
||||
custom_head_scripts: |
|
||||
<script async src="https://umami.pimsnel.com/script.js" data-website-id="8e970d59-b517-4ba6-9b92-207e7dbdb4b1"></script>
|
||||
<script async src="https://media.ethicalads.io/media/client/ethicalads.min.js"></script>
|
||||
|
||||
custom_header_tags: <div id="eadiv" data-ea-publisher="extranixcom" data-ea-type="text"></div>
|
||||
|
||||
footer_credits_line: |
|
||||
Powered by the <a href="https://nix-community.org/">Nix Community</a> |
|
||||
<a href="https://github.com/mipmip/home-manager-option-search#credits">Credits</a> |
|
||||
<a href="https://nix-community.github.io/home-manager/">Home Manager Documentation</a>
|
||||
|
||||
footer_copyright_line: |
|
||||
Made with ❤️ by <a href="https://github.com/mipmip">Pim Snel</a> - © 2022-2024
|
||||
|
||||
logo: images/home-manager-option-search2.png
|
||||
|
||||
github:
|
||||
repo: home-manager-option-search
|
||||
user: mipmip
|
||||
show_count: true
|
||||
show_text: true
|
||||
|
||||
main_menu:
|
||||
|
||||
- name: HM Documentation
|
||||
url: https://nix-community.github.io/home-manager/
|
||||
icon_class: fa fa-book
|
||||
|
||||
- name: Source
|
||||
url: https://github.com/mipmip/home-manager-option-search
|
||||
icon_class: fa fa-github
|
||||
|
||||
markup:
|
||||
goldmark:
|
||||
renderer:
|
||||
unsafe: true
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Copyright 2024 Pim Snel <post@pimsnel.com
|
||||
# Copyright 2024 Pim Snel <post@pimsnel.com>
|
||||
# License: MIT
|
||||
|
||||
if [ -z $HM_RELEASE ]; then
|
||||
@ -11,5 +11,5 @@ echo "building Home Manager options from ${HM_RELEASE}"
|
||||
|
||||
rm -Rf result
|
||||
nix build github:nix-community/home-manager/${HM_RELEASE}#docs-json --no-write-lock-file
|
||||
rm -f ./data/hm-options-${HM_RELEASE}.json
|
||||
rm -f ./data/options-${HM_RELEASE}.json
|
||||
ruby ./scripts/parse_options-json.rb
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright 2024 Pim Snel <post@pimsnel.com
|
||||
# Copyright 2024 Pim Snel <post@pimsnel.com>
|
||||
# License: MIT
|
||||
|
||||
require 'json'
|
||||
@ -54,7 +54,7 @@ time = Time.new
|
||||
outobj["last_update"] = time.utc.strftime("%B %d, %Y at %k:%M UTC")
|
||||
outobj["options"] = options_arr
|
||||
|
||||
filename = "data/hm-options-#{ENV['HM_RELEASE']}.json"
|
||||
filename = "static/data/options-#{ENV['HM_RELEASE']}.json"
|
||||
|
||||
File.open(filename,"w") do |f|
|
||||
f.write(outobj.to_json)
|
||||
|
1
static/data/options-master.json
Normal file
1
static/data/options-release-23.11.json
Normal file
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 796 KiB After Width: | Height: | Size: 796 KiB |
@ -2,46 +2,53 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Home Manager - Option Search</title>
|
||||
<title>{{ .Site.Title }}</title>
|
||||
|
||||
<link rel="shortcut icon" href="images/favicon.png" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="Home Manager - Option Search" href="opensearch.xml" />
|
||||
|
||||
<meta name="description" content="{{ with .Params.Description }}{{ . }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}">
|
||||
<meta name="keywords" content="{{ with .Params.keywords }}{{ . }}{{ end }}">
|
||||
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="{{ .Site.Title}}" href="opensearch.xml" />
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||
<script async src="https://umami.pimsnel.com/script.js" data-website-id="8e970d59-b517-4ba6-9b92-207e7dbdb4b1"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
|
||||
<link href="css/nucleus.css" rel="stylesheet">
|
||||
<link href="css/style-nix.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="css/style-q2.css">
|
||||
<script async src="https://media.ethicalads.io/media/client/ethicalads.min.js"></script>
|
||||
|
||||
{{ with .Site.Params.custom_head_scripts }}{{ . | safeHTML }}{{ end }}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="eadiv" data-ea-publisher="extranixcom" data-ea-type="text"></div>
|
||||
{{ with .Site.Params.custom_header_tags }}{{ . | safeHTML }}{{ end }}
|
||||
|
||||
<header>
|
||||
<div id="lastUpdateElement" style="position:absolute; line-height: 11px; right: 37px;top:59px;"></div>
|
||||
<div class="logo">
|
||||
<a class="baselink" href="./"> <img src="images/home-manager-option-search2.png"></a>
|
||||
<a class="baselink" href="./">
|
||||
{{with .Site.Params.logo}}<img src="{{.}}">{{else}}{{.Site.Title}} {{end}}</a>
|
||||
</div>
|
||||
<nav class="shortcuts">
|
||||
<li style="padding-top:10px;">
|
||||
<a href="https://nix-community.github.io/home-manager/" rel="noopener">
|
||||
<i class="fa fa-book"></i> <label>HM Documentation</label>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li style="padding-top:10px;">
|
||||
<a href="https://github.com/mipmip/home-manager-option-search" rel="noopener">
|
||||
<i class="fa fa-github"></i> <label>Source</label>
|
||||
</a>
|
||||
</li>
|
||||
{{ range .Site.Params.main_menu }}
|
||||
<li style="padding-top:10px;"><a href="{{ .url }}" ><i class="{{ .icon_class }}"></i> <label>{{ .name | safeHTML }}</label></a></li>
|
||||
{{ end }}
|
||||
|
||||
{{with .Site.Params.github }}
|
||||
<li style="margin-left:9px;padding-top:14px;">
|
||||
<iframe style="width:51px;" src="https://ghbtns.com/github-btn.html?user=mipmip&repo=home-manager-option-search&type=star&count=false&text=true" frameborder="0" scrolling="0" width="150" height="20" title="GitHub"></iframe>
|
||||
<iframe
|
||||
src="https://ghbtns.com/github-btn.html?user={{ .user}}&repo={{.repo}}&type=star&count=false&text=true"
|
||||
style="width:101px;"
|
||||
frameborder="0" scrolling="0" width="150" height="20" title="GitHub"></iframe>
|
||||
</li>
|
||||
{{end}}
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
@ -81,19 +88,13 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release">
|
||||
Home Manager release
|
||||
{{ .Site.Params.release_switch_title }}
|
||||
</label>
|
||||
<select id="releaseSelect">
|
||||
<option value="master">unstable</option>
|
||||
<option value="release-23.11">23.11</option>
|
||||
<option value="release-23.05">23.05</option>
|
||||
<option value="release-22.11">22.11</option>
|
||||
{{ range .Site.Params.releases }}
|
||||
<option value="{{.value}}">{{.name}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
<!--
|
||||
<label for="advcheck">
|
||||
search options
|
||||
<input id="advcheck" type="checkbox" data-toggle="collapse" data-target="#advanced" />
|
||||
-->
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -156,19 +157,15 @@
|
||||
<footer class=" navbar-fixed-bottom" >
|
||||
<div >
|
||||
<p>
|
||||
Powered by the <a href="https://nix-community.org/">Nix Community</a> |
|
||||
<a href="https://github.com/mipmip/home-manager-option-search#credits">Credits</a> |
|
||||
<a href="https://nix-community.github.io/home-manager/">Home Manager Documentation</a>
|
||||
{{ with .Site.Params.footer_credits_line }}{{ . | safeHTML }}{{ end }}
|
||||
</p>
|
||||
<p>
|
||||
Made with ❤️ by <a href="https://github.com/mipmip">Pim Snel</a>
|
||||
{{ with .Site.Params.footer_copyright_line }}{{ . | safeHTML }}{{ end }}
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!--<script type="text/javascript" src="https://rawgit.com/kristopolous/Porter-Stemmer/master/PorterStemmer1980.min.js"></script>-->
|
||||
<!--<script type="text/javascript" src="https://unpkg.com/js-search@1.3.7/dist/umd/js-search.min.js"></script>-->
|
||||
<script type="text/javascript" src="https://unpkg.com/js-search@2.0.1/dist/umd/js-search.min.js"></script>
|
||||
<script type="text/javascript" src="js/script.js?version=2024-03-23"></script>
|
||||
<script type="text/javascript" src="js/script.js?version=2024-04-26"></script>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
@ -56,9 +56,18 @@ header {
|
||||
text-decoration: none; }
|
||||
header .logo {
|
||||
min-width: 295px;
|
||||
font-size: 100%; }
|
||||
font-size: 100%;
|
||||
}
|
||||
header .logo a,
|
||||
header .logo a:visited {
|
||||
color:white;
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
header .logo * {
|
||||
vertical-align: middle; }
|
||||
vertical-align: middle;
|
||||
}
|
||||
header .logo img {
|
||||
height: 32px;
|
||||
margin-right: 0.5rem; }
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 434 KiB After Width: | Height: | Size: 434 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 607 B After Width: | Height: | Size: 607 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@ -21,7 +21,6 @@ var docOnload = function(){
|
||||
searchOptions(query);
|
||||
|
||||
$("#advcheck").prop("checked", false);
|
||||
// $("#advcheck").removeAttr("checked");
|
||||
}
|
||||
|
||||
indexOnDescriptionCheckbox.onchange = rebuildAndRerunSearch;
|
||||
@ -242,15 +241,7 @@ releaseSelect.onchange = function(){
|
||||
|
||||
setSearchQueryToUrlParam(query, release);
|
||||
|
||||
//window.location.reload(false);
|
||||
|
||||
window.location.replace(newUrl);
|
||||
|
||||
//newSearch();
|
||||
|
||||
//var release = releaseSelect.selectedOptions[0].value;
|
||||
//xmlhttp.open('GET', 'data/hm-options-'+release+'.json', true);
|
||||
//xmlhttp.send();
|
||||
}
|
||||
|
||||
var updateOptionCount = function(numOptions) {
|
||||
@ -291,5 +282,5 @@ const urlParams = new URLSearchParams(window.location.search);
|
||||
const release = urlParams.get('release') ?? 'master';
|
||||
document.getElementById('releaseSelect').value = release;
|
||||
|
||||
xmlhttp.open('GET', 'data/hm-options-'+release+'.json', true);
|
||||
xmlhttp.open('GET', 'data/options-'+release+'.json', true);
|
||||
xmlhttp.send();
|