aboutsummaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorJieiku2023-09-08 15:08:39 -0700
committerJieiku2023-09-08 15:08:39 -0700
commit5e55301cc2c91a5f0e99000bfe4d7ec262ee78c1 (patch)
treed034c24a0debdb22066c659fa67ab5564227acdd /content
parent288de9dac39869ac94d0265351f5884a78dce5a8 (diff)
downloadabridge-5e55301cc2c91a5f0e99000bfe4d7ec262ee78c1.tar.gz
abridge-5e55301cc2c91a5f0e99000bfe4d7ec262ee78c1.tar.bz2
abridge-5e55301cc2c91a5f0e99000bfe4d7ec262ee78c1.zip
Refactor package.json2.2.0
Diffstat (limited to 'content')
-rw-r--r--content/overview-abridge/index.fr.md18
-rw-r--r--content/overview-abridge/index.md16
-rw-r--r--content/overview-code-blocks.fr.md20
-rw-r--r--content/overview-code-blocks.md20
4 files changed, 45 insertions, 29 deletions
diff --git a/content/overview-abridge/index.fr.md b/content/overview-abridge/index.fr.md
index 8e70eef..b4f84e6 100644
--- a/content/overview-abridge/index.fr.md
+++ b/content/overview-abridge/index.fr.md
@@ -26,6 +26,7 @@ Un thème [Zola](https://getzola.org) rapide, léger et moderne utilisant [abrid
- [X] Thèmes sombre, clair, automatique et Switcher. (les couleurs peuvent être personnalisées, variables CSS)
- [X] Code [surlignage de la syntaxe](https://abridge.netlify.app/overview-code-blocks/). (les couleurs peuvent être personnalisées, variables CSS)
- [X] Blocs de code numérotés avec [mise en évidence des lignes](https://abridge.netlify.app/overview-code-blocks/#toml).
+- [X] Site entièrement hors ligne en utilisant la PWA **ou** en définissant `offline = true` dans `config.toml` (prise en charge complète de la recherche).
- [X] Prise en charge multilingue.
- [X] Aide à la recherche. (elasticlunr, tinysearch, cigogne)
- [X] Suggestions de recherche touches de navigation, focus `/`, déplacement `flèche`, sélection `entrée`, fermeture `évasion`.
@@ -95,8 +96,8 @@ rsync themes/abridge/config.toml config.toml
rsync themes/abridge/content/_index.md content/
rsync themes/abridge/COPY-TO-ROOT-SASS/* sass/
rsync themes/abridge/netlify.toml netlify.toml
+rsync themes/abridge/package_abridge.js package_abridge.js
rsync themes/abridge/package.json package.json
-rsync -r themes/abridge/content/static content/
```
- `templates/.gitkeep` le répertoire des modèles est requis dans votre site de base. [#2150](https://github.com/getzola/zola/issues/2150)
@@ -104,8 +105,8 @@ rsync -r themes/abridge/content/static content/
- `content/_index.md` requis pour définir la pagination.
- `COPY-TO-ROOT-SASS/abridge.scss` remplace pour personnaliser les variables Abridge.
- `netlify.toml` paramètres pour déployer votre dépôt avec netlify
+- `package_abridge.js` script de nœud pour: mettre à jour la liste des fichiers de cache dans PWA, réduire js, regrouper js
- `package.json` pour basculer entre nosearch, elasticlunr, tinysearch, stork.
-- `content/static` fichiers pour générer des index tinysearch et stork.
Décommentez la ligne de thème dans le fichier racine config.toml de votre projet:
```bash
@@ -275,7 +276,7 @@ Si vous utilisez Chrome sur un ordinateur de bureau, regardez à la fin de la ba
Pour l'utiliser dans votre propre instance, vous devrez éditer `static/sw.js` pour la liste des fichiers à mettre en cache. Techniquement, vous n'avez pas besoin de modifier `sw.js`, mais si même un seul fichier est manquant dans la liste de cache, la liste ne sera pas pré-mise en cache, elle ne sera donc mise en cache que pendant votre navigation.
-Il existe un script npm pour générer la liste de cache de fichiers et la minification `npm run pwa`. Mon fichier `netlify.toml` exécute automatiquement ce script npm lors du déploiement du site, donc tout est automatique. Si Zola était capable de modéliser un fichier js, il serait peut-être possible de générer dynamiquement la liste des fichiers cache lors de la construction.
+Il existe un script npm pour générer la liste de cache de fichiers et la minification `npm run abridge`. Mon fichier `netlify.toml` exécute automatiquement ce script npm lors du déploiement du site, donc tout est automatique. Si Zola était capable de modéliser un fichier js, il serait peut-être possible de générer dynamiquement la liste des fichiers cache lors de la construction.
La fonctionnalité PWA est également facile à désactiver en définissant simplement `pwa = false` dans `config.toml`
@@ -310,16 +311,13 @@ Voici les fichiers javascript utilisés par Abridge :
#### option js_bundle
-`js_bundle` lorsqu'il est défini sur true, il sert un fichier bundle au lieu de tous les fichiers js individuels.
+`js_bundle` lorsqu'il est défini sur true sert un fichier bundle au lieu de tous les fichiers js individuels.
-Tous les bundles sont définis dans [package.json](https://github.com/Jieiku/abridge/blob/master/package.json)
+Tous les bundles nécessaires sont générés dynamiquement par le script de nœud [package_abridge.js](https://github.com/Jieiku/abridge/blob/master/package_abridge.js)
-Un Bundle peut être généré à partir des scripts package.json en utilisant npm:
+Le script de nœud analysera votre config.toml pour rechercher les valeurs de configuration pertinentes, puis, en fonction de votre config.tomnl, générera les bundles requis.
-- `npm run nosearch` - génère un bundle sans recherche.
-- `npm run elasticlunr` - génère un bundle de tous les js avec elasticlunr.
-- `npm run tinysearch` - génère un bundle de tous les js avec tinysearch.
-- `npm run stork` - génère un bundle de tous les js avec stork.
+Tout ce qui est nécessaire est `zola build && npm run abridge`.
#### Changer de bibliothèque de recherche
diff --git a/content/overview-abridge/index.md b/content/overview-abridge/index.md
index b36c9d3..909e069 100644
--- a/content/overview-abridge/index.md
+++ b/content/overview-abridge/index.md
@@ -24,6 +24,7 @@ A fast, lightweight, and modern [Zola](https://getzola.org) theme utilizing [abr
- [X] Dark, Light, Auto, and Switcher themes. (colors can be customized, css variables)
- [X] Code [syntax highlighting](https://abridge.netlify.app/overview-code-blocks/). (colors can be customized, css variables)
- [X] Numbered code blocks with [line highlighting](https://abridge.netlify.app/overview-code-blocks/#toml).
+- [X] Entirely Offline Site by using the PWA **or** by setting `offline = true` in `config.toml` (full search support).
- [X] Multi-language support.
- [X] Search support. (elasticlunr, tinysearch, stork)
- [X] Search Suggestions navigation keys, `/` focus, `arrow` move, `enter` select, `escape` close.
@@ -93,8 +94,8 @@ rsync themes/abridge/config.toml config.toml
rsync themes/abridge/content/_index.md content/
rsync themes/abridge/COPY-TO-ROOT-SASS/* sass/
rsync themes/abridge/netlify.toml netlify.toml
+rsync themes/abridge/package_abridge.js package_abridge.js
rsync themes/abridge/package.json package.json
-rsync -r themes/abridge/content/static content/
```
- `templates/.gitkeep` the templates directory is required in your base site. [#2150](https://github.com/getzola/zola/issues/2150)
@@ -102,8 +103,8 @@ rsync -r themes/abridge/content/static content/
- `content/_index.md` required to set pagination.
- `COPY-TO-ROOT-SASS/abridge.scss` overrides to customize Abridge variables.
- `netlify.toml` settings to deploy your repo with netlfiy.
+- `package_abridge.js` node script to: update cache files list in PWA, minify js, bundle js
- `package.json` to switch between nosearch, elasticlunr, tinysearch, stork.
-- `content/static` files for generating tinysearch and stork indexes.
Uncomment the theme line in your project's root config.toml:
@@ -274,7 +275,7 @@ If using Chrome on desktop then look at the end of the address bar for the insta
To use it in your own instance you will need to edit `static/sw.js` for the list of files to cache. Technically you do not need to edit `sw.js`, but if even a single file in the cache list is missing then it wont pre cache the list, so it will only cache as you browse.
-There is an npm script to generate the file cache list and minification `npm run pwa`. My `netlify.toml` file automatically runs this npm script during site deployment, so everything is automatic. If Zola was able to template a js file then it might be possible to generate the list of cache files dynamically at build.
+There is an npm script to generate the file cache list and minification `npm run abridge`. My `netlify.toml` file automatically runs this npm script during site deployment, so everything is automatic. If Zola was able to template a js file then it might be possible to generate the list of cache files dynamically at build instead of relying on node/npm.
The PWA feature is also easy to disable by simply setting `pwa = false` in `config.toml`
@@ -311,14 +312,11 @@ These are the javascript files used by Abridge:
`js_bundle` when set to true serves a bundle file instead of all of the individual js files.
-All Bundles are defined in [package.json](https://github.com/Jieiku/abridge/blob/master/package.json)
+All necessary bundles are dynamically generated by the node script [package_abridge.js](https://github.com/Jieiku/abridge/blob/master/package_abridge.js)
-A Bundle can be generated from the package.json scripts using npm:
+The node script will scan your config.toml for relevant config values, and then based on your config.tomnl generate your required bundles.
-- `npm run nosearch` - generates a bundle without search.
-- `npm run elasticlunr` - generates a bundle of all js with elasticlunr.
-- `npm run tinysearch` - generates a bundle of all js with tinysearch.
-- `npm run stork` - generates a bundle of all js with stork.
+All that is necessary is `zola build && npm run abridge`.
#### Switch Search Library
diff --git a/content/overview-code-blocks.fr.md b/content/overview-code-blocks.fr.md
index bc0462e..0209daa 100644
--- a/content/overview-code-blocks.fr.md
+++ b/content/overview-code-blocks.fr.md
@@ -23,7 +23,7 @@ Voir [les docs](https://www.getzola.org/documentation/content/syntax-highlightin
Si nous voulons, nous pouvons aussi `spécifier le code en ligne` ce qui est utile pour `les petites choses`.
-### rust
+### Rust
```rust
fn main() {
let greetings = ["Hello", "Hola", "Bonjour",
@@ -66,6 +66,16 @@ fn main() {
}
```
+### Bash
+```bash
+#!/bin/bash
+for d in /sys/kernel/iommu_groups/*/devices/*; do
+ n=${d#*/iommu_groups/*}; n=${n%%/*}
+ printf 'IOMMU Group %s ' "$n"
+ lspci -nns "${d##*/}"
+done
+```
+
### TOML
```toml,linenos,hl_lines=3
base_url = "https://abridge.netlify.app/"
@@ -83,7 +93,7 @@ taxonomies = [
]
```
-### html
+### HTML
```html
<!doctype html>
<html lang="en">
@@ -130,7 +140,7 @@ $font-mono: ui-monospace Menlo Monaco Consolas "SF Mono" "Cascadia Mono" "Segoe
}
```
-### javascript
+### Javascript
```javascript
function closeSearch() {//close the search displaying the regular page.
const e = document.querySelector("main");
@@ -149,7 +159,7 @@ function goSearch() {// on enter key or search icon click display results to the
}
```
-### php
+### PHP
```php
<?php
/**
@@ -174,7 +184,7 @@ $_SESSION['PFA_token'] = md5(uniqid("pfa" . rand(), true));
```
-### json
+### Json
```json
{
"name": "Abridge Zola Theme",
diff --git a/content/overview-code-blocks.md b/content/overview-code-blocks.md
index af1d406..ce40a10 100644
--- a/content/overview-code-blocks.md
+++ b/content/overview-code-blocks.md
@@ -23,7 +23,7 @@ See [the docs](https://www.getzola.org/documentation/content/syntax-highlighting
If we want, we can also `specify inline code` which is useful for `the small stuff`.
-### rust
+### Rust
```rust
fn main() {
let greetings = ["Hello", "Hola", "Bonjour",
@@ -66,6 +66,16 @@ fn main() {
}
```
+### Bash
+```bash
+#!/bin/bash
+for d in /sys/kernel/iommu_groups/*/devices/*; do
+ n=${d#*/iommu_groups/*}; n=${n%%/*}
+ printf 'IOMMU Group %s ' "$n"
+ lspci -nns "${d##*/}"
+done
+```
+
### TOML
```toml,linenos,hl_lines=3
base_url = "https://abridge.netlify.app/"
@@ -83,7 +93,7 @@ taxonomies = [
]
```
-### html
+### HTML
```html
<!doctype html>
<html lang="en">
@@ -130,7 +140,7 @@ $font-mono: ui-monospace Menlo Monaco Consolas "SF Mono" "Cascadia Mono" "Segoe
}
```
-### javascript
+### Javascript
```javascript
function closeSearch() {//close the search displaying the regular page.
const e = document.querySelector("main");
@@ -149,7 +159,7 @@ function goSearch() {// on enter key or search icon click display results to the
}
```
-### php
+### PHP
```php
<?php
/**
@@ -174,7 +184,7 @@ $_SESSION['PFA_token'] = md5(uniqid("pfa" . rand(), true));
```
-### json
+### Json
```json
{
"name": "Abridge Zola Theme",