diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 082a013..af91225 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,8 +4,15 @@ on: push: branches: [ main ] tags: ['*'] + pull_request: + branches: [ main ] + paths: [ "docs/**" ] workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + jobs: docs: name: Documentation diff --git a/README.md b/README.md index c73254c..9a5380d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

+

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://multisimolab.github.io/HyperFEM.jl/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://multisimolab.github.io/HyperFEM.jl/dev/) @@ -129,7 +129,7 @@ x = solve!(comp_model; stepping=(nsteps=5, maxbisec=5), post=post_model) ## HyperFEM Gallery -

+![img](https://github.com/MultiSimOLab/HyperFEM.jl/raw/main/docs/img/sims.png) @@ -138,7 +138,6 @@ x = solve!(comp_model; stepping=(nsteps=5, maxbisec=5), post=post_model) In order to give credit to the HyperFEM contributors, we ask that you please reference the paper: C. Perez‐Garcia, R. Ortigosa, J. Martínez‐Frutos, and D. Garcia‐Gonzalez, **Topology and material optimization in ultra-soft magnetoactive structures: making advantage of residual anisotropies.** Adv. Mater. (2025): e18489. https://doi.org/10.1002/adma.202518489 - along with the required citations for [Gridap](https://github.com/gridap/Gridap.jl). @@ -147,7 +146,7 @@ along with the required citations for [Gridap](https://github.com/gridap/Gridap. - Grants PID2022-141957OA-C22/PID2022-141957OB-C22 funded by MCIN/AEI/ 10.13039/501100011033 and by ''ERDF A way of making Europe'' -

+

## Contact diff --git a/docs/imgs/aei.png b/docs/img/aei.png similarity index 100% rename from docs/imgs/aei.png rename to docs/img/aei.png diff --git a/docs/imgs/logo.png b/docs/img/logo.png similarity index 100% rename from docs/imgs/logo.png rename to docs/img/logo.png diff --git a/docs/imgs/seneca.png b/docs/img/seneca.png similarity index 100% rename from docs/imgs/seneca.png rename to docs/img/seneca.png diff --git a/docs/imgs/sims_.png b/docs/img/sims.png similarity index 100% rename from docs/imgs/sims_.png rename to docs/img/sims.png diff --git a/docs/make.jl b/docs/make.jl index d5f6296..c7f8373 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -5,10 +5,9 @@ readme_path = joinpath(@__DIR__, "..", "README.md") index_path = joinpath(@__DIR__, "src", "index.md") readme_content = read(readme_path, String) -readme_content = replace( - readme_content, - r"(

)" => s"```@raw html\n\1\n```" -) +header_start = findfirst("# Multiphysics", readme_content) +readme_content = header_start !== nothing ? readme_content[header_start.start:end] : readme_content +readme_content = replace(readme_content, r"(

)" => s"```@raw html\n\1\n```") write(index_path, readme_content) makedocs( @@ -25,7 +24,7 @@ makedocs( HyperFEM.ComputationalModels ], pages = [ - "HyperFEM" => "index.md", # Inject README.md (previously cloned into index.md) + "Home" => "index.md", # Inject README.md (previously cloned into index.md) "Tutorials" => "tutorials.md", # Point to the tutorials repository "API reference" => "api.md" # Inject the docstrings from the code ], @@ -34,7 +33,9 @@ makedocs( canonical = "https://MultiSimOLab.github.io/HyperFEM.jl", ), checkdocs = :none, - warnonly = true + warnonly = false, + linkcheck = true, + linkcheck_ignore = [r"^mailto:"], ) deploydocs( diff --git a/docs/src/assets/logo.png b/docs/src/assets/logo.png new file mode 100644 index 0000000..fd4ca47 Binary files /dev/null and b/docs/src/assets/logo.png differ