Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Please provide the following version information:

**Confirmation**
Please confirm the following:
- [ ] I have read the FAQ (https://docs.fastht.ml/explains/faq.html)
- [ ] I have read the FAQ (https://www.fastht.ml/docs/explains/faq.html)
- [ ] I have provided a minimal reproducible example
- [ ] I have included the versions of fastlite, fastcore, and fasthtml
- [ ] I understand that this is a volunteer open source project with no commercial support.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get(): return P('Nice to be here!')

</div>

You now have a page with a clickable element that changes the text when clicked. When clicking on this link, the server will respond with an “HTML partial”—that is, just a snippet of HTML which will be inserted into the existing page. In this case, the returned element will replace the original P element (since that’s the default behavior of HTMX) with the new version returned by the second route.
You now have a page with a clickable element that changes the text when clicked. When clicking on this clickable text, the server will respond with an “HTML partial”—that is, just a snippet of HTML which will be inserted into the existing page. In this case, the returned element will replace the original P element (since that’s the default behavior of HTMX) with the new version returned by the second route.

This “hypermedia-based” approach to web development is a powerful way to build web applications.

Expand All @@ -69,7 +69,7 @@ Because FastHTML is newer than most LLMs, AI systems like Cursor, ChatGPT, Claud

- [/llms-ctx.txt](https://www.fastht.ml/docs/llms-ctx.txt)

This example is in a format based on recommendations from Anthropic for use with [Claude Projects](https://support.anthropic.com/en/articles/9517075-what-are-projects). This works so well that we’ve actually found that Claude can provide even better information than our own documentation! For instance, read through [this annotated Claude chat](https://gist.github.com/jph00/9559b0a563f6a370029bec1d1cc97b74) for some great getting-started information, entirely generated from a project using the above text file as context.
This example is in a format based on recommendations from Anthropic for use with [Claude Projects](https://support.claude.com/en/articles/9517075-what-are-projects). This works so well that we’ve actually found that Claude can provide even better information than our own documentation! For instance, read through [this annotated Claude chat](https://gist.github.com/jph00/9559b0a563f6a370029bec1d1cc97b74) for some great getting-started information, entirely generated from a project using the above text file as context.

If you use Cursor, type `@doc` then choose “*Add new doc*”, and use the /llms-ctx.txt link above. The context file is auto-generated from our [`llms.txt`](https://llmstxt.org/) (our proposed standard for providing AI-friendly information)—you can generate alternative versions suitable for other models as needed.

Expand All @@ -92,7 +92,7 @@ The capabilities of FastHTML are vast and growing, and not all the features and

Then explore the small but growing third-party ecosystem of FastHTML tutorials, notebooks, libraries, and components:

- [FastHTML Gallery](https://gallery.fastht.ml): Learn from minimal examples of components (ie chat bubbles, click-to-edit, infinite scroll, etc)
- [FastHTML Gallery](https://gallery.fastht.ml): Learn from minimal examples of components (e.g. chat bubbles, click-to-edit, infinite scroll, etc.)
- [How to Build a Simple Login System in FastHTML](https://blog.mariusvach.com/posts/login-fasthtml) by Marius Vach
- Your tutorial here!

Expand All @@ -113,13 +113,13 @@ If you’re just interested in functional HTML components, rather than a full HT
- [elm-html](https://package.elm-lang.org/packages/elm/html/latest/): Elm’s built-in HTML library with a type-safe functional approach
- [hiccup](https://github.com/weavejester/hiccup): Popular library for representing HTML in Clojure using vectors
- [hiccl](https://github.com/garlic0x1/hiccl): HTML generation library for Common Lisp inspired by Clojure’s Hiccup
- [Falco.Markup](https://github.com/pimbrouwers/Falco): F# HTML DSL and web framework with type-safe HTML generation
- [Falco.Markup](https://github.com/falcoframework/Falco): F# HTML DSL and web framework with type-safe HTML generation
- [Lucid](https://github.com/chrisdone/lucid): Type-safe HTML generation for Haskell using monad transformers
- [dream-html](https://github.com/aantron/dream): Part of the Dream web framework for OCaml, provides type-safe HTML templating
- [dream-html](https://github.com/yawaramin/dream-html): Type-safe HTML markup rendering for the OCaml Dream web framework

For other hypermedia application platforms, not based on HTMX, take a look at:

- [Hotwire/Turbo](https://turbo.hotwired.dev/): Rails-oriented framework that similarly uses HTML-over-the-wire
- [LiveView](https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html): Phoenix framework’s solution for building interactive web apps with minimal JavaScript
- [LiveView](https://phoenix-live-view.hexdocs.pm/Phoenix.LiveView.html): Phoenix framework’s solution for building interactive web apps with minimal JavaScript
- [Unpoly](https://unpoly.com/): Another HTML-over-the-wire framework with progressive enhancement
- [Livewire](https://laravel-livewire.com/): Laravel’s take on building dynamic interfaces with minimal JavaScript
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<title>Redirecting...</title>
</head>
<body>
<p>If you are not redirected automatically, <a href="www.fastht.ml/docs">click here</a>.</p>
<p>If you are not redirected automatically, <a href="https://www.fastht.ml/docs/">click here</a>.</p>
</body>
</html>
12 changes: 6 additions & 6 deletions nbs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"def get(): return P('Nice to be here!')\n",
"```\n",
"\n",
"You now have a page with a clickable element that changes the text when clicked. When clicking on this link, the server will respond with an \"HTML partial\"---that is, just a snippet of HTML which will be inserted into the existing page. In this case, the returned element will replace the original P element (since that's the default behavior of HTMX) with the new version returned by the second route.\n",
"You now have a page with a clickable element that changes the text when clicked. When clicking on this clickable text, the server will respond with an \"HTML partial\"---that is, just a snippet of HTML which will be inserted into the existing page. In this case, the returned element will replace the original P element (since that's the default behavior of HTMX) with the new version returned by the second route.\n",
"\n",
"This \"hypermedia-based\" approach to web development is a powerful way to build web applications."
]
Expand All @@ -123,7 +123,7 @@
"\n",
"- [/llms-ctx.txt](https://www.fastht.ml/docs/llms-ctx.txt)\n",
"\n",
"This example is in a format based on recommendations from Anthropic for use with [Claude Projects](https://support.anthropic.com/en/articles/9517075-what-are-projects). This works so well that we've actually found that Claude can provide even better information than our own documentation! For instance, read through [this annotated Claude chat](https://gist.github.com/jph00/9559b0a563f6a370029bec1d1cc97b74) for some great getting-started information, entirely generated from a project using the above text file as context.\n",
"This example is in a format based on recommendations from Anthropic for use with [Claude Projects](https://support.claude.com/en/articles/9517075-what-are-projects). This works so well that we've actually found that Claude can provide even better information than our own documentation! For instance, read through [this annotated Claude chat](https://gist.github.com/jph00/9559b0a563f6a370029bec1d1cc97b74) for some great getting-started information, entirely generated from a project using the above text file as context.\n",
"\n",
"If you use Cursor, type `@doc` then choose \"*Add new doc*\", and use the /llms-ctx.txt link above. The context file is auto-generated from our [`llms.txt`](https://llmstxt.org/) (our proposed standard for providing AI-friendly information)---you can generate alternative versions suitable for other models as needed."
]
Expand Down Expand Up @@ -158,7 +158,7 @@
"\n",
"Then explore the small but growing third-party ecosystem of FastHTML tutorials, notebooks, libraries, and components:\n",
"\n",
"- [FastHTML Gallery](https://gallery.fastht.ml): Learn from minimal examples of components (ie chat bubbles, click-to-edit, infinite scroll, etc)\n",
"- [FastHTML Gallery](https://gallery.fastht.ml): Learn from minimal examples of components (e.g. chat bubbles, click-to-edit, infinite scroll, etc.)\n",
"- [How to Build a Simple Login System in FastHTML](https://blog.mariusvach.com/posts/login-fasthtml) by Marius Vach\n",
"- Your tutorial here!\n",
"\n",
Expand Down Expand Up @@ -191,14 +191,14 @@
"- [elm-html](https://package.elm-lang.org/packages/elm/html/latest/): Elm's built-in HTML library with a type-safe functional approach\n",
"- [hiccup](https://github.com/weavejester/hiccup): Popular library for representing HTML in Clojure using vectors\n",
"- [hiccl](https://github.com/garlic0x1/hiccl): HTML generation library for Common Lisp inspired by Clojure's Hiccup\n",
"- [Falco.Markup](https://github.com/pimbrouwers/Falco): F# HTML DSL and web framework with type-safe HTML generation\n",
"- [Falco.Markup](https://github.com/falcoframework/Falco): F# HTML DSL and web framework with type-safe HTML generation\n",
"- [Lucid](https://github.com/chrisdone/lucid): Type-safe HTML generation for Haskell using monad transformers\n",
"- [dream-html](https://github.com/aantron/dream): Part of the Dream web framework for OCaml, provides type-safe HTML templating\n",
"- [dream-html](https://github.com/yawaramin/dream-html): Type-safe HTML markup rendering for the OCaml Dream web framework\n",
"\n",
"For other hypermedia application platforms, not based on HTMX, take a look at:\n",
"\n",
"- [Hotwire/Turbo](https://turbo.hotwired.dev/): Rails-oriented framework that similarly uses HTML-over-the-wire\n",
"- [LiveView](https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html): Phoenix framework's solution for building interactive web apps with minimal JavaScript\n",
"- [LiveView](https://phoenix-live-view.hexdocs.pm/Phoenix.LiveView.html): Phoenix framework's solution for building interactive web apps with minimal JavaScript\n",
"- [Unpoly](https://unpoly.com/): Another HTML-over-the-wire framework with progressive enhancement\n",
"- [Livewire](https://laravel-livewire.com/): Laravel's take on building dynamic interfaces with minimal JavaScript"
]
Expand Down
4 changes: 2 additions & 2 deletions nbs/tutorials/quickstart_for_web_devs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,7 @@
"source": [
"1. Every form rendered with the `Form` FT component defaults to `enctype=\"multipart/form-data\"`\n",
"2. Don't forget to set the `Input` FT Component's type to `file`\n",
"3. The upload view should receive a [Starlette UploadFile](https://www.starlette.io/requests/#request-files) type. You can add other form variables\n",
"3. The upload view should receive a [Starlette UploadFile](https://starlette.dev/requests/#request-files) type. You can add other form variables\n",
"4. We can access the metadata of the card (filename, size, content_type, headers), a quick and safe process. We set that to the card variable\n",
"5. In order to access the contents contained within a file we use the `await` method to read() it. As files may be quite large or contain bad data, this is a seperate step from accessing metadata\n",
"6. This step shows how to use Python's built-in `pathlib.Path` library to write the file to disk."
Expand Down Expand Up @@ -1734,7 +1734,7 @@
"source": [
"1. Every form rendered with the `Form` FT component defaults to `enctype=\"multipart/form-data\"`\n",
"2. Don't forget to set the `Input` FT Component's type to `file` and assign the multiple attribute to `True`\n",
"3. The upload view should receive a `list` containing the [Starlette UploadFile](https://www.starlette.io/requests/#request-files) type. You can add other form variables\n",
"3. The upload view should receive a `list` containing the [Starlette UploadFile](https://starlette.dev/requests/#request-files) type. You can add other form variables\n",
"4. Iterate through the files\n",
"5. We can access the metadata of the card (filename, size, content_type, headers), a quick and safe process. We add that to the cards variable\n",
"6. In order to access the contents contained within a file we use the `await` method to read() it. As files may be quite large or contain bad data, this is a seperate step from accessing metadata\n",
Expand Down
Loading