diff --git a/.github/ISSUE_TEMPLATE/1_bug_report.yml b/.github/ISSUE_TEMPLATE/1_bug_report.yml index 96ec317..b95ae0c 100644 --- a/.github/ISSUE_TEMPLATE/1_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/1_bug_report.yml @@ -81,7 +81,8 @@ body: description: select all environments where you have experienced this issue multiple: true options: - - "Running locally with Docker" + - "Running locally with Docker (docker compose)" + - "Running locally with Docker (devcontainer)" - "Running locally without Docker" - "Deployed site" validations: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cc851b4..85b7edf 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -90,6 +90,6 @@ jobs: purgecss -c purgecss.config.js - name: Deploy 🚀 if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.6.4 + uses: JamesIves/github-pages-deploy-action@v4 with: folder: _site diff --git a/.github/workflows/lighthouse-badger.yml b/.github/workflows/lighthouse-badger.yml index 37628ca..addec2d 100644 --- a/.github/workflows/lighthouse-badger.yml +++ b/.github/workflows/lighthouse-badger.yml @@ -15,7 +15,6 @@ name: "Lighthouse Badger" # INPUTS as Secrets (env) for not manually triggered workflows env: URLS: https://alshedivat.github.io/al-folio/ - TOKEN_NAME: ${{ secrets.LIGHTHOUSE_BADGER_TOKEN }} # If any of the following env is blank, a default value is used instead REPO_BRANCH: "${{ github.repository }} master" # target repository & branch e.g. 'dummy/mytargetrepo main' MOBILE_LIGHTHOUSE_PARAMS: "--only-categories=performance,accessibility,best-practices,seo --throttling.cpuSlowdownMultiplier=2" @@ -50,7 +49,7 @@ jobs: - uses: actions/checkout@v4 with: repository: ${{ env.REPOSITORY }} - token: ${{ secrets[github.event.inputs.token_name] || secrets[env.TOKEN_NAME] }} + token: ${{ secrets.LIGHTHOUSE_BADGER_TOKEN }} ref: ${{ env.BRANCH }} - uses: actions/checkout@v4 with: diff --git a/.github/workflows/schedule-posts.txt b/.github/workflows/schedule-posts.txt new file mode 100644 index 0000000..fff2219 --- /dev/null +++ b/.github/workflows/schedule-posts.txt @@ -0,0 +1,39 @@ +name: Publish posts scheduled for today + +on: + schedule: + # Run every day at 23:30 UTC or manually run + - cron: "30 23 * * *" + workflow_dispatch: + +jobs: + publish_scheduled: + runs-on: ubuntu-latest + steps: + - name: Checkout main branch + uses: actions/checkout@v4 + with: + ref: master + + - name: Get the date for today + id: date + run: echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + + - name: Check for scheduled posts and move to posts + run: | + echo "Today is $TODAY" + shopt -s nullglob + for file in _scheduled/${TODAY}-*.md; do + echo "Found scheduled: $file" + mv "$file" "_posts/" + echo "Moved $file to _posts/" + done + + - name: Commit and push changes + run: | + git config user.name "github-actions" + git config user.email "actions@github.com" + git add _posts/ + git add _scheduled/ + git commit -m "Posted Scheduled Drafts on $TODAY" || echo "No changes to commit" + git push diff --git a/CUSTOMIZE.md b/CUSTOMIZE.md index ccdd058..90f9c30 100644 --- a/CUSTOMIZE.md +++ b/CUSTOMIZE.md @@ -169,3 +169,31 @@ Due to the necessary permissions (PAT and others mentioned above), it is recomme ## Customizing fonts, spacing, and more You can customize the fonts, spacing, and more by editing [\_sass/\_base.scss](_sass/_base.scss). The easiest way to try in advance the changes is by using [chrome dev tools](https://developer.chrome.com/docs/devtools/css) or [firefox dev tools](https://firefox-source-docs.mozilla.org/devtools-user/). In there you can click in the element and find all the attributes that are set for that element and where are they. For more information on how to use this, check [chrome](https://developer.chrome.com/docs/devtools/css) and [firefox](https://firefox-source-docs.mozilla.org/devtools-user/page_inspector/how_to/examine_and_edit_css/index.html) how-tos, and [this tutorial](https://www.youtube.com/watch?v=l0sgiwJyEu4). + +## Scheduled Posts + +`al-folio` contains a workflow which automatically publishes all posts scheduled at a specific day, at the end of the day (23:30). By default the action is disabled, and to enable it you need to go to `.github/workflows/` and find the file called `schedule-posts.txt`. This is the workflow file. For GitHub to recognize it as one (or to enable the action), you need to rename it to `schedule-posts.yml`. + +In order to use this you need to save all of your "Completed" blog posts which are scheduled to be uploaded on a specific date, in a folder named `_scheduled/` in the root directory. + +> Incomplete posts should be saved in `_drafts/` + +### Name Format + +In this folder you need to store your file in the same format as you would in `_posts/` + +> Example file name: `2024-08-26-This file will be uploaded on 26 August.md` + +### Important Notes + +- The scheduler uploads posts everyday at 🕛 23:30 UTC +- It will only upload posts at 23:30 UTC of their respective scheduled days, It's not uploaded in 23:59 in case there are a lot of files as the scheduler must finish before 00:00 +- It will only upload files which follow the pattern `yyyy-mm-dd-title.md` + - This means that only markdown files will be posted + - It means that any markdown which do not follow this pattern will not be posted +- The scheduler works by moving posts from the `_scheduled/` directory to `_posts/`, it will not post to folders like `_projects/` or `_news/` +- The date in the name of the file is the day that file will be uploaded on + - `2024-08-27-file1.md` will not be posted before or after 27-August-2024 (Scheduler only works for posts scheduled on the present day) + - `2025-08-27-file2.md` will be posted exactly on 27-August-2025 + - `File3.md` will not be posted at all + - `2026-02-31-file4.md` is supposed to be posted on 31-February-2026, but there is no 31st in February hence this file will never be posted either diff --git a/Gemfile.lock b/Gemfile.lock index 2b0b9cb..bb9672c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,16 +1,17 @@ GEM remote: https://rubygems.org/ specs: - activesupport (7.1.3.4) + activesupport (7.2.1) base64 bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) base64 (0.2.0) @@ -27,7 +28,7 @@ GEM fast-stemmer (~> 1.0) matrix (~> 0.4) colorator (1.1.0) - concurrent-ruby (1.3.3) + concurrent-ruby (1.3.4) connection_pool (2.4.1) crass (1.0.6) csl (1.6.0) @@ -35,7 +36,7 @@ GEM rexml csl-styles (1.0.1.11) csl (~> 1.0) - css_parser (1.17.1) + css_parser (1.19.0) addressable cssminify2 (2.0.1) csv (3.3.0) @@ -56,16 +57,16 @@ GEM ffi (1.17.0-x86_64-linux-gnu) forwardable-extended (2.6.0) gemoji (4.1.0) - google-protobuf (4.27.3-aarch64-linux) + google-protobuf (4.28.2-aarch64-linux) bigdecimal rake (>= 13) - google-protobuf (4.27.3-arm64-darwin) + google-protobuf (4.28.2-arm64-darwin) bigdecimal rake (>= 13) - google-protobuf (4.27.3-x86_64-darwin) + google-protobuf (4.28.2-x86_64-darwin) bigdecimal rake (>= 13) - google-protobuf (4.27.3-x86_64-linux) + google-protobuf (4.28.2-x86_64-linux) bigdecimal rake (>= 13) html-pipeline (2.14.3) @@ -77,9 +78,9 @@ GEM csv mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - i18n (1.14.5) + i18n (1.14.6) concurrent-ruby (~> 1.0) - jekyll (4.3.3) + jekyll (4.3.4) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) @@ -146,26 +147,26 @@ GEM kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) latex-decode (0.4.0) - libv8-node (22.5.1.0-aarch64-linux) - libv8-node (22.5.1.0-arm64-darwin) - libv8-node (22.5.1.0-x86_64-darwin) - libv8-node (22.5.1.0-x86_64-linux) + libv8-node (22.7.0.4-aarch64-linux) + libv8-node (22.7.0.4-arm64-darwin) + libv8-node (22.7.0.4-x86_64-darwin) + libv8-node (22.7.0.4-x86_64-linux) liquid (4.0.4) listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + logger (1.6.1) loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) matrix (0.4.2) mercenary (0.4.0) mini_mime (1.1.5) - mini_racer (0.13.0) - libv8-node (~> 22.5.1.0) - minitest (5.24.1) + mini_racer (0.15.0) + libv8-node (~> 22.7.0.1) + minitest (5.25.1) multi_xml (0.7.1) bigdecimal (~> 3.1) - mutex_m (0.2.0) namae (1.2.0) racc (~> 1.7) nokogiri (1.16.7-aarch64-linux) @@ -184,29 +185,28 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rexml (3.3.6) - strscan - rouge (4.3.0) + rexml (3.3.7) + rouge (4.4.0) safe_yaml (1.0.5) - sass-embedded (1.77.8-aarch64-linux-gnu) - google-protobuf (~> 4.26) - sass-embedded (1.77.8-arm64-darwin) - google-protobuf (~> 4.26) - sass-embedded (1.77.8-x86_64-darwin) - google-protobuf (~> 4.26) - sass-embedded (1.77.8-x86_64-linux-gnu) - google-protobuf (~> 4.26) + sass-embedded (1.79.3-aarch64-linux-gnu) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-arm64-darwin) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86_64-darwin) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86_64-linux-gnu) + google-protobuf (~> 4.27) sax-machine (1.3.2) - strscan (3.1.0) + securerandom (0.3.1) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - uglifier (4.2.0) + uglifier (4.2.1) execjs (>= 0.3.0, < 3) - unicode-display_width (2.5.0) + unicode-display_width (2.6.0) unicode_utils (1.4.0) - webrick (1.8.1) + webrick (1.8.2) PLATFORMS aarch64-linux diff --git a/README.md b/README.md index 42565f9..e7d3d3a 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,10 @@ Feel free to add your own page(s) by sending a PR. ★ ★ ★ +★ +★ +★ +★ @@ -451,7 +455,7 @@ Our most active contributors are welcome to join the maintainers team. If you ar ### All Contributors - + ## Star History diff --git a/_includes/figure.liquid b/_includes/figure.liquid index 7c10854..a8d54da 100644 --- a/_includes/figure.liquid +++ b/_includes/figure.liquid @@ -1,4 +1,6 @@ {% assign img_path = include.path | remove: '.jpg' | remove: '.jpeg' | remove: '.png' | remove: '.tiff' | remove: '.gif' %} +{% assign parts = include.path | split: '.' %} +{% assign ext = parts.last %}
{% endif %} + +{% endif %} +

{{ page.title }}

diff --git a/_pages/blog.md b/_pages/blog.md index d11387f..784938b 100644 --- a/_pages/blog.md +++ b/_pages/blog.md @@ -29,7 +29,7 @@ pagination:
{% endif %} -{% if site.display_tags or site.display_categories %} +{% if site.display_tags and site.display_tags.size > 0 or site.display_categories and site.display_categories.size > 0 %}
`:this.action.icon&&(t=this.action.icon?unsafeHTML(`
${this.action.icon}
`):""),this.action.hotkey&&(e=this.hotKeysJoinedView?this.action.hotkey.split(",").map((t=>{const e=t.split("+"),i=html`${join(e.map((t=>html`${t}`)),"+")}`;return html`
${i}
`})):this.action.hotkey.split(",").map((t=>{const e=t.split("+").map((t=>html`${t}`));return html`${e}`})));const i={selected:this.selected,"ninja-action":!0};return html`
${t} ${this.action.type?html`
diff --git a/assets/js/search/ninja-keys.min.js b/assets/js/search/ninja-keys.min.js index 407bd8f..60b6970 100644 --- a/assets/js/search/ninja-keys.min.js +++ b/assets/js/search/ninja-keys.min.js @@ -4,7 +4,7 @@ * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ -var __decorate=this&&this.__decorate||function(e,t,i,s){var o,a=arguments.length,n=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(n=(a<3?o(n):a>3?o(t,i,n):o(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};import{LitElement,html}from"./lit/index.min.js";import{customElement,property,state}from"./lit/decorators.min.js";import{repeat}from"./lit/directives/repeat.min.js";import{live}from"./lit/directives/live.min.js";import{createRef,ref}from"./lit-html/directives/ref.min.js";import{classMap}from"./lit/directives/class-map.min.js";import hotkeys from"./hotkeys-js/hotkeys.esm.min.js";import"./ninja-header.min.js";import"./ninja-action.min.js";import{footerHtml}from"./ninja-footer.min.js";import{baseStyles}from"./base-styles.min.js";import{commandScore}from"./command-score.min.js";let NinjaKeys=class extends LitElement{constructor(){super(...arguments),this._ignorePrefixesSplit=null,this.placeholder="Type a command or search...",this.disableHotkeys=!1,this.hideBreadcrumbs=!1,this.ignorePrefixes="",this.openHotkey="cmd+k,ctrl+k",this.navigationUpHotkey="up,shift+tab",this.navigationDownHotkey="down,tab",this.closeHotkey="esc",this.goBackHotkey="backspace",this.selectHotkey="enter",this.hotKeysJoinedView=!1,this.noAutoLoadMdIcons=!1,this.numRecentActions=0,this.data=[],this.visible=!1,this._bump=!0,this._actionMatches=[],this._search="",this._headerRef=createRef(),this._wrapperRef=createRef()}open(e={}){var t,i,s;this._bump=!0,this.visible=!0,this._headerRef.value.focusSearch(),this._actionMatches.length>0&&(this._selected=this._actionMatches[0]),this.setParent(e.parent),null===(t=this._headerRef.value)||void 0===t||t.setSearch(null!==(i=e.search)&&void 0!==i?i:""),this._search=null!==(s=e.search)&&void 0!==s?s:"",setTimeout((()=>{var e,t;null===(t=null===(e=this._wrapperRef.value)||void 0===e?void 0:e.querySelector(".actions-list"))||void 0===t||t.scrollTo({top:0})}),0)}close(){this._bump=!1,this.visible=!1}setParent(e){this._currentRoot=e||void 0,this._selected=void 0,this._search="",this._headerRef.value.setSearch("")}get breadcrumbs(){var e;const t=[];let i=null===(e=this._selected)||void 0===e?void 0:e.parent;if(i)for(t.push(i);i;){const e=[].find((e=>e.id===i));(null==e?void 0:e.parent)&&t.push(e.parent),i=e?e.parent:void 0}return t.reverse()}connectedCallback(){super.connectedCallback(),this.noAutoLoadMdIcons||document.fonts.load("24px Material Icons","apps").then((()=>{})),this._registerInternalHotkeys()}disconnectedCallback(){super.disconnectedCallback(),this._unregisterInternalHotkeys()}_registerInternalHotkeys(){this.openHotkey&&hotkeys(this.openHotkey,(e=>{e.preventDefault(),this.visible?this.close():this.open()})),this.selectHotkey&&hotkeys(this.selectHotkey,(e=>{this.visible&&(e.preventDefault(),this._actionSelected(this._actionMatches[this._selectedIndex]))})),this.goBackHotkey&&hotkeys(this.goBackHotkey,(e=>{this.visible&&(this._search||(e.preventDefault(),this._goBack()))})),this.navigationDownHotkey&&hotkeys(this.navigationDownHotkey,(e=>{this.visible&&(e.preventDefault(),this._selectedIndex>=this._actionMatches.length-1?this._selected=this._actionMatches[0]:this._selected=this._actionMatches[this._selectedIndex+1])})),this.navigationUpHotkey&&hotkeys(this.navigationUpHotkey,(e=>{this.visible&&(e.preventDefault(),0===this._selectedIndex?this._selected=this._actionMatches[this._actionMatches.length-1]:this._selected=this._actionMatches[this._selectedIndex-1])})),this.closeHotkey&&hotkeys(this.closeHotkey,(()=>{this.visible&&this.close()}))}_unregisterInternalHotkeys(){this.openHotkey&&hotkeys.unbind(this.openHotkey),this.selectHotkey&&hotkeys.unbind(this.selectHotkey),this.goBackHotkey&&hotkeys.unbind(this.goBackHotkey),this.navigationDownHotkey&&hotkeys.unbind(this.navigationDownHotkey),this.navigationUpHotkey&&hotkeys.unbind(this.navigationUpHotkey),this.closeHotkey&&hotkeys.unbind(this.closeHotkey)}_actionFocused(e,t){this._selected=e,t.target.ensureInView()}_onTransitionEnd(){this._bump=!1}_goBack(){const e=this.breadcrumbs.length>1?this.breadcrumbs[this.breadcrumbs.length-2]:void 0;this.setParent(e)}render(){var e,t,i,s;const o={bump:this._bump,"modal-content":!0},a={visible:this.visible,modal:!0,isLoadingItems:!1};let n=this._search;null!==(e=this._ignorePrefixesSplit)&&void 0!==e||(this._ignorePrefixesSplit=""!==this.ignorePrefixes?this.ignorePrefixes.split(","):[]),null===(t=this._ignorePrefixesSplit)||void 0===t||t.some((e=>!!n.startsWith(e)&&(n=n.substring(e.length),!0))),n=n.trim();const r={},c=[];(this._currentRoot?null!==(s=null===(i=this.data.find((e=>e.id===this._currentRoot)))||void 0===i?void 0:i.children)&&void 0!==s?s:[]:this.data).forEach(((e,t)=>{var i;if("loading"===e)return void(a.isLoadingItems=!0);if("function"==typeof e){const s=this.data.find((e=>e.id===this._currentRoot));return null===(i=s.children)||void 0===i||i.splice(t,1,"loading"),a.isLoadingItems=!0,void e().then((e=>{var i;null===(i=s.children)||void 0===i||i.splice(t,1,...e),this.render()}))}const s=commandScore(e.title+" "+e.description,n);(!this._currentRoot&&n||e.parent===this._currentRoot)&&(r[e.title]=s.indices,s.score>0&&c.push({score:s.score,item:e}))}));const h=(n?c.sort(((e,t)=>e.score===t.score?e.item.title.localeCompare(t.item.title):t.score-e.score)):c).map((e=>e.item)).reduce(((e,t)=>e.set(t.section,[...e.get(t.section)||[],t])),new Map);this._actionMatches=[...h.values()].flat(),this._actionMatches.length>0&&-1===this._selectedIndex&&(this._selected=this._actionMatches[0]),0===this._actionMatches.length&&(this._selected=void 0);const d=!this._currentRoot&&0!==this.numRecentActions&&!n,l=e=>html` ${repeat(e,(e=>e.id),((e,t)=>{var i;const s=d?0===t?html`
Recently Used
`:this.numRecentActions===t?html`
Other Commands
`:"":"";return html`${s}=0;r--)(o=e[r])&&(n=(a<3?o(n):a>3?o(t,i,n):o(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};import{LitElement,html}from"./lit/index.min.js";import{customElement,property,state}from"./lit/decorators.min.js";import{repeat}from"./lit/directives/repeat.min.js";import{live}from"./lit/directives/live.min.js";import{createRef,ref}from"./lit-html/directives/ref.min.js";import{classMap}from"./lit/directives/class-map.min.js";import hotkeys from"./hotkeys-js/hotkeys.esm.min.js";import"./ninja-header.min.js";import"./ninja-action.min.js";import{footerHtml}from"./ninja-footer.min.js";import{baseStyles}from"./base-styles.min.js";import{commandScore}from"./command-score.min.js";let NinjaKeys=class extends LitElement{constructor(){super(...arguments),this._ignorePrefixesSplit=null,this.placeholder="Type a command or search...",this.disableHotkeys=!1,this.hideBreadcrumbs=!1,this.ignorePrefixes="",this.openHotkey="cmd+k,ctrl+k",this.navigationUpHotkey="up,shift+tab",this.navigationDownHotkey="down,tab",this.closeHotkey="esc",this.goBackHotkey="backspace",this.selectHotkey="enter",this.hotKeysJoinedView=!1,this.noAutoLoadMdIcons=!1,this.numRecentActions=0,this.data=[],this.visible=!1,this._bump=!0,this._actionMatches=[],this._search="",this._headerRef=createRef(),this._wrapperRef=createRef()}open(e={}){var t,i,s;this._bump=!0,this.visible=!0,this._headerRef.value.focusSearch(),this._actionMatches.length>0&&(this._selected=this._actionMatches[0]),this.setParent(e.parent),null===(t=this._headerRef.value)||void 0===t||t.setSearch(null!==(i=e.search)&&void 0!==i?i:""),this._search=null!==(s=e.search)&&void 0!==s?s:"",setTimeout((()=>{var e,t;null===(t=null===(e=this._wrapperRef.value)||void 0===e?void 0:e.querySelector(".actions-list"))||void 0===t||t.scrollTo({top:0})}),0)}close(){this._bump=!1,this.visible=!1}setParent(e){this._currentRoot=e||void 0,this._selected=void 0,this._search="",this._headerRef.value.setSearch("")}get breadcrumbs(){var e;const t=[];let i=null===(e=this._selected)||void 0===e?void 0:e.parent;if(i)for(t.push(i);i;){const e=[].find((e=>e.id===i));(null==e?void 0:e.parent)&&t.push(e.parent),i=e?e.parent:void 0}return t.reverse()}connectedCallback(){super.connectedCallback(),this.noAutoLoadMdIcons||document.fonts.load("24px Material Icons","apps").then((()=>{})),this._registerInternalHotkeys()}disconnectedCallback(){super.disconnectedCallback(),this._unregisterInternalHotkeys()}_registerInternalHotkeys(){this.openHotkey&&hotkeys(this.openHotkey,(e=>{e.preventDefault(),this.visible?this.close():this.open()})),this.selectHotkey&&hotkeys(this.selectHotkey,(e=>{this.visible&&(e.preventDefault(),this._actionSelected(this._actionMatches[this._selectedIndex]))})),this.goBackHotkey&&hotkeys(this.goBackHotkey,(e=>{this.visible&&(this._search||(e.preventDefault(),this._goBack()))})),this.navigationDownHotkey&&hotkeys(this.navigationDownHotkey,(e=>{this.visible&&(e.preventDefault(),this._selectedIndex>=this._actionMatches.length-1?this._selected=this._actionMatches[0]:this._selected=this._actionMatches[this._selectedIndex+1])})),this.navigationUpHotkey&&hotkeys(this.navigationUpHotkey,(e=>{this.visible&&(e.preventDefault(),0===this._selectedIndex?this._selected=this._actionMatches[this._actionMatches.length-1]:this._selected=this._actionMatches[this._selectedIndex-1])})),this.closeHotkey&&hotkeys(this.closeHotkey,(()=>{this.visible&&this.close()}))}_unregisterInternalHotkeys(){this.openHotkey&&hotkeys.unbind(this.openHotkey),this.selectHotkey&&hotkeys.unbind(this.selectHotkey),this.goBackHotkey&&hotkeys.unbind(this.goBackHotkey),this.navigationDownHotkey&&hotkeys.unbind(this.navigationDownHotkey),this.navigationUpHotkey&&hotkeys.unbind(this.navigationUpHotkey),this.closeHotkey&&hotkeys.unbind(this.closeHotkey)}_actionFocused(e,t){this._selected=e,t.target.ensureInView()}_onTransitionEnd(){this._bump=!1}_goBack(){const e=this.breadcrumbs.length>1?this.breadcrumbs[this.breadcrumbs.length-2]:void 0;this.setParent(e)}render(){var e,t,i,s;const o={bump:this._bump,"modal-content":!0},a={visible:this.visible,modal:!0,isLoadingItems:!1};let n=this._search;null!==(e=this._ignorePrefixesSplit)&&void 0!==e||(this._ignorePrefixesSplit=""!==this.ignorePrefixes?this.ignorePrefixes.split(","):[]),null===(t=this._ignorePrefixesSplit)||void 0===t||t.some((e=>!!n.startsWith(e)&&(n=n.substring(e.length),!0))),n=n.trim();const r={},c=[];let ps=new DOMParser();(this._currentRoot?null!==(s=null===(i=this.data.find((e=>e.id===this._currentRoot)))||void 0===i?void 0:i.children)&&void 0!==s?s:[]:this.data).forEach(((e,t)=>{var i;if("loading"===e)return void(a.isLoadingItems=!0);if("function"==typeof e){const s=this.data.find((e=>e.id===this._currentRoot));return null===(i=s.children)||void 0===i||i.splice(t,1,"loading"),a.isLoadingItems=!0,void e().then((e=>{var i;null===(i=s.children)||void 0===i||i.splice(t,1,...e),this.render()}))}const rr=ps.parseFromString(e.title,'text/html');const rs=rr.body.textContent.trim()||"";const s=commandScore(rs+" "+e.description,n);(!this._currentRoot&&n||e.parent===this._currentRoot)&&(r[e.title]=s.indices,s.score>0&&c.push({score:s.score,item:e}))}));const h=(n?c.sort(((e,t)=>e.score===t.score?e.item.title.localeCompare(t.item.title):t.score-e.score)):c).map((e=>e.item)).reduce(((e,t)=>e.set(t.section,[...e.get(t.section)||[],t])),new Map);this._actionMatches=[...h.values()].flat(),this._actionMatches.length>0&&-1===this._selectedIndex&&(this._selected=this._actionMatches[0]),0===this._actionMatches.length&&(this._selected=void 0);const d=!this._currentRoot&&0!==this.numRecentActions&&!n,l=e=>html` ${repeat(e,(e=>e.id),((e,t)=>{var i;const s=d?0===t?html`
Recently Used
`:this.numRecentActions===t?html`
Other Commands
`:"":"";return html`${s} /dev/null && [ -f Gemfile.lock ]; then + if git ls-files --error-unmatch Gemfile.lock &> /dev/null; then + echo "Gemfile.lock is tracked by git, keeping it intact" + git restore Gemfile.lock 2>/dev/null || true + else + echo "Gemfile.lock is not tracked by git, removing it" + rm Gemfile.lock + fi + fi +} + +start_jekyll() { + manage_gemfile_lock + bundle exec jekyll serve --watch --port=8080 --host=0.0.0.0 --livereload --verbose --trace --force_polling & +} + +start_jekyll while true; do - - inotifywait -q -e modify,move,create,delete $CONFIG_FILE - - if [ $? -eq 0 ]; then - - echo "Change detected to $CONFIG_FILE, restarting Jekyll" - - jekyll_pid=$(pgrep -f jekyll) - kill -KILL $jekyll_pid - - /bin/bash -c "rm -f Gemfile.lock && exec jekyll serve --watch --port=8080 --host=0.0.0.0 --livereload --verbose --trace --force_polling"& - - fi - + inotifywait -q -e modify,move,create,delete $CONFIG_FILE + if [ $? -eq 0 ]; then + echo "Change detected to $CONFIG_FILE, restarting Jekyll" + jekyll_pid=$(pgrep -f jekyll) + kill -KILL $jekyll_pid + start_jekyll + fi done