
Security News
Rspack Introduces Rslint, a TypeScript-First Linter Written in Go
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
The idea behind this gem is this:
ADocSite takes:
and generates one simple static web site out of it.
Now you can go, open index.html and browse through all those documents of yours and view them as web pages.
ADocSite is implemented in Ruby. It expects that all files with content are written as asciidoc text files. These files are converted into HTML using asciidoctor.
All documents are considered to be articles unless they are explicitly marked to be pages. Articles can be grouped into categories, pages are entities for them selves. That's the only difference between the two.
Usually, asciidoctor generates one complete HTML page from one text file, head, body and all. ADocSite uses asciidoctor to render text file content as a HTML section, without html, head and body tags. This partial HTML text is then inserted into final HTML page at it's predeterminad place.
You can already tell: how final HTML pages look is determined by templates. ADocSite uses HAML templates so its final output can take any shape and form you wish it to take.
So, there you have it:
ADocSite generates static web site.
All content consists of asciidoc formatted text files.
There are articles, organized into categories, and pages.
Final shape of everything is controlled by haml templates.
ADocSite is very simple to use and to play with. Don't let the "asciidoc formatted text file" thing scare you. You only need to know three things as a necessarry minimum to write asciidoc files:
That's it.
Really.
Add this line to your application's Gemfile:
gem 'adocsite'
And then execute:
$ bundle
Or install it yourself as:
$ gem install adocsite
OK! So, you can do these things with adocsite:
$ adocsite
$ adocsite build
$ adocsite dump
First two are identical: calling adocsite without parameters is same as asking it to do build.
If you run this command you will get adocsite to dump it's templates and configurations into current folder. So, after running:
$ adocsite dump
you will end up with:
These can be your starting point for customizing/configuring adocsite output to your liking.
Create folder to work in (let's say it's called "Documents")
$ mkdir Documents
$ cd Documents
Create folders in there to hold your stuff:
$ mkdir work
$ mkdir docs
Collect all your adoc documents into work and/or docs folder(s) you created in previous step.
Run adocsite:
$ adocsite
After build is finished there will be new folder in Documents called deploy. There you can find output of adocsite's hard work. Open deploy/index.html in your browser and check out the results.
If you would like to change what can be changed in adocsite, then first run
$ adocsite dump
to get templates and default configs from adocsite.
Then you can make your own config file with custom settings (i.e. different names for folder(s) where you keep your documents, instead of default work and docs) or you can tweak existing or create new templates.
With config files you can do two things:
If you choose 1. then you need to tell adocsite to use that config file by running it like this
$ adocsite build --config my_custom_config.rb
or
$ adocsite --config my_custom_config.rb
If you choose 2. then your custom configuration files will be used always when you run adocsite like usual:
$ adocsite
or
$ adocsite build
If you choose to edit/create new HAML templates for adocsite, first dump the ones adocsite uses and start there. Templates folder contains subfolders whose names are used as names of layouts. Default layout will be taken from subfolder named, yes, default. If you want to choose different layout run adocsite like this:
$ adocsite --layout adoc
This way adocsite will use templates from subfolder named adoc for building output.
If you make your own changes then
i.e. put in your config file line like this:
:TEMPLATES_FOLDER => "/home/username/Documents/tpl",
and then run adocsite like this
$ adocsite --config my_config.rb
If you have more than one template layout (i.e. more subfolders in templates folder) choose between them like this:
$ adocsite --config my_config.rb --layout blue_boxed
or
$ adocsite --config my_config.rb --layout orange
etc.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that adocsite demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.