gabrielpoca
Hello everyone!
I want to share with you something that I’m really proud of: https://stillstatic.io/
Still is a static site builder for Elixir! Do you need to build a static website? This is what you want! We wanted to take a step back from the complications of building websites nowadays and have something simple and that just works, but that you can extend and grow in complexity if you need. Here are a few highlights:
- Throw some HTML, Slime, Markdown, CSS, JS, and images into a folder, and it will just work.
- Out of the box, it works with Slime and Markdown, but you can use EEx almost anywhere, such as in CSS, JS, or HTML files.
- There’s a development server that watches the file system and refreshes the browser when necessary.
- There’s an error overlay in the browser where you can see errors, the stacktrace, and more information on the context that leads to that error.
- There are helper functions to generate links and responsive images, to include other files, etc.
- We just finished an integration with Snowpack GitHub - still-ex/still_snowpack: Snowpack integration for Still · GitHub, which means that you can use tools like TailwindCSS or any other NPM package.
As far as I know, there isn’t anything like it. The idea is to keep it small but add enough functionality to allow anyone to build a modern website without having to reach for something more.
There are already a few people using it, but we would welcome contributors and users to improve it further!
Also, if you check out the website, I hope you enjoy the posters
https://stillstatic.io/
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
matthieuchabert
Hi,
This looks very promising. I never tried Still but I’ve heard really good thing about it, I’ll try it for my next static website
Thank you for contributing!
amnu3387
The page itself looks great (the posters too). I have searched before for a static site generator in elixir, great to see it.
I haven’t had time to check it through, only a superficial reading, does this work only as a static generator, or can you use it as phoenix app if you wanted to?
(because I have in my “backlog” the idea of having a phoenix app, that could spit a static website if wanted, but then could just be a normal app if the need ever comes, like nuxt does for instance)
derek-zhou
Or the other way around: a static site that seamlessly integrated with a phoenix site, all built from the same source repo.
amnu3387
But I think that in that case it either it would have to be served as static assets, probably with some catch all route that forwarded to a router that would sit beneath the normal routes - but here you would basically loose the ability to “seamlessly” integrate other parts of phoenix, like having assigns, small helper/partial templates and such, or it would probably be quite difficult to glue it together into an existing static file in case you wanted those? I might also be misunderstanding what you envision.
derek-zhou
I don’t have a grand vision of how to achieve this, but right now there is a disconnect between a static site (for the content web) and a dynamic site (for the application web). In many cases, the application web need to serve static contents, such as documentation, and the content web need to serve dynamic contents, like forum, e-commerce, etc. If there is a way to blend the 2 together seamlessly and use the best tool for the task, both the user experience and the development effort can be greatly improved.
gabrielpoca
I don’t know exactly what the integration with Pheonix would look like, but it’s something that’s on my mind, and I think there’s even an open issue for it. You can install Still in the app where you have Phoenix and compile the website priv/static during the build step of your deployment. Or you can compile it to anywhere in priv and use rules such as the ones we have the dev server to serve those assets. With that in place, I guess you can call anything from the templates. You could make queries to Ecto or something like that. I need to try this out.
the_wildgoose
This looks superb! Good luck with it!
If I could offer another project for inspiration, I love “pmwiki” and the way they have made the whole thing function by pages including other pages, and the use of metadata/variables that can be attached to each page. So it’s trivial to add a header section to a group of pages by just optionally creating another page which is only included if it exists. Breadcrumbs/prev/next links can be added by scanning metadata, or by examining content on an index page. A built in search feature can have its output fed through a formatter to do cool things like creating a blog index page, or a sidebar showing x latest posts, or y latest events, etc.
There is a point where stuff starts to get tricky with all site generators and you need to start coding. I think they did a great job of making it really trivial to introduce new features with very little code, often just through conditional insertion of pages, or torturing the search function, etc
Good luck with this!
ityonemo
It would be really fantastic if you could somehow have it be a runtime: false dependency so it does all the compiling at comptime and drops it into priv/static with an appropriate router module.
Exadra37
I was not aware of this nice Slime template engine:
https://github.com/slime-lang/slime
It seems that it’s inspired in Slim from Ruby and looks like a very clean template engine… need to give it a try
gabrielpoca
That’s the idea and I believe it’s already possible. I need to try it out and document the process. You would run
mix still.compilelike you runmix phx.digest.