Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: extend link checks #397

Merged
merged 5 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 35 additions & 10 deletions .github/workflows/links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,55 @@ on:
workflow_dispatch:

jobs:
links:
readme:
if: ${{ github.repository_owner == 'nuejs' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check README links
uses: lycheeverse/lychee-action@v2
with:
args: >
--no-progress
--exclude-path node_modules
--exclude localhost
--base .
--
"**/README.md"
token: ${{ secrets.GITHUB_TOKEN }}

site:
if: ${{ github.repository_owner == 'nuejs' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2

- name: Install and build docs
- name: Install and build site
run: |
bun install
cd packages/nuekit
bun link
cd -
nue build -pr packages/nuejs.org
cd ../nuejs.org
nue build -p
nue -pP 8080 &

- name: Check links
if: success() || failure()
- name: Find files to check
run: |
links=$(find packages/nuejs.org/.dist/prod -name "*.html" -printf "http://localhost:8080/%P ")
echo "LINKS=$links" >> $GITHUB_ENV

- name: Check site links
uses: lycheeverse/lychee-action@v2
with:
args: >
--no-progress
--exclude-path node_modules
--exclude localhost
--accept "403, 429, 503"
--remap "http://localhost:8080/@ https://nuejs.org/@"
--remap "http://localhost:8080/todomvc https://nuejs.org/todomvc"
--remap "http://localhost:8080/glow-demo https://nuejs.org/glow-demo"
--exclude "http://localhost:8080/404.html"
--
**/README.md
packages/**/.dist/prod/
${{ env.LINKS }}
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
branches:
- master
paths-ignore:
- .github/**
- packages/examples/**
- packages/nuejs.org/**
pull_request:
paths-ignore:
- .github/**
- packages/examples/**
- packages/nuejs.org/**
workflow_dispatch:
Expand Down
7 changes: 4 additions & 3 deletions packages/nuejs.org/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

## Nue website
The source code for https://nuejs.org
The source code for <https://nuejs.org>

<a href="https://nuejs.org/">
<img src="https://nuejs.org/img/og-dark-big.png" width="900">
Expand All @@ -9,9 +9,10 @@ The source code for https://nuejs.org

### Running locally

1. [Install Nue](//nuejs.org/docs/installation.html)
1. [Install Nue](https://nuejs.org/docs/installation.html)
2. Clone this repository
3. `cd nue/packages/nuejs.org`
4. `nue`

The website runs at http://localhost:8080/
The website runs at <http://localhost:8080/>

4 changes: 2 additions & 2 deletions packages/nuejs.org/docs/content-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ This creates a flexible layout where a main **feature** block contains a nested
The possibilities are endless. You can combine blocks in creative ways, stacking sections within sections to build rich, interactive landing pages. Imagine a **hero section** that introduces key features, followed by a **grid of cards**, each with its own stacked content blocks highlighting product details, testimonials, or case studies. With the power of **nesting**, you can craft visually complex layouts while keeping your Markdown easy to read and maintain. Whether you're building product showcases, multi-section promotional pages, or detailed service breakdowns, nesting unlocks a new level of creative control over your content structure—letting design systems handle the visual complexity.

### Code blocks
Code blocks in Nue are enclosed between triple backticks and can include an optional language hint for syntax highlighting using the [Glow syntax highlighter](blog/introducing-glow/). For example, a CSS code block would look like this:
Code blocks in Nue are enclosed between triple backticks and can include an optional language hint for syntax highlighting using the [Glow syntax highlighter](/blog/introducing-glow/). For example, a CSS code block would look like this:

```md
\```css
Expand Down Expand Up @@ -447,7 +447,7 @@ This simple example demonstrates how you can create a **stacked layout** with co


### Content tags
Nue offers a large amount of [tags](/content-tags.html) that significantly enhance your ability to create rich and interactive websites. You can add responsive images, videos, buttons, accordions, tabs, and more.
Nue offers a large amount of [tags](content-tags.html) that significantly enhance your ability to create rich and interactive websites. You can add responsive images, videos, buttons, accordions, tabs, and more.

You can also extend the syntax with [custom components](custom-components.html).

2 changes: 1 addition & 1 deletion packages/nuejs.org/docs/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Nue supports an [extended Markdown syntax](content-syntax.html) that handles all

### Cloud storage

While the current YAML/Markdown-based editing is well-suited for technical users, we recognize the need for a cloud storage solution for non-technical users. This will allow content management directly through the website. A cloud-based backend is on our roadmap, aligning with Nue's **decoupled architecture**, where content can be fetched from the cloud before rendering. See the [roadmap](index.md#roadmap) for more details.
While the current YAML/Markdown-based editing is well-suited for technical users, we recognize the need for a cloud storage solution for non-technical users. This will allow content management directly through the website. A cloud-based backend is on our roadmap, aligning with Nue's **decoupled architecture**, where content can be fetched from the cloud before rendering. See the [roadmap](/#roadmap) for more details.

## Content-first development

Expand Down
2 changes: 1 addition & 1 deletion packages/nuejs.org/docs/reactivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ After this, we can use this component in a Markdown file:


## Reactive components
More complex components with dynamically generated HTML are better implemented with a [reactive component](reactive-components.html). These components support the same [template syntax](template-syntax.html) as the server-side components, but the components can respond to user input.
More complex components with dynamically generated HTML are better implemented with a [reactive component](islands.html). These components support the same [template syntax](template-syntax.html) as the server-side components, but the components can respond to user input.



Expand Down
2 changes: 1 addition & 1 deletion packages/nuejs.org/docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Setting this to `true` enables [view transitions](reactivity.html#view-transitio

### inline_css

Setting this to `true` inlines all CSS directly into the HTML page, enabling the entire page to render in one request. This setting can also be configured at the area and page levels. For more details, see [performance optimization](performance-optimization.html).
Setting this to `true` inlines all CSS directly into the HTML page, enabling the entire page to render in one request. This setting can also be configured at the area and page levels. For more details, see [performance optimization](optimization.html).

## Global Metadata

Expand Down
Loading