Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 24 09:26
    ddfreyne converted_to_draft #1385
  • Oct 24 08:37
    ddfreyne commented #1511
  • Oct 24 08:15
    ddfreyne synchronize #1511
  • Oct 24 08:15

    ddfreyne on clonefile

    Use clonefile for space efficie… (compare)

  • Oct 24 08:09
    ddfreyne edited #1511
  • Oct 24 08:07
    ddfreyne unlabeled #1511
  • Oct 24 08:07
    ddfreyne edited #1511
  • Oct 24 08:03
    ddfreyne synchronize #1511
  • Oct 24 08:03

    ddfreyne on clonefile

    Use clonefile for space efficie… (compare)

  • Oct 24 08:02

    ddfreyne on main

    Refactor: Extract ItemRepWriter… (compare)

  • Oct 24 07:58

    ddfreyne on avoid-git-initial-branch

    (compare)

  • Oct 24 07:58
    ddfreyne synchronize #1511
  • Oct 24 07:58

    ddfreyne on clonefile

    Refactor: Extract ItemRepWriter… Use clonefile for space efficie… (compare)

  • Oct 24 07:57

    ddfreyne on main

    Don’t use --initial-branch opti… Merge pull request #1512 from n… (compare)

  • Oct 24 07:57
    ddfreyne closed #1512
  • Oct 24 07:53
    ddfreyne opened #1512
  • Oct 24 07:51

    ddfreyne on upgrade-git-circleci

    (compare)

  • Oct 24 07:50

    ddfreyne on avoid-git-initial-branch

    Don’t use --initial-branch opti… (compare)

  • Oct 24 07:40

    ddfreyne on upgrade-git-circleci

    Use newer Git on CircleCI (compare)

  • Oct 24 07:36

    ddfreyne on upgrade-git-circleci

    Use newer Git on CircleCI (compare)

Harald
@a4z
hm, that what I have expected, but it is sad, have now all pieces together, and I am super happy, but I have that one use case where I would need to influence that one page is processed after others, and I do not know how to do that
8 replies
Gregory Pakosz
@gpakosz
@ddfreyne hello, do you think you can make a point release with the longer timeout soon?
3 replies
Harald
@a4z

So, if you have one blog index page that depends on all individual articles, you could do e.g. @items.find_all('/articles/*').each(&:path) to force a dependency onto all those pages

A question to this ... what does it mean.. :-) , what does .each(&:path) actually call on the item?
my ruby is not that strong, and from the doc I see there is a path property, but I am unsure how that relates, but I am very interested in understanding .

Denis Defreyne
@ddfreyne
.each(&:path) is the same as .each { |something| something.path } — it’s syntactic sugar
So essentially, it loops over the collection and calls the path method on it
(and the call to #path makes Nanoc record a dependency onto the item that you called the #path methd on)
Harald
@a4z
Thanks for the explanation! so I call the path method on all blog articles, but when do I do that and how does this relate the the blogindex page?
Do I need to have a own rule for the blogindex page and do this in this rule?
Harald
@a4z
oh, I think I found it , I do it in the blog index erb page ? and this creates a dependency just because I call a method on the item? magic, this is magic !
(have of course to try out if this is true but I think it is... tested, seems to be the case, .. magic! )
3 replies
Harald
@a4z
For the atom feed, what do I need to do that not the whole content of a page/article lands in the feed.xml for each entry, but only the excerpt ?
1 reply
ethancrawford
@ethancrawford
Hello @ddfreyne. I'm interested in helping to solve my recently raised issue nanoc/nanoc#1502 if I can. The only problem is that I'm not quite sure yet of a suitable approach - I'd welcome any pointers if/when you have the time! :slight_smile:
Denis Defreyne
@ddfreyne
@ethancrawford Hi! I think the way to fix it would be to look at utf8.rb (which defines Nanoc::CLI::StreamCleaners::UTF8, check whether str is a UTF-8 string, and if not, return str without doing anything on it
1 reply
ethancrawford
@ethancrawford
Btw, is there much left to do before merging in the branch where you have extracted the sass filter into its own gem? (I'm still curious about replacing sass with sassc :smile:)
9 replies
ethancrawford
@ethancrawford
..and another question :joy: :sweat_smile: if I were interested in allowing the kramdown filter to parse github flavoured markdown, would you prefer this to be added as a separate filter, or allowed as a config setting to the existing one? :slight_smile:
4 replies
Harald
@a4z

a qeustion to the documentation, the example in the blogger helper for generating a feed is

compile '/blog/feed/' do
  filter :erb
  write '/blog.xml'
end

what input does this actually take? I mean, /blog/feed/ is a folder , so which file will be compiled ?

4 replies
Denis Defreyne
@ddfreyne
nanoc 4.11.18 is out!
5 replies
ethancrawford
@ethancrawford
:tada:
Denis Defreyne
@ddfreyne
I have a day off today and this is how I choose to spend it… fixing threading bugs
But don’t worry. I will definitely be not doing much later today
ethancrawford
@ethancrawford
:laughing:
Harald
@a4z
You do an awesome job @ddfreyne by providing this great tool and active maintaining it and helping users like me. Thanks a lot Denis !!
Denis Defreyne
@ddfreyne
Thank you :)
Harald
@a4z
finally I am done and my nanoc base site is online, did also some plug for nanoc :-)
https://a4z.gitlab.io/blog/2020/06/21/Moving-this-site-to-a-new-location.html
Denis Defreyne
@ddfreyne
@a4z Very nice :)
I found a typo: piplelines
@a4z You can integrate a spell checker with Nanoc if you want: https://github.com/nanoc/nanoc.ws/blob/main/lib/checks.rb
That is how I do it with nanoc.ws
Harald
@a4z
Thanks! will definitely look into spell checker, obviously VS Code code spell check does not show me all, or my eyes are too tired in the evening :-)
2 replies
Harald
@a4z

apropos check, I get 2 fails positives from the ilink checker, both to the same site , one time from the blog index and 1 time from an article linking to the same page, in both case the html is

<a href="/blog/2017/10/14/Using-SQLite3-in-your-C++-application.html">Using SQLite3 in your C++ application</a>

both links work... maybe the ++ in the URL?

4 replies
ethancrawford
@ethancrawford
Hey hey @ddfreyne. Do you still consider https://groups.google.com/d/topic/nanoc/aSG7QC_oqZQ/discussion to be the ideal way to combine multiple items into one?
2 replies
Harald
@a4z
can I create a ignore list for various checkers ?
I have 2 problems, one is that thi the url checker, reporting an URL that clearly works wget https://a4z.gitlab.io/blog/2017/10/14/Using-SQLite3-in-your-C++-application.html as being wrong,
the second is the html validator, since google wants to put me a html page into my root so it knows I am the owner of the page. And this is of course no valid html5
It would be nice if I could automate the checkers, but I need a way to exclude such false positives
Daniel Aleksandersen
@da2x
@a4z yes, many filters support that. docs at https://nanoc.ws/doc/reference/config/#checks
1 reply
Daniel Aleksandersen
@da2x
@ddfreyne is it possible to use a snapshot from a rep:default compilation in a rep:another compilation?
I’ve not needed to use snapshots before and am somewhat confused about their limitations.
I’ve basically got one item that needs to write twice. I can’t regenerate the item from the beginning. E.g. https://gist.githubusercontent.com/da2x/bf51169d5dd847ebd68f324285af6016/raw/3ea397581185fe1bb28e3f0566991aeb7e0381b3/some.rb
Denis Defreyne
@ddfreyne
@da2x What you’re trying to do is not possible currently :(
Not quite ideal.
Hmm, hold on… it might work if you create a filter e.g. :read_snapshot, with the two arguments being the rep and snapshot name, which then returns @item.compiled_content(rep: rep_name, snapshot: snapshot_name)
I haven’t tried it and I think it might cause issues with cyclical dependencies
Daniel Aleksandersen
@da2x
I ended up cheating. I made a filter that removes the source map from the JS files, but writes it to a separate file, and then return the just the JS.
Gregory Pakosz
@gpakosz
I'm curious. What's your approach to JS source maps in the context of Nanoc?
Harald
@a4z
btw, I am deeply impressed by the live reload injection nanoc does, is this somewhere available as a stand alone thing?
( I have some slides with ascidoctor-revealjs and a rake file that rebulids on change, now I would like to have this live reload that nanoc has to reload the presentation in the browser)
Denis Defreyne
@ddfreyne
That is pretty much all done by https://github.com/johnbintz/rack-livereload!
@a4z You can also install the adsf and adsf-live gems, and then use the adsf --live-reload command to run a live-reloading web server, separately from Nanoc
Harald
@a4z
Thanks! will check adsf ,
want to put this into my rake file and replace my WEBrick call so the live reload script becomes injected,
do I understand that correct, just with using asdf-live + asdf I can remove my existing guard live reload rule ? An this becomes independent from the live reload browser extensions?
Daniel Aleksandersen
@da2x
@ddfreyne GitHub doesn’t let me open a pull request at the moment. do you want this patch? da2x/nanoc@7b81707 It implements copy-on-write reflink copying on Btrfs and XFS on Linux. Like a hardlink, except the files are dereferenced if either copies are modified. Requires my Linux-only reflink.gem, which is loaded optimistically. Falls back to old behaviour if the gem isn’t installed. It’s faster on Linux and mitigates the risky business of involving a hardlink. I’m not sure if this way of loading the gem makes it slower on other OSes, though.
Denis Defreyne
@ddfreyne
Ooh I love it — I will respond in the PR that you created on GitHub!
Denis Defreyne
@ddfreyne
I have no way of testing this out though… I used to have a BTRFS NAS, but it died (one of the hard drives made it crashloop, but no idea why)
Denis Defreyne
@ddfreyne
I fixed the tests on the main branch btw — a Rubocop upgrade broke it