Skip to content

Commit

Permalink
fix nuxt relative path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cadgerfeast committed Feb 3, 2021
1 parent 5777e02 commit 3c1bba6
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 26 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ When everything is falling apart, it stops the classic flow and uses modules to

## Documentation

<!-- TODO Change -->
[Full documentation website can be find here.](http://135.39.45.156:8080)
[Full documentation website can be find here.](https://genesys.github.io/mollitia/)

## Installation

Expand Down Expand Up @@ -56,12 +55,10 @@ await circuit.fn(yourFunction).execute('dummy');
The point of `Mollitia` is to get every **Resilience patterns** into one library.
It is very similar at what does [Resilience4j](https://github.com/resilience4j/resilience4j) on **Java**, but on **Node**.

<!-- TODO change links -->

- Works on Node and on browser (even **Internet Explorer 11**, wow).
- Implements a wide variety of Resilience patterns, [more on that here.](http://135.39.45.156:8080)
- Implements a wide variety of Resilience patterns.
- Has **Method Agnostic** circuits, meaning you don't have to create one circuit per function.
- Supports addons, [more on that here.](http://135.39.45.156:8080)
- Supports addons.

## Comparison with other libraries

Expand Down
24 changes: 24 additions & 0 deletions docs/components/global/pg-img.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>
<img :src="`${publicPath}${src}`" :alt="alt" />
</template>

<script>
export default {
name: 'pg-img',
props: {
src: {
type: String,
required: true
},
alt: {
type: String,
required: true
}
},
computed: {
publicPath () {
return this.$router.options.base.slice(0, -1);
}
}
}
</script>
10 changes: 5 additions & 5 deletions docs/content/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ links:
path: /api/module/breaker/sliding/count
- title: Time Breaker
path: /api/module/breaker/sliding/time
- group: Core Addons
links:
- title: Prometheus
# TODO change link
path: http://135.39.45.156:8081
# TODO add when possible
# - group: Core Addons
# links:
# - title: Prometheus
# path: http://135.39.45.156:8081
- group: Customization
links:
- title: Create a module
Expand Down
2 changes: 1 addition & 1 deletion docs/content/api/circuit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Mollitia - API - Circuit

The `Circuit` is the container of your **Resilience** logic.

<p class="flex-center-row" align="center"><img src="/img/circuit-architecture.png" alt="Circuit - Architecture"/></p>
<p class="flex-center-row" align="center"><pg-img src="/img/circuit-architecture.png" alt="Circuit - Architecture"></pg-img></p>

## Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/content/api/module/breaker/sliding/count.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ When the circuit is closed, a sliding window is used to store the outcome of cal
The count-based sliding window calculates the outcome of the last N calls, and decides if the circuit should be opened (if the failure or slow call rate thresholds are exceeded)
For example, if the count window size is 10, the circular array has always 10 measurements.

<p class="flex-center-row" align="center"><img src="/img/circuit-breaker-diagram.png" alt="Circuit Breaker - Diagram"/></p>
<p class="flex-center-row" align="center"><pg-img src="/img/circuit-breaker-diagram.png" alt="Circuit Breaker - Diagram"></pg-img></p>

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/content/api/module/breaker/sliding/time.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ When the circuit is closed, a sliding window is used to store the outcome of cal
The time-based sliding window calculates the outcome of the last calls receiving during the last N milliseconds, and decides if the circuit should be opened (if the failure or slow call rate thresholds are exceeded)
For example, if the count window size is 10000, the circular array stores the requests that occurred during the last 10s (with a maximum of 1000 elements in the array)

<p class="flex-center-row" align="center"><img src="/img/circuit-breaker-diagram.png" alt="Circuit Breaker - Diagram"/></p>
<p class="flex-center-row" align="center"><pg-img src="/img/circuit-breaker-diagram.png" alt="Circuit Breaker - Diagram"></pg-img></p>

## Options

Expand Down
9 changes: 3 additions & 6 deletions docs/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ When everything is falling apart, it stops the classic flow and uses modules to

## Documentation

<!-- TODO Change -->
[Full documentation website can be find here.](http://135.39.45.156:8080)
[Full documentation website can be find here.](https://genesys.github.io/mollitia/)

## Installation

Expand Down Expand Up @@ -59,12 +58,10 @@ await circuit.fn(yourFunction).execute('dummy');
The point of `Mollitia` is to get every **Resilience patterns** into one library.
It is very similar at what does [Resilience4j](https://github.com/resilience4j/resilience4j) on **Java**, but on **Node**.

<!-- TODO change links -->

- Works on Node and on browser (even **Internet Explorer 11**, wow).
- Implements a wide variety of Resilience patterns, [more on that here.](http://135.39.45.156:8080)
- Implements a wide variety of Resilience patterns.
- Has **Method Agnostic** circuits, meaning you don't have to create one circuit per function.
- Supports addons, [more on that here.](http://135.39.45.156:8080)
- Supports addons.

## Comparison with other libraries

Expand Down
4 changes: 2 additions & 2 deletions docs/content/overview/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ If you want to create your own, [find out how here](/api/create-addon).
A list of official `addons` can be found *just below*.

### Core Addons
<!-- TODO change link -->
* **[Prometheus](http://135.39.45.156:8081)**: Adds multiple metrics to your modules and circuits.
<!-- TODO add prometheus link -->
<!-- * **[Prometheus](http://135.39.45.156:8081)**: Adds multiple metrics to your modules and circuits. -->
14 changes: 10 additions & 4 deletions docs/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const dev = process.env.NODE_ENV === 'development';
const publicPath = dev ? '' : '/mollitia/';

export default {
// Target (https://go.nuxtjs.dev/config-target)
target: 'static',
Expand All @@ -11,9 +14,9 @@ export default {
{ hid: 'description', name: 'description', content: 'JavaScript Resilience Library' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'stylesheet', type: 'text/css', href: '/roboto/font.css' },
{ rel: 'stylesheet', type: 'text/css', href: '/material-icons/font.css' }
{ rel: 'icon', type: 'image/x-icon', href: `${publicPath}favicon.ico` },
{ rel: 'stylesheet', type: 'text/css', href: `${publicPath}roboto/font.css` },
{ rel: 'stylesheet', type: 'text/css', href: `${publicPath}material-icons/font.css` }
]
},

Expand Down Expand Up @@ -58,9 +61,12 @@ export default {
}
}
},

router: {
base: publicPath
},
// Build Configuration (https://go.nuxtjs.dev/config-build)
build: {
publicPath: dev ? '/_nuxt/' : './_nuxt/'
},
generate: {
routes: [
Expand Down

0 comments on commit 3c1bba6

Please sign in to comment.