Skip to content

Commit

Permalink
Updating deco and apps version (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanluiz33 authored Dec 12, 2023
1 parent 5e03fe8 commit d46ea35
Show file tree
Hide file tree
Showing 22 changed files with 341 additions and 315 deletions.
9 changes: 5 additions & 4 deletions actions/startAlgoliaCrawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ export interface Props {
* @title Crawler ID
*/
crawlerId: string;
};
}

const action = async ({crawlerUserId, crawlerApiKey, crawlerId} : Props): Promise<void> => {
const url =
`https://crawler.algolia.com/api/1/crawlers/${crawlerId}/reindex`;
const action = async (
{ crawlerUserId, crawlerApiKey, crawlerId }: Props,
): Promise<void> => {
const url = `https://crawler.algolia.com/api/1/crawlers/${crawlerId}/reindex`;
const headers = {
"Content-Type": "application/json",
"Authorization": "Basic " + btoa(`${crawlerUserId}:${crawlerApiKey}`),
Expand Down
2 changes: 1 addition & 1 deletion components/seo/BlogPostSEO.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const BlogPostSEO = ({ locale = "en", ...props }: Props) => {
props.post.body[locale]?.descr,
image: props.post?.body[locale]?.seo?.image || props.post?.img,
},
} as Post & {seo: SEOProps};
} as Post & { seo: SEOProps };

return <Metatags {...props} context={context} />;
};
Expand Down
6 changes: 3 additions & 3 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"imports": {
"deco-sites/starting/": "./",
"deco-sites/std/": "https://denopkg.com/deco-sites/std@1.22.11/",
"$live/": "https://denopkg.com/deco-cx/deco@1.47.3/",
"$live/": "https://denopkg.com/deco-cx/deco@1.47.5/",
"$store/": "./",
"deco/": "https://denopkg.com/deco-cx/deco@1.47.3/",
"apps/": "https://denopkg.com/deco-cx/apps@0.24.2/",
"deco/": "https://denopkg.com/deco-cx/deco@1.47.5/",
"apps/": "https://denopkg.com/deco-cx/apps@0.24.13/",
"$fresh/": "https://denopkg.com/denoland/fresh@7ad4610e3a42aba42638cbc1041b96ee58a9b29e/",
"preact": "https://esm.sh/preact@10.15.1",
"preact/": "https://esm.sh/preact@10.15.1/",
Expand Down
10 changes: 5 additions & 5 deletions docs/developing/editable-sections/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ export default function Hero({
</div>
{!!links?.length && (
<ul class="mt-8 flex flex-col md:flex-row gap-2 md:gap-4">
{links.map(({ href, title, highlight }) => (
<a href={href} aria-label={title}>
<li class={`${highlight ? "font-black" : ""}`}>{title}</li>
</a>
))}
{links.map(({ href, title, highlight }) => (
<a href={href} aria-label={title}>
<li class={`${highlight ? "font-black" : ""}`}>{title}</li>
</a>
))}
</ul>
)}
</header>
Expand Down
11 changes: 6 additions & 5 deletions docs/developing/editable-sections/pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,18 @@ export default function Hero({
</div>
{!!links?.length && (
<ul class="mt-8 flex flex-col md:flex-row gap-2 md:gap-4">
{links.map(({ href, title, highlight }) => (
<a href={href} aria-label={title}>
<li class={`${highlight ? "font-black" : ""}`}>{title}</li>
</a>
))}
{links.map(({ href, title, highlight }) => (
<a href={href} aria-label={title}>
<li class={`${highlight ? "font-black" : ""}`}>{title}</li>
</a>
))}
</ul>
)}
</header>
);
}
```

_Alterando o tipo Link e o JSX com a nova propriedade `highlight`_

Ao realizar esta alteração localmente, ela não afeta ou impacta o Site em
Expand Down
3 changes: 2 additions & 1 deletion docs/developing/hello-world/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ export interface MainColors {
}
```

Modify the LatestPost class to make use of some tokens. For example, the main title of the post now follows the primary color of the site.
Modify the LatestPost class to make use of some tokens. For example, the main
title of the post now follows the primary color of the site.

```tsx
import type { ImageWidget as DecoImage } from "apps/admin/widgets.ts";
Expand Down
8 changes: 6 additions & 2 deletions docs/developing/islands/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,17 @@ export default function Counter() {
}
```

Creating a file called `Counter.tsx` and placing it into the `islands` folder gives us the following result on the screen:
Creating a file called `Counter.tsx` and placing it into the `islands` folder
gives us the following result on the screen:

![Jul-13-2023 10-38-29](https://github.com/deco-sites/starting/assets/1753396/9d4cda22-f302-4b8e-a98e-d5c9dd4af596)

This is called an `island`!

Although adding islands to your project seems tempting, keep in mind that islands slow down websites and harm [TBT metric](https://web.dev/tbt/), so before moving any component to the `island` folder, make sure that your final interactivity:
Although adding islands to your project seems tempting, keep in mind that
islands slow down websites and harm [TBT metric](https://web.dev/tbt/), so
before moving any component to the `island` folder, make sure that your final
interactivity:

- Isn't achieved through page navigation with links or form submissions...
- Isn't an interaction built purely with CSS...
Expand Down
3 changes: 2 additions & 1 deletion docs/developing/islands/pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export default function Counter() {
}
```

Ao criar um arquivo chamado `Counter.tsx` e colocá-lo na pasta `islands`, obtemos o seguinte resultado na tela:
Ao criar um arquivo chamado `Counter.tsx` e colocá-lo na pasta `islands`,
obtemos o seguinte resultado na tela:

![Jul-13-2023 10-38-29](https://github.com/deco-sites/starting/assets/1753396/9d4cda22-f302-4b8e-a98e-d5c9dd4af596)

Expand Down
17 changes: 12 additions & 5 deletions docs/developing/setup/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,12 @@ https://play.deco.cx/

## Create a deco site

**Important**: Before proceeding with this section, make sure to check out [Creating a Site](/docs/en/getting-started/creating-a-site).
**Important**: Before proceeding with this section, make sure to check out
[Creating a Site](/docs/en/getting-started/creating-a-site).

_deco.cx_ abstracts all the complexities of setting up a repository, connecting a CMS, and deploying to the edge. This allows you to focus only on what matters: the code and content of your site.
_deco.cx_ abstracts all the complexities of setting up a repository, connecting
a CMS, and deploying to the edge. This allows you to focus only on what matters:
the code and content of your site.

## Clone your site repository

Expand Down Expand Up @@ -129,11 +132,15 @@ reflected at the above address.

## Publishing changes

The development deployment process is very simple: do a _git push_ of the changes to the _**main**_ branch.
The development deployment process is very simple: do a _git push_ of the
changes to the _**main**_ branch.

These changes will be available when accessing the dev URL (such as <https://deco-sites-example.deno.dev/>).
These changes will be available when accessing the dev URL (such as
<https://deco-sites-example.deno.dev/>).

You can also create a deco.site domain that will make <https://example.deco.site/> available to use. To do so, you need to request that to someone from the deco team.
You can also create a deco.site domain that will make
<https://example.deco.site/> available to use. To do so, you need to request
that to someone from the deco team.

## Now you can start creating sites in your own way! :)

Expand Down
13 changes: 9 additions & 4 deletions docs/developing/setup/pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ isso, acesse: https://play.deco.cx/

## Crie um site deco.cx

**Importante**: Antes de seguir com essa seção, dê uma olhada em [Criando um Site](/docs/pt/getting-started/creating-a-site).
**Importante**: Antes de seguir com essa seção, dê uma olhada em
[Criando um Site](/docs/pt/getting-started/creating-a-site).

_deco.cx_ abstrai todas as complexidades de configurar um repositório, conectar
um CMS e deployar na edge. Isso permite que você se concentre apenas no que
Expand Down Expand Up @@ -134,11 +135,15 @@ isto será refletido no endereço acima.

## Publicando alterações

O processo de _deploy_ em development é muito simples: apenas fazer um _git push_ das alterações na _branch_ _**main**_.
O processo de _deploy_ em development é muito simples: apenas fazer um _git
push_ das alterações na _branch_ _**main**_.

Acessando o endereço em dev (como <https://deco-sites-example.deno.dev/>), essas alterações estarão disponíveis.
Acessando o endereço em dev (como <https://deco-sites-example.deno.dev/>), essas
alterações estarão disponíveis.

Você também pode criar um domínio deco.site que disponibilizará para uso <https://example.deco.site/>. Para fazer isso, você precisa solicitar para alguém do time da deco.
Você também pode criar um domínio deco.site que disponibilizará para uso
<https://example.deco.site/>. Para fazer isso, você precisa solicitar para
alguém do time da deco.

## Agora você pode começar a criar sites cada vez mais do seu jeito! :)

Expand Down
10 changes: 8 additions & 2 deletions docs/getting-started/creating-a-new-page/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
description: Create pages on deco.cx with no need to code
---

You should be familiar with the core concepts of [Blocks](/docs/en/concepts/block) and [Section](/docs/en/concepts/section), and now let's understand how to tie those together and create pages in a deco.cx site.
You should be familiar with the core concepts of
[Blocks](/docs/en/concepts/block) and [Section](/docs/en/concepts/section), and
now let's understand how to tie those together and create pages in a deco.cx
site.

**Pages** have a dedicated section in deco.cx's Admin and you can access it via
the top menu.
Expand Down Expand Up @@ -46,4 +49,7 @@ option to A/B test the new revision.

## Variants

Besides A/B testing, which randomizes which users see the new content, it's possible to segment and personalize content in deco.cx using other factors like user's location, device and more. Read more about Variants [here](/docs/en/getting-started/variants).
Besides A/B testing, which randomizes which users see the new content, it's
possible to segment and personalize content in deco.cx using other factors like
user's location, device and more. Read more about Variants
[here](/docs/en/getting-started/variants).
2 changes: 1 addition & 1 deletion docs/getting-started/installing-an-app/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ manner.
section. This is where you will find all the Apps available for installation.
Select to view all "available Apps".

![Apps Section](https://github.com/deco-cx/apps/assets/882438/e2533612-6828-4fb6-9959-96f000ca3537)
![Apps Section](https://github.com/deco-cx/apps/assets/882438/e2533612-6828-4fb6-9959-96f000ca3537)

4. **Add an App Block:** Click on "Add" to install an App. This starts the
process of creating a block. Configure the block and click on "Create" (give
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/installing-an-app/pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ direta.
"Apps". Esta é a seção onde você encontrará todos os Apps disponíveis para
instalação. Selecione para ver todos os Apps disponíveis.

![Seção de Apps](https://github.com/deco-cx/apps/assets/882438/e2533612-6828-4fb6-9959-96f000ca3537)
![Seção de Apps](https://github.com/deco-cx/apps/assets/882438/e2533612-6828-4fb6-9959-96f000ca3537)

4. **Adicione um Bloco da app:** Clique em adicionar App. Isto inicia o processo
de criar um bloco. Configure o bloco e clique em criar. (dê a ele um nome; é
Expand Down
16 changes: 8 additions & 8 deletions docs/getting-started/proxy-redirects/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ domain and the latter will leave your site domain.
want to work with.

2. Go to the site's `redirects` configuration.
![Redirects in Admin](https://github.com/deco-cx/apps/assets/882438/29e9f388-2c32-4190-96e5-ac5a8001b68c)
![Redirects in Admin](https://github.com/deco-cx/apps/assets/882438/29e9f388-2c32-4190-96e5-ac5a8001b68c)

3. Click on `Create a redirect` and configure it according to your needs.

![Create Redirect](https://github.com/deco-cx/apps/assets/882438/63a7d2a4-cc53-47eb-adca-c6cb601e7f41)
![Create Redirect](https://github.com/deco-cx/apps/assets/882438/63a7d2a4-cc53-47eb-adca-c6cb601e7f41)

4. Fill in the `From` field with the desired route, for example,
`/example-redirect`, and in the `To` field, enter `https://google.com` or the
Expand Down Expand Up @@ -72,7 +72,7 @@ To create a proxy instead of a redirection, you can follow these steps:

2. Open the site `App` for editing. And press to add a new `site map`.

![Add Site Map](https://github.com/deco-cx/apps/assets/882438/92427ed1-54cb-49f2-88f5-3be8c1c27b8a)
![Add Site Map](https://github.com/deco-cx/apps/assets/882438/92427ed1-54cb-49f2-88f5-3be8c1c27b8a)

3. Select the route type as `Route`, and add this new route.

Expand All @@ -93,11 +93,11 @@ Repeat steps 1 and 2 from the previous section. Then:
1. Upload a file named `redirect.csv` to the project's base. It should have the
format as indicated below:

```
from,to,type
/example-redirect,/test,temporary
/google,https://www.google.com,permanent
```
```
from,to,type
/example-redirect,/test,temporary
/google,https://www.google.com,permanent
```

2. Add the route of type `redirectsFromCsv.ts`.

Expand Down
16 changes: 8 additions & 8 deletions docs/getting-started/proxy-redirects/pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ do seu site.
_site_ com o qual deseja trabalhar.

2. Entre na configuração de `redirects` do site.
![Redirects no admin](https://github.com/deco-cx/apps/assets/882438/29e9f388-2c32-4190-96e5-ac5a8001b68c)
![Redirects no admin](https://github.com/deco-cx/apps/assets/882438/29e9f388-2c32-4190-96e5-ac5a8001b68c)

3. Pressione `Criar um redirect` e configure de acordo com sua necessidade.

![Criar redirect](https://github.com/deco-cx/apps/assets/882438/63a7d2a4-cc53-47eb-adca-c6cb601e7f41)
![Criar redirect](https://github.com/deco-cx/apps/assets/882438/63a7d2a4-cc53-47eb-adca-c6cb601e7f41)

4. Preencha o campo `De` com a rota desejada, por exemplo, `/example-redirect`
e, em `Para`, insira `https://google.com` ou a URL para a qual deseja
Expand Down Expand Up @@ -80,7 +80,7 @@ passos:
2. Abra o `App` de site para edição. E pressione para adicionar um novo
`site map`.

![Adicionar site map](https://github.com/deco-cx/apps/assets/882438/92427ed1-54cb-49f2-88f5-3be8c1c27b8a)
![Adicionar site map](https://github.com/deco-cx/apps/assets/882438/92427ed1-54cb-49f2-88f5-3be8c1c27b8a)

3. Selecione o tipo da rota como `Route`, e adicione essa nova rota.

Expand All @@ -101,11 +101,11 @@ Repita os passos de 1 e 2 da seção anterior. Em seguida:
1. Suba um arquivo como `redirect.csv` para a base do projeto. Ele deve ter o
formato indicado abaixo:

```
from,to,type
/example-redirect,/test,temporary
/google,https://www.google.com,permanent
```
```
from,to,type
/example-redirect,/test,temporary
/google,https://www.google.com,permanent
```

2. Adicione a rota do tipo `redirectsFromCsv.ts`.

Expand Down
3 changes: 2 additions & 1 deletion docs/getting-started/releases-revisions/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ the `Revisions` tab to find out when and by which team member a change was made.
for that page (or block) and who was responsible for making them. You can
also load the data from a version to use as a basis for the current edit.

> To restore an old version, simply select the version to be restored and click `Publish`.
> To restore an old version, simply select the version to be restored and
> click `Publish`.
5. When you make changes to any page or block, you need to click `Publish`,
otherwise the changes made will be lost.
Expand Down
7 changes: 4 additions & 3 deletions docs/getting-started/releases-revisions/pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ quando e por que membro do time uma alteração foi feita.
3. Na barra lateral direita da tela você pode ver as propriedades da página e
uma barra de navegação com abas como `Form`, `JSON` e `Revisions` (``).

![Revisões](https://github.com/deco-cx/apps/assets/882438/86b9b319-e314-4928-ac84-db415358ed28)
![Revisões](https://github.com/deco-cx/apps/assets/882438/86b9b319-e314-4928-ac84-db415358ed28)

4. Ao clicar na aba de `Revisions` (``), você consegue ter acesso a uma lista
de versões para essa página (ou bloco) e quem foi o responsável por
realizá-las. Você também pode carregas os dados de uma versão para usar como
base da edição atual.

> Para restaurar uma versão antiga, basta selecionar a versão a ser resturada e clicar em `Publicar`.
> Para restaurar uma versão antiga, basta selecionar a versão a ser resturada
> e clicar em `Publicar`.
5. Quando você faz alterações em qualquer página ou bloco, você precisa clicar
em `Publicar`, caso contrário as alterações feitas serão perdidas.
Expand Down Expand Up @@ -81,7 +82,7 @@ superior da página inicial do seu site.
alguma modificação publicada, você poderá ver a nova versão publicada do
lançamento listada junto com as demais.

![Lançamentos](https://github.com/deco-cx/apps/assets/882438/719d710a-61a0-4aaf-b253-556b4195f3e0)
![Lançamentos](https://github.com/deco-cx/apps/assets/882438/719d710a-61a0-4aaf-b253-556b4195f3e0)

3. Caso prefira republicar uma versão do lançamento publicado anteriormente,
diferente do lançamento atual, você pode clicar em `` e depois clicar em
Expand Down
5 changes: 3 additions & 2 deletions docs/getting-started/updating-seo/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ description: |
How to edit a block in deco.cx
---

Let's begin updating the website information.
deco.cx allows you, through the Admin, to change content without the need for code changes, and this is done through the concept of [Blocks](/docs/en/concepts/block).
Let's begin updating the website information. deco.cx allows you, through the
Admin, to change content without the need for code changes, and this is done
through the concept of [Blocks](/docs/en/concepts/block).

The first Block we can edit is the **site**, an [App](/docs/en/concepts/app)
from deco that configures and prepares a project to operate as a website on the
Expand Down
3 changes: 2 additions & 1 deletion docs/getting-started/variants/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ redundant evaluations and maintaining consistency across variants. To read more
about how to create new matchers check our
[Matchers Documentation](/docs/en/concepts/matcher).

> Currently we do not support variants other than Page Sections; this feature will be added in the future.
> Currently we do not support variants other than Page Sections; this feature
> will be added in the future.
## Step by step

Expand Down
Loading

0 comments on commit d46ea35

Please sign in to comment.